-
Notifications
You must be signed in to change notification settings - Fork 59.9k
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] Invalid URL (POST /v1/chat/completions) #2175
Comments
What need to put in that field?
El mar, 27 jun 2023, 9:49 p. m., Issues-translate-bot <
***@***.***> escribió:
… Bot detected the issue body's language is not English, translate it
automatically.
------------------------------
have you set Endpoint?
[image: image]
<https://user-images.githubusercontent.com/16968934/249331736-d506ffe7-ff98-4df8-ae62-c0d9bb92ded9.png>
—
Reply to this email directly, view it on GitHub
<#2175 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADIWFCEOUCFYPG47IJMYFDXNOLTRANCNFSM6AAAAAAZWHFZNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you have direct access to api.openai.com, please set it as https://api.openai.com. |
Later, I will add a default logic to the code, so if the user forgets to set this option, the default |
当我使用 https://github.com/THUDM/ChatGLM2-6B 时,官方有推荐使用该项目 |
@QAQQL 兼容接口无需选中 chatglm 模型,使用默认的 gpt-3.5-turbo 即可。 |
@QAQQL compatible interface does not need to select the chatglm model, just use the default gpt-3.5-turbo. |
But his interface access failed |
@QAQQL 这是浏览器的默认策略,你可以给他们提个 PR 来解决这个问题,只需要允许所有的 OPTIONS 请求,并返回 200 即可。 |
@QAQQL This is the browser's default policy, you can file a PR with them to fix this, just allow all OPTIONS requests and return 200. |
@QAQQL 你可以参考 fastapi 的 api 文档,为它添加 cors 支持:https://fastapi.tiangolo.com/tutorial/cors/#steps 只需要在: 处,加几行代码: from fastapi.middleware.cors import CORSMiddleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
) |
等待此 PR 合入:THUDM/ChatGLM2-6B#102 |
好的,谢谢您 |
Ok, thank you |
@Yidadaa 我也是透過ChatGLM2-6B 的openai_api.py進行部署後端。
|
@Yidadaa I also deploy the backend through the openai_api.py of ChatGLM2-6B.
|
latest commit show me this issue:
latest one of that is OK:
The text was updated successfully, but these errors were encountered: