-
Notifications
You must be signed in to change notification settings - Fork 60.4k
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] 使用自定义接口后,不能使用环境变量里面设置的API_Key #3778
Comments
Title: [Bug] After using a custom interface, the API_Key set in the environment variable cannot be used Phenomenon
Question
|
能否调整成,只要API_Key为空,就尝试使用环境变量里面的API_Key。毕竟,把自己部署的东西分享给别人的时候,并不希望泄露自己的API_Key。 |
Can it be adjusted so that as long as API_Key is empty, try to use the API_Key in the environment variable? After all, when you share your deployed things with others, you don't want to reveal your API_Key. |
同求, 能不能在环境变量中 也加入 自定义 接口地址 |
Also asking, can you add a custom interface address to the environment variables? |
你们也是有点6的,BASE_URL看不见? |
是的,这也是一个很好的方法。既可以分享给身边不方便自己搞的人,又不会造成不必要的泄露。 |
Yes, this is a good approach too. It can be shared with people around you who are inconvenient to do it yourself without causing unnecessary leakage. |
自定义接口一直都有环境变量。 |
Custom interfaces always have environment variables. |
Don't you understand what he means? As long as BASEURL is set, OPENAI_API_KEY in the environment variable will become invalid. Users must manually fill in APIKEY when logging in to use it. |
我尝试将在web设置中配置好后可以正常使用的自定义接口地址移入环境变量的BASE_URL使用,但报错: |
一般base_url是不带v1等请求路径的,请确保baseurl和apikey都格式正确,比如说无空格之类的。别的情况请f12截取completions请求或者相关日志。 |
我尝试在 base_url 末尾加上了 /v1/chat/completions 请求路径,报错:{"error":{"message":"Invalid URL (POST /v1/chat/completions/v1/chat/completions)","type":"invalid_request_error","param":null,"code":null}},看样子 base_url 已经自带了 v1 请求路径 completions 请求截取(域名使用domain替代):
|
现象
疑问
The text was updated successfully, but these errors were encountered: