原生 /api/chat
原生 /api/chat
curl http://127.0.0.1:11434/api/chat -d '{ "model": "qwen2.5:7b", "messages": [{"role": "user", "content": "你好"}], "stream": false }' OpenAI 兼容调用
OpenAI 兼容调用
curl http://127.0.0.1:11434/v1/chat/completions -H 'Content-Type: application/json' -d '{ "model": "qwen2.5:7b", "messages": [{"role": "user", "content": "你好"}] }' OpenAI 兼容层对部分高级参数(如 logprobs、工具调用细节)的支持程度与原生接口不同,迁移功能前先做兼容性测试。