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

🐛 Fix cloudflare gateway request failure #666

Merged
merged 4 commits into from
Nov 19, 2023

Conversation

MartialBE
Copy link
Collaborator

  1. 修复 当使用Cloudflare AI Gateway时,支持openai渠道测试 #639 , 测试地址拼接不正确
  2. 支持 Azure OpenAI cloudflare gateway Issues on Cloudflare AI Gateway for Azure Openai #665 , 直接在 AZURE_OPENAI_ENDPOINT 填写 https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/azure-openai 即可生效

@ccbikai
Copy link

ccbikai commented Nov 17, 2023

@songquanpeng 目前最新版本是无法使用 cloudflare gateway 的,期望合并PR, 解决使用 cloudflare gateway 的问题

@songquanpeng songquanpeng merged commit 54e5f8e into songquanpeng:main Nov 19, 2023
@songquanpeng
Copy link
Owner

Thx~

dirname pushed a commit to dirname/one-api that referenced this pull request Nov 24, 2023
feat: support cloudflare gateway for azure (songquanpeng#666)

* 🐛 Fix cloudflare gateway request failure

* 🐛 fix channel test url error

fix: skip JSON deserialization when accessing transcriptions and translations (songquanpeng#718)

* fix: Skip JSON deserialization when accessing transcriptions and translations.

* chore: update impl

---------

docs: update readme (songquanpeng#724)

feat: update request struct (close songquanpeng#708)

refactor: remove consumeQuota  related logic (songquanpeng#738)

* feat: 删除relay-text中的consumeQuota变量

该变量始终为true,可以删除

* chore: remove useless code

---------

fix: add Message-ID header for email  (songquanpeng#732)

* feat: Add Message-ID to email headers to comply with RFC 5322

- Extract domain from SMTPFrom
- Generate a unique Message-ID
- Add Message-ID to email headers

* chore: check slice length

---------

fix: add Date header for email (songquanpeng#742)

* 修复自建邮箱发送错误: INVALID HEADER Missing required header field: "Date"

* chore: fix style

---------

feat: support Azure's Whisper model (songquanpeng#720)

docs: add pr template

docs: update readme
Co-Authored-By: JustSong <songquanpeng@foxmail.com>
Co-Authored-By: liyujie <29959257@qq.com>
Co-Authored-By: JustSong <39998050+songquanpeng@users.noreply.github.com>
dirname pushed a commit to dirname/one-api that referenced this pull request Nov 24, 2023
* 🐛 Fix cloudflare gateway request failure

* 🐛 fix channel test url error
dirname pushed a commit to dirname/one-api that referenced this pull request Nov 24, 2023
* 🐛 Fix cloudflare gateway request failure

* 🐛 fix channel test url error
@Caixiaopig
Copy link

  1. 修复 当使用Cloudflare AI Gateway时,支持openai渠道测试 #639 , 测试地址拼接不正确
  2. 支持 Azure OpenAI cloudflare gateway Issues on Cloudflare AI Gateway for Azure Openai #665 , 直接在 AZURE_OPENAI_ENDPOINT 填写 https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/azure-openai 即可生效

上文描述有偏差,AZURE_OPENAI_ENDPOINT 的正确填写是:https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/azure-openai/MY_RESOURCE/,其中 MY_RESOURCE 是Azure的 resource-name(即azure endpoint 网址的前缀单词)。

希望对大家有帮助。

greeeds pushed a commit to greeeds/one-api that referenced this pull request Mar 3, 2024
* 🐛 Fix cloudflare gateway request failure

* 🐛 fix channel test url error
@xiaozhang959
Copy link

  1. 修复 当使用Cloudflare AI Gateway时,支持openai渠道测试 #639 , 测试地址拼接不正确

    1. 支持 Azure OpenAI cloudflare gateway Issues on Cloudflare AI Gateway for Azure Openai #665 , 直接在 AZURE_OPENAI_ENDPOINT 填写 https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/azure-openai 即可生效

哥,有点没看明白,这个AZURE_OPENAI_ENDPOINT是指docker中的参数吗,还是哪个文件里面修改

@xiaozhang959
Copy link

  1. 修复 当使用Cloudflare AI Gateway时,支持openai渠道测试 #639 , 测试地址拼接不正确

    1. 支持 Azure OpenAI cloudflare gateway Issues on Cloudflare AI Gateway for Azure Openai #665 , 直接在 AZURE_OPENAI_ENDPOINT 填写 https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/azure-openai 即可生效

哥,有点没看明白,这个AZURE_OPENAI_ENDPOINT是指docker中的参数吗,还是哪个文件里面修改

嗷嗷 懂了 docker不是最新的版本

@xiaozhang959
Copy link

  1. 修复 当使用Cloudflare AI Gateway时,支持openai渠道测试 #639 , 测试地址拼接不正确

    1. 支持 Azure OpenAI cloudflare gateway Issues on Cloudflare AI Gateway for Azure Openai #665 , 直接在 AZURE_OPENAI_ENDPOINT 填写 https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/azure-openai 即可生效

哥,有点没看明白,这个AZURE_OPENAI_ENDPOINT是指docker中的参数吗,还是哪个文件里面修改

嗷嗷 懂了 docker不是最新的版本

好像不对,docker是最新版的了,还是报这个错

@bo8888
Copy link

bo8888 commented Jun 14, 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

Successfully merging this pull request may close these issues.

None yet

6 participants