Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure open ai 调用失败 #1276

Closed
topfanfan opened this issue May 15, 2024 · 2 comments
Closed

azure open ai 调用失败 #1276

topfanfan opened this issue May 15, 2024 · 2 comments

Comments

@topfanfan
Copy link

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'}}
@garylin2099
Copy link
Collaborator

@iorisa can you possibly check this?

@geekan
Copy link
Owner

geekan commented May 18, 2024

base_url: https://office-shang.openai.azure.com

@geekan geekan closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants