Giter Site home page Giter Site logo

Comments (7)

Hk-Gosuto avatar Hk-Gosuto commented on June 26, 2024 1

Problem Description

上游 这个更新 允许 GOOGLE_API_KEY 环境变量设置多 key 进行轮询,

但是目前作者大大的 GOOGLE_API_KEY 还同时是 GOOGLE_CUSTOM_SEARCH 的鉴权密钥。

Solution Description

所以希望支持:既能多 Key 调用 Gemini,也同时不影响调用 custom search。

Alternatives Considered

No response

Additional Context

No response

使用 GOOGLE_API_KEY 的主要原因是 langchainjs 里的这个插件默认就是这个环境变量,不过我看插件支持通过构造函数传递其他配置,目前将该参数修改为了 GOOGLE_SEARCH_API_KEY,与 Gemini 相关的接口不冲突了。

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on June 26, 2024

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


Title: [Feature Request]: Support GOOGLE_API_KEY environment variable to set multiple keys

from chatgpt-next-web-langchain.

cnmozzie avatar cnmozzie commented on June 26, 2024

README里面的环境变量GOOGLE_BASE_URL感觉也有些问题,我参考这篇教程GEMINI_BASE_URL能成功转发,但是GOOGLE_BASE_URL就不行

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on June 26, 2024

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


There are also some problems with the environment variable GOOGLE_BASE_URL in the README. I referred to this tutorial and used GEMINI_BASE_URL to successfully forward it. , but GOOGLE_BASE_URL does not work

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on June 26, 2024

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


Problem Description

Upstream this update allows the GOOGLE_API_KEY environment variable to set multiple keys for polling,

But currently the author's GOOGLE_API_KEY is also the authentication key of GOOGLE_CUSTOM_SEARCH.

Solution Description

So we hope to support: calling Gemini with multiple keys without affecting the calling of custom search.

Alternatives Considered

No response

Additional Context

No response

The main reason for using GOOGLE_API_KEY is that the plug-in in langchainjs uses this environment variable by default. However, I see that the plug-in supports passing other configurations through the constructor. Currently, this parameter has been modified to GOOGLE_SEARCH_API_KEY, and the interface related to Gemini no longer conflicts.

from chatgpt-next-web-langchain.

Hk-Gosuto avatar Hk-Gosuto commented on June 26, 2024

README里面的环境变量GOOGLE_BASE_URL感觉也有些问题,我参考这篇教程GEMINI_BASE_URL能成功转发,但是GOOGLE_BASE_URL就不行

这个算是个历史遗留问题,我这个项目适配 Gemini 比上游项目要早一些,导致部分环境变量命名不一致,之前做了一些兼容处理,尽量保证了两个参数都可以用。
这次修正顺便也把这个问题处理了,已经跟上游完全同步了。
转发的话也可以试试我的这个基于 vercel 的转发,部署更方便一些,cf 不做优选的话在国内不太好用。
https://github.com/Hk-Gosuto/vercel-ai-proxy

from chatgpt-next-web-langchain.

Issues-translate-bot avatar Issues-translate-bot commented on June 26, 2024

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


There are also some problems with the environment variable GOOGLE_BASE_URL in the README. I refer to this tutorial and use GEMINI_BASE_URL successfully. Forward, but GOOGLE_BASE_URL does not work

This is a historical issue. My project adapted to Gemini earlier than the upstream project, which resulted in inconsistent naming of some environment variables. I have done some compatibility processing before to ensure that both parameters can be used.
This correction also solves this problem and is completely synchronized with the upstream.
If you want to forward, you can also try my vercel-based forwarding, which is more convenient to deploy. If cf is not optimized, it will not be easy to use in China.
https://github.com/Hk-Gosuto/vercel-ai-proxy

from chatgpt-next-web-langchain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.