We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当前类 OpenAI 类型的 API 比如 KIMI 是能正常使用的,根据 OpenRouter 的文档,理论上也可以使用 OpenAI 的接口,文档给出了使用 openai 包的示例。
根据示例也能正常使用:
openrouter_client = OpenAI( api_key='xxx', base_url = 'https://openrouter.ai/api/v1' ) chat_completion = openrouter_client.chat.completions.create( messages=[ { "role": "user", "content": "Say this is a test", } ], model="meta-llama/llama-3-8b-instruct:free", ) print(chat_completion.choices[0].message.content)
但是以下配置,OpenRouter 会返回 404 页面:
[ { "token": "xxx", "type": "openai", "config": { "api_base": "https://openrouter.ai/api/v1", "api_key": "xxx", "model": "meta-llama/llama-3-8b-instruct:free" } } ]
请问这是配置的问题,还是 API 规范的问题,希望添加或检查 OpenRouter 的支持,谢谢!
The text was updated successfully, but these errors were encountered:
日志应该 能看到调用openrouter的url,看是是否符合预期
Sorry, something went wrong.
No branches or pull requests
当前类 OpenAI 类型的 API 比如 KIMI 是能正常使用的,根据 OpenRouter 的文档,理论上也可以使用 OpenAI 的接口,文档给出了使用 openai 包的示例。
根据示例也能正常使用:
但是以下配置,OpenRouter 会返回 404 页面:
请问这是配置的问题,还是 API 规范的问题,希望添加或检查 OpenRouter 的支持,谢谢!
The text was updated successfully, but these errors were encountered: