-
Notifications
You must be signed in to change notification settings - Fork 60.6k
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官方的API和KEY #3427
Comments
Title: How to support non-OPENAI official API and KEY Hello! Your project is outstanding! I want to know how you support OPENAI-like APIs and keys. I have been looking at the code file for a long time, but further I want to know how you design the request structure. |
为什么不读文档?BASE_URL 和 API_KEY 就是为了兼容 openai 类型的接口而生的。 |
Why not read the documentation? BASE_URL and API_KEY are created to be compatible with openai type interfaces. |
Hi @Yidadaa, 非常感谢你创造这个项目。我发现 BASE_URL 的处理有点问题,假如 BASE_URL 包含 path,输出的请求地址是非预期值,比如 BASE_URL=http://example.org/abc123 最终请求的地址会变为
![]() 在 setting 里面指定 custom endpoint 时不会,只会在环境变量中指定 BASE_URL 的时候会有这种情况 |
首先要非常感谢作者的项目,在部署过程中我也有类似的问题,我的API 地址基于Pandora生成,使用BASE_URL环境变量指定时发现Post请求会额外添加路径参数,导致无法正常使用;但是如果我直接在Web中设置URL地址却是可用的,请问该问题该如何解决呢 |
First of all, I would like to thank the author very much for his project. I also had a similar problem during the deployment process. My API address was generated based on Pandora. When specified using the BASE_URL environment variable, I found that the Post request would add additional path parameters, causing it to not work properly; but if I directly It is possible to set the URL address in the Web. How to solve this problem? |
Same problem, looking forward to the solution. |
I get the solution, change the line 15 of the ./app/api/common.ts from let path = `${req.nextUrl.pathname}${req.nextUrl.search}`.replaceAll( to let path = `${req.nextUrl.pathname}`.replaceAll( where the It works for me. |
it works ! |
你好,请问在群晖的Docker 中如何修改?我并没有找到这个文件。 |
Hello, how to modify it in Synology’s Docker? I didn't find this file. |
您好!您的项目非常出色!我想知道您是怎么支持 类OPENAI的api和key的,
可以麻烦告知一下对应的代码位置吗? 我想参考一下
代码文件我看了好久,但是更进一步的 我想知道您是如何 设计请求结构的 ,
以至于 改变url地址后依旧可以正常对接。 这对我非常重要,如果您方便,可以麻烦帮助我一下吗? 非常感谢
The text was updated successfully, but these errors were encountered: