-
Notifications
You must be signed in to change notification settings - Fork 677
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 OpenAI 支持吗 #7
Comments
默认不支持 Azure OpenAI,感兴趣的话可以按照 https://www.npmjs.com/package/openai 文档自己定制,欢迎 PR。 |
@shog86 模型变量名称 OPENAI_MODEL 不变 |
所以Azure的话设置endpoint,key,model三个变量就行是吧,和OpenAI的一样,deployment不用设置哈? |
不确定,我没有 Azure 的账号用来测试,具体需要配置那些环境变量自己查文档:https://github.com/openai/openai-node?tab=readme-ov-file#microsoft-azure-openai |
Azure的日志来了,求分析,响应了提示语,但缺参数得不到回复,然后服务也因此停止了 2024/06/06 01:39:01 Speaker ✅ 服务已启动... OpenAIError: The OPENAI_API_VERSION environment variable is missing or empty; either provide it, or instantiate the AzureOpenAI client with an apiVersion option, like new AzureOpenAI({ apiVersion: 'My API Version' }). Node.js v20.14.0 |
补一下 OPENAI_API_VERSION 环境变量,具体填什么值,查一下 OpenAI 的使用文档 |
完了之后是需要重启容器,还是删掉重启docker run? |
直接删了重启吧 |
从你的报错信息来看,这是一个典型的 HTTP 404 错误,即“资源未找到”(Resource Not Found)。这是由于在调用 Azure OpenAI API 时,指定的资源或端点不存在或无法找到。 以下是可能的解决步骤和检查点:
如果以上步骤都无法解决问题,建议查看详细的 API 文档或联系 Azure 支持团队获取更多帮助。 |
@shog86 你配置的这几个环境变量名称都没问题,你再按 Azure 的官方教程看看,这几个环境变量的值对不对:https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart?tabs=command-line%2Cpython-new&pivots=programming-language-javascript |
赞👍多谢反馈 |
@jooekong 感觉像是这样 OPENAI_API_VERSION=2024-02-15-preview
AZURE_OPENAI_API_KEY=xxx
AZURE_OPENAI_ENDPOINT=https://xxxx.openai.azure.com
AZURE_OPENAI_DEPLOYMENT=gpt-4o |
这样也不行。。怎么打开debug日志?看看拼出来的url啥的,抓包太麻烦了 |
@jooekong 用的 OpenAI 的 SDK,没有打印日志的开关 |
No description provided.
The text was updated successfully, but these errors were encountered: