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

[Feature Request]: A small suggestion: the environment variable GEMINI_API_BASE_URL. #83

Closed
ling-drag0n opened this issue Jan 21, 2025 · 4 comments
Labels
feature New feature or request

Comments

@ling-drag0n
Copy link

Problem Description

关于环境变量中的GEMINI_API_BASE_URL,如果想使用别的代理每次得去设置环境变量然后重新部署,且前端页面是不可编辑的,有点小麻烦。我知道佬是为了避免服务端代理 url 泄漏,不会覆盖前端页面中的链接。

Image

Solution Description

前端界面中默认仍然是显示原本的,但是可以自定义编辑,数据保存在本地或者说通过KV去建立ACCESS_PASSWORD和GEMINI_API_BASE_URL甚至是GEMINI_API_KEY的绑定。再次感谢大佬开源

Alternatives Considered

No response

Additional Context

No response

@ling-drag0n ling-drag0n added the feature New feature or request label Jan 21, 2025
@Amery2010
Copy link
Collaborator

There are two ways to use GEMINI API_BASE_URL:
The first is that the server requests the internal proxy, that is, the server will read API_BASE_URL and use the api path instead of the original google api path.
The second is the front-end use, but this use needs to be activated when the Gemini api key is filled in the front-end page, that is, the front-end api forwarding will not be used in the scenario of using the server api.

If you want to use the proxy api when asking the server to request data, then you can ignore the API proxy link setting on the front-end page.

@ling-drag0n
Copy link
Author

ling-drag0n commented Jan 21, 2025

感恩解决了,另外,大佬有考虑增加多key轮询/负载均衡的功能吗,单独一个key免费额度可能不够 我看到相关issue了,期待大佬实现,再次感谢

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Thanks for the solution. Also, have you considered adding multi-key polling/load balancing functions? The free quota for a single key may not be enough.

@Amery2010
Copy link
Collaborator

At present, we have come up with a preliminary solution, and we will add experimental multi-key support in subsequent versions.

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

No branches or pull requests

3 participants