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

🐞 反馈问题:OpenAI 自定义域名 #127

Closed
3 of 4 tasks
huzhongyang opened this issue Jun 17, 2023 · 4 comments
Closed
3 of 4 tasks

🐞 反馈问题:OpenAI 自定义域名 #127

huzhongyang opened this issue Jun 17, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@huzhongyang
Copy link

huzhongyang commented Jun 17, 2023

请先确认以下事项:

  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到最新版本

问题描述

使用 OpenAI 自定义域名会出现这个问题
image

重现步骤

easydict://writeKeyValue?EZOpenAIDomainKey=api.openai-sb.com/v1/chat/completions
easydict://writeKeyValue?EZOpenAIAPIKey=sb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

期望结果

解决方案(可选)

No response

设备信息 && 操作系统版本(可选)

MacBook Pro Intel Core i7, 13.4 (22F66)

是否愿意提交 PR 解决该问题?

  • 我愿意提交 PR!
@huzhongyang huzhongyang added the bug Something isn't working label Jun 17, 2023
@github-actions
Copy link

Hello huzhongyang, Thank you for your first issue contribution 🎉

@huzhongyang huzhongyang changed the title 🐞 反馈问题:请填写标题 🐞 反馈问题:OpenAI 自定义域名 Jun 17, 2023
@tisfeng
Copy link
Owner

tisfeng commented Jun 17, 2023

从报错信息来看,可能是你自定义域名的服务端部署出了问题,客户端 Easydict 这边的 request Content-Type 是 application/json,responese Content-Type 是 text/event-stream,我对服务端不太了解,你可以对照检查一下。

如果有疑问,可以看看这里 #28 (comment)

关于部署自定义域名,可以参考这个 vercel 反代项目 vercel-reverse-proxy

@tisfeng
Copy link
Owner

tisfeng commented Jun 17, 2023

另外,EZOpenAIDomainKey 只需要自定义域名 host,如默认 api.openai.com,因此你这个似乎应该是 api.openai-sb.com, 不要带后面的 path,path 我这边会自动拼接的。

easydict://writeKeyValue?EZOpenAIDomainKey=api.openai-sb.com/v1/chat/completions

@huzhongyang
Copy link
Author

嗯, 就是这个问题. 感谢作者解答 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants