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
}'
posted @ 2025-04-17 17:11  西西弗斯身强体健  阅读(29)  评论(0)    收藏  举报