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?" }]}'