Error code: 400 ‘“auto” tool choice requires --enable-auto-tool-choice and --tool-call-parser
解决报错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}
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
更多推荐


所有评论(0)