Created
April 7, 2026 17:49
-
-
Save k33g/0316bec66a447ccb3bda34e4b170c4f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -s http://localhost:12434/engines/v1/chat/completions \ | |
| -H "Content-Type: application/json" \ | |
| -d '{ | |
| "model": "huggingface.co/typeunsafe/hawaiian-pizza-expert-0.5b", | |
| "stream": true, | |
| "messages": [ | |
| {"role": "system", "content": "You are hawaiian pizza expert."}, | |
| {"role": "user", "content": "who created the hawaiian pizza?"} | |
| ] | |
| }' | while IFS= read -r line; do | |
| [[ "$line" == data:* ]] || continue | |
| data="${line#data: }" | |
| [[ "$data" == "[DONE]" ]] && break | |
| printf '%s' "$(echo "$data" | jq -r '.choices[0].delta.content // empty' 2>/dev/null)" | |
| done | |
| echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment