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]
按文档配置
百度 千帆 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]