[BUG] 部署本地 ollama 时回答空白
Author: SaltsmartCreated Mar 15, 2025Updated Aug 27, 2025
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
- 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
- 我已经搜索过FAQ | I have searched FAQ
当前行为 | Current Behavior
按照下图形式进行配置:
回答为空白,且无任何报错:
期望行为 | Expected Behavior
模型正常回答内容
运行环境 | Environment
- OS:Linux Mint 22 Wilma
- NVIDIA Driver:550.127.05
- CUDA:12.4
- Docker Compose:2.33.1
- NVIDIA GPU Memory:16380MiBQAnything日志 | QAnything logs
运行期间从未产生 api.log
复现方法 | Steps To Reproduce
- ollama run qwen2.5:7b
- docker compose -f docker-compose-linux.yaml up
- 按上述截图设置
- 换用其他模型(如 deepseek-r1:14b)情况完全相同
备注 | Anything else?
ollama 及模型均配置正常,可以用 ollama run 或流式调用:
> curl http://localhost:11434/api/generate -d '{"model": "qwen2.5:7b", "prompt": "你好"}'
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:38.921436787Z","response":"你好","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:38.944806837Z","response":"!","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:38.963459438Z","response":"有什么","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:38.983814185Z","response":"我可以","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:39.002485991Z","response":"帮助","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:39.021266427Z","response":"你的","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:39.039900432Z","response":"吗","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:39.058594084Z","response":"?","done":false}
{"model":"qwen2.5:7b","created_at":"2025-03-15T10:04:39.077353789Z","response":"","done":true,"done_reason":"stop","context":[151644,8948,198,2610,525,1207,16948,11,3465,553,54364,14817,13,1446,525,264,10950,17847,13,151645,198,151644,872,198,108386,151645,198,151644,77091,198,108386,6313,104139,109944,100364,103929,101037,11319],"total_duration":1492341947,"load_duration":1222992911,"prompt_eval_count":30,"prompt_eval_duration":107000000,"eval_count":9,"eval_duration":159000000}Source: netease-youdao/QAnything