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

[BUG]: OpenAI 使用第三方 [ 请求地址 ],最终请求地址结尾会自动额外加上 /v1/chat/completions,以致请求报错添加失败! #617

Open
Lawrenauh opened this issue Dec 12, 2023 · 0 comments

Comments

@Lawrenauh
Copy link

Description

OpenAI 使用第三方 [ 请求地址 ],比如 Cloudflare 的 AI Gateway https://gateway.ai.cloudflare.com/v1/a4f3288ad83ecb60592409/pot/openai/chat/completions
从 Cloudflare 后台看到的请求 endpoint 会变成 /chat/completions/v1/chat/completions,正确的应该是 /chat/completions 才对。说明程序在最终请求上额外又加了 /v1/chat/completions,以致服务添加报错:
image

试过 OpenAI-Translator 将请求分开写,无此问题:

image

Reproduction

将 OpenAI [ 请求地址 ]https://api.openai.com/v1/chat/completions 改为 第三方 https://gateway.ai.cloudflare.com/v1/a4f3288ad83ecb60592409/pot/openai/chat/completions 报错!

Platform

Windows

System Version

Windows 11 专业版 23H2 22631.2792

Window System (Linux Only)

None

Software Version

2.7.1

Log File

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant