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

当使用Cloudflare AI Gateway时,支持openai渠道测试 #639

Merged
merged 2 commits into from
Nov 5, 2023
Merged

当使用Cloudflare AI Gateway时,支持openai渠道测试 #639

merged 2 commits into from
Nov 5, 2023

Conversation

woodchen-ink
Copy link
Contributor

No description provided.

@songquanpeng songquanpeng merged commit 3fe76c8 into songquanpeng:main Nov 5, 2023
@woodchen-ink
Copy link
Contributor Author

这里我有点疑惑,修改后的代码好像不生效。
因为cloudflare ai gateway的路径是这样的:
image
它的 /v1 并不是在结尾,我本地测试群主修改后的新代码反而无法测试了

@woodchen-ink
Copy link
Contributor Author

@songquanpeng

@MartialBE
Copy link
Collaborator

需要去除的是 v1/chat/completions中的v1
可以直接复用 getFullRequestURL方法来进行处理,无需再额外去做字符串替换。

@woodchen-ink
Copy link
Contributor Author

需要去除的是 v1/chat/completions中的v1。 可以直接复用 getFullRequestURL方法来进行处理,无需再额外去做字符串替换。

明白了,谢谢

@woodchen-ink
Copy link
Contributor Author

需要去除的是 v1/chat/completions中的v1。 可以直接复用 getFullRequestURL方法来进行处理,无需再额外去做字符串替换。

虽然明白意思,但是实际还是不能用
image

@MartialBE
Copy link
Collaborator

需要去除的是 v1/chat/completions中的v1。 可以直接复用 getFullRequestURL方法来进行处理,无需再额外去做字符串替换。

虽然明白意思,但是实际还是不能用 image

你可以看看我的pr #666 ,我这边测试 没问题
iShot_2023-11-06_22 16 39

@woodchen-ink woodchen-ink deleted the patch-1 branch November 7, 2023 16:45
@befantasy
Copy link

需要去除的是 v1/chat/completions中的v1。 可以直接复用 getFullRequestURL方法来进行处理,无需再额外去做字符串替换。

虽然明白意思,但是实际还是不能用 image

更新到最新版同样的报错。

是不是需要重新建立渠道。

humphery755 added a commit to humphery755/one-api that referenced this pull request Nov 19, 2023
…ync-one-api

* 'main' of https://github.com/songquanpeng/one-api:
  fix: cloudflare test & expose detailed info about test failures (songquanpeng#715)
  feat: support tts model (songquanpeng#713)
  feat: keep sync with dall-e updates (songquanpeng#679)
  fix: fix PaLM not working issue (songquanpeng#667)
  fix: fix channel_id column name (songquanpeng#681, close songquanpeng#688)
  feat: add improve docker-compose.yml and support fast startup (songquanpeng#685)
  docs: add deploy to zeabur button (songquanpeng#693)
  fix: numeric sorting in tables (songquanpeng#695)
  feat: sync pricing for new 1106 models (songquanpeng#696)
  docs: update readme
  chore: update quota calc logic (close songquanpeng#599) (songquanpeng#627)
  fix: fix Cloudflare AI Gateway channel test support (songquanpeng#639)
  feat: support chatglm_turbo (songquanpeng#648)
  fix: fix typo (songquanpeng#651)
greeeds pushed a commit to greeeds/one-api that referenced this pull request Mar 3, 2024
* 当使用Cloudflare AI Gateway时,支持openai渠道测试

* refactor: change logic

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
@xiaozhang959
Copy link

docker0.60版本依旧报错,/v1/v1/chat.....

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

5 participants