Closed Miguitian closed 3 months ago
试试类似这样?
llm_cfg = {
'model': 'qwen-max',
'model_server': 'dashscope',
'api_key': 'YOUR_DASHSCOPE_API_KEY',
'generate_cfg': {
"extra_headers": {
"Host": "qwen1-5-32b-isvc.ai-platform.example.com"
}
}
}
可以注意下 https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/llm/oai.py#L53 和 https://github.com/QwenLM/Qwen-Agent/blob/main/qwen_agent/llm/oai.py#L78这两行
我内网环境部署的qwen模型,需要设置一下extra_generate_cfg = { "extra_headers": { "Host": "qwen1-5-32b-isvc.ai-platform.example.com" } } 来指定Host,我如果使用FnCallAgent类来实现智能体,配置好llm_cfg 参数,那我应该在哪里传入extra_generate_cfg配置? 尝试了一下将extra_generate_cfg 写到llm_cfg里面并没有生效 。