MetaGPT
MetaGPT copied to clipboard
azure open ai 调用失败
Feature description
我是用api 直接发起请求,是ok 的。如下
export KEY="key"
export ENDPOINT="https://office-shang.openai.azure.com"
curl -s "${ENDPOINT}/openai/deployments/gpt-4/chat/completions?api-version=2024-02-01" \
-H "Content-Type: application/json" \
-H "api-key: ${KEY}" \
-d '{"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "你好, 你是谁"}]}'
在metagtpt 使用时候,报错了。配置如下 metagpt. config
llm:
api_type: 'azure'
base_url: 'https://office-shang.openai.azure.com/openai/deployments/gpt-4/chat/completions?api-version=2024-02-01'
api_key: 'key'
api_version: '2024-02-01' # such as '2024-03-01-preview'
model: 'gpt-4' # or YOUR_DEPLOYMENT_NAME
result error
ERROR | metagpt.utils.common:log_it:554 - Finished call to 'metagpt.actions.action_node.ActionNode._aask_v1' after 66.928(s), this was the 1st time calling it. exp: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
@iorisa can you possibly check this?
base_url: https://office-shang.openai.azure.com