ollama API cheatsheet
主要参考 https://www.runoob.com/ollama/ollama-api.html
列出本地模型
curl http://localhost:11434/api/tags
拉取模型
curl http://localhost:11434/api/pull -d '{
"name": "deepseek-coder"
}'
启用流式相应
curl http://localhost:11434/api/generate -d '{
"model": "deepseek-coder",
"prompt": "你好,你能帮我写一段代码吗?",
"stream": true
}'

浙公网安备 33010602011771号