Openai agent 调用时报错:

Error code: 400 - {‘object’: ‘error’, ‘message’: ‘“auto” tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set’, ‘type’: ‘BadRequestError’, ‘param’: None, ‘code’: 400}

解决方法:

在模型vllm启动时,添加两个参数:# --enable-auto-tool-choice --tool-call-parser hermes

例如我的启动参数:

nohup python -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --port 3000 --model /data/Qwen/Qwen2.5-32B-Instruct-AWQ --tensor-parallel-size 2 --served-model-name Qwen25-32B-Chat-AWQ-A100 --quantization awq --gpu-memory-utilization 0.9 --trust-remote-code --enable-auto-tool-choice --tool-call-parser hermes --disable-log-request --enforce-eager --max-model-len 20000 >> /data/log/Qwen2.5-32B-Chat-AWQ.log 2>&1 &

参考链接:https://github.com/mannaandpoem/OpenManus/issues/230

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐