KenyonY / openai-forward

🚀 大语言模型高效转发服务 · An efficient forwarding service designed for LLMs. · OpenAI API Reverse Proxy
https://api.openai-forward.com
MIT License
835 stars 289 forks source link

Assistants API support #91

Closed KenyonY closed 11 months ago

KenyonY commented 11 months ago

Detailed Description

ref: https://platform.openai.com/docs/api-reference/assistants

curl "https://api.openai.com/v1/assistants" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Beta: assistants=v1" \
  -d '{
    "instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
    "name": "Math Tutor",
    "tools": [{"type": "code_interpreter"}],
    "model": "gpt-4"
  }'
wsdo commented 11 months ago

所以 这个加上了吗?

BadRequestError: Error code: 400 - {'error': {'message': "You must provide the 'OpenAI-Beta' header to access the Assistants API. Please try again by setting the header 'OpenAI-Beta: assistants=v1'.", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_beta'}}

wsdo commented 11 months ago

有没有群,可以直接反馈交流

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


Is there a group where we can give feedback and communicate directly?

KenyonY commented 11 months ago

@wsdo 已经合并进main分支了,可以试试看

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


@wsdo has been merged into the main branch, you can give it a try