geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
43.99k stars 5.23k forks source link

百度千帆API调用失败 #925

Closed Blank141 closed 7 months ago

Blank141 commented 7 months ago

按文档配置

百度 千帆 API 支持ERNIE-*模型和部分主流开源模型,详见metagpt/utils/token_counter.py

使用安全认证AK/SK鉴权 使用model进行调用

yaml llm: api_type: qianfan access_key: 'YOUR_ACCESS_KEY' secret_key: 'YOUR_SECRET_KEY' model: 'YOUR_MODEL_NAME like ERNIE-Bot-turbo'

报错

llm.api_key Field required [type=missing, input_value={'api_type': 'qianfan', '...E like ERNIE-Bot-turbo'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.5/v/missing llm.api_type Input should be 'openai', 'anthropic', 'spark', 'zhipuai', 'fireworks', 'open_llm', 'gemini', 'metagpt', 'azure' or 'ollama' [type=enum, input_value='qianfan', input_type=str]

Jmengscode commented 7 months ago

I had the same issue when i used qwen-max API.

better629 commented 7 months ago

@Jmengscode @Blank141 the old PR has a dependency problem so revert it. Here is the new PR https://github.com/geekan/MetaGPT/pull/940 . You can test it later.