this post was written in
info
official website: Ollama
download and install
download exe file or use powershell command(I use exe file) and install.
on 2026-03-05.
chat
please change ‘model location’ before downloading model, do not use c:/ .
choose a model (qwen3:4b or search other model qwen3:0.6b) and ask him.
api
search model: https://ollama.com/library/qwen3
chat(ChatGPT式对话)
curl -X POST 'http://localhost:11434/api/chat' -H 'Content-Type: application/json' -d '{ "model": "qwen3:4b", "think1": false, "stream": false, "messages": [{"role": "user", "content": "你是谁,用一句话回答"}] }'不要使用think参数,会导致命令行一直得不到返回.
generate(单 prompt 生成)
curl -X POST 'http://localhost:11434/api/generate' -H 'Content-Type: application/json' -d '{ "model":"qwen3:4b", "prompt":"写一句赞美春天的话", "stream1":false }'不要使用stream1参数,会导致命令行一直得不到返回.
作者:张三 创建时间:2026-03-05 15:03
最后编辑:张三 更新时间:2026-03-05 16:10
最后编辑:张三 更新时间:2026-03-05 16:10