1. 参考博客:1. Ollama完整教程:本地LLM管理、WebUI对话、Python/Java客户端API应用:https://blog.csdn.net/python122_/article/details/1409457202. https://gitee.com/ai-big-model/ollama/tree/main --》REST APIollama 离线安装包 ollama-linux-amd64.tgz 下载地址:https://github.com/ollama/ollama/releases --》v0.3.11 --》ollama-linux-amd64.tgz--》复制链接地址--》https://github.com/ollama/ollama/releases/download/v0.3.11/ollama-linux-amd64.tgz --》迅雷下载( 离线安装请参考:https://blog.csdn.net/meanshe/article/details/142311569 )cd /soft/ollamatar -zxf ollama-linux-amd64.tgz -C /usr/localvim ~/.bashrctodo export OLLAMA_HOST=http://127.0.0.1:11434生成式 API 请求示例:curl http://localhost:11434/api/generate -d '{"model": "llama2","prompt":"Why is the sky blue?"}'聊天式 API 请求示例:curl http://localhost:11434/api/chat -d '{"model": "mistral","messages": [// role = "system" 的 content 应该指的就是 提示词!!!{ "role": "user", "content": "why is the sky blue?" }]}'