Skip to content

Instantly share code, notes, and snippets.

@revolunet
Created January 10, 2025 01:11
Show Gist options
  • Save revolunet/da5685508764b27cbf2261f8a1d8efed to your computer and use it in GitHub Desktop.
Save revolunet/da5685508764b27cbf2261f8a1d8efed to your computer and use it in GitHub Desktop.
curl + jq + ollama FTW
# run query from a plain prompt text file
jq -Rs '{ stream: false, model: "llama3.2", prompt: . }' ./some.prompt | curl -X POST http://127.0.0.1:11434/api/generate --data-binary @- | jq -r '.response'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment