Hk-Gosuto / ChatGPT-Next-Web-LangChain

一键拥有你自己的 ChatGPT 网页服务。 One-Click to deploy your own ChatGPT web UI.(基于 langchain 实现的插件版本 Plugin version implemented based on langchain)

Home Page:https://n3xt.chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] 升级2.10.3版本之后,如果在环境变量中同时设置了code 和 google_api_key,则gemini-pro必须填code才能使用,而OpenAI的模型不需要,只要在自定义接口中填入API Key即可使用。

zhangbinhui opened this issue · comments

Describe the bug
作者大大,升级2.10.3版本之后,如果在环境变量中同时设置了code 和 google_api_key,则gemini-pro必须填code才能使用,而OpenAI的模型不需要,只需要在自定义接口中填入API Key即可使用。在升级这个版本之前,只要在 自定义接口中 填入 API Key(OpenAI的)就可以直接使用gemini-pro,不晓得这次更新是有意如此还算是bug。

我截图说明一下情况:

image
我在自定义接口中填了 API Key,没有填访问密码,这个时候OpenAI的模型可以正常使用,而gemini-pro会报错empty access code.

而当我把访问密码也填上的时候,则可以正常使用gemini-pro;

langchain_bug
这个图包含了,在隐私模式下,我填 和 不填 访问密码,在使用gemini-pro的两种情况。

我不确定是否作者大大有意如此,还是说这个算是个bug。

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


Title: [Bug] After upgrading to version 2.10.3, if both code and google_api_key are set in the environment variable, gemini-pro must fill in the code before it can be used, but the OpenAI model does not require it. You can customize it in Just fill in the API Key in the interface and you can use it.

我使用的是示例的线上环境 https://n3xt.chat,按照你的描述,线上环境是有配置 code 的,我在不填写访问密码的情况下配置了 openai 和 google 的密钥,是可以正常使用的,具体配置如下:
image
image
看你截图中的模型服务商是 openai 是否是 google 的密钥未配置?

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


I am using the sample online environment https://n3xt.chat. According to your description, the online environment is configured with code. I configured the keys for openai and google without filling in the access password. , can be used normally, the specific configuration is as follows:
image
image
It looks like the model service provider in your screenshot is openai. Is it because Google’s key is not configured?

我使用的是示例的线上环境 https://n3xt.chat,按照你的描述,线上环境是有配置 code 的,我在不填写访问密码的情况下配置了 openai 和 google 的密钥,是可以正常使用的,具体配置如下: image image 看你截图中的模型服务商是 openai 是否是 google 的密钥未配置?

感谢大大的回复,我是把google 的密钥 和 openai的密钥都配置在后台的环境变量了,如果我填了访问密码,可以正常使用这两个模型。
google的key是免费的,不需要更换,而openai的key因为不是免费的,环境变量里的用完了在后台换比较麻烦,我就会在前端页面填一个新的openai的 API key填进去。
以前只要填了OpenAI的key,不需要填访问密码,也能正常使用gemini,但是2.10.3之后就不行了,必须把访问密码也填上才能继续使用gemini。
我想反馈的是这次交互逻辑上的变化,当然,这个算不算bug作者大大您定吧,我以前那样用惯了,现在无非就是还得再填个访问密码才能用Gemini。不晓得表达清楚没有。

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


I am using the example online environment [https://n3xt.chat, according to your description, the online environment is configured](https://n3xt.chat%EF%BC%8C%E6%8C% 89%E7%85%A7%E4%BD%A0%E7%9A%84%E6%8F%8F%E8%BF%B0%EF%BC%8C%E7%BA%BF%E4%B8%8A% E7%8E%AF%E5%A2%83%E6%98%AF%E6%9C%89%E9%85%8D%E7%BD%AE) code, I did not fill in the access password The keys for openai and google are configured and can be used normally. The specific configuration is as follows: ![image](https://private-user-images.githubusercontent.com/14031260/309947314-80f96356-1801-439d-9d87- 955e7094b1ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..PVWyAjNd5NWaDQiFvIdPziWSq-jEQE6UcFoQI-JTHVs) ![image](https://private-user-images.githubusercontent.com/14031260/309 947434-65368d89-6ffd-430f-9d6f-5abb2acfdb37.png? jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..LcF57yPSpry_jsPBUmDyyC0cIX6T1IyqIC8Rpk5zDvw) It seems that the model service provider in your screenshot is openai. Is it because the Google key is not configured?

Thanks for the reply. I have configured the Google key and the OpenAI key in the background environment variables. If I fill in the access password, I can use these two models normally.
Google's key is free and does not need to be replaced, but Openai's key is not free. It is troublesome to change it in the background when the environment variable is used up. I will fill in a new Openai API key on the front-end page.
In the past, as long as the OpenAI key was filled in, there was no need to fill in the access password, and gemini could be used normally. However, this is no longer possible after 2.10.3. The access password must also be filled in to continue using gemini.
What I want to give feedback on is the change in the logic of this interaction. Of course, it is up to the author to decide whether this is a bug. I was used to using it that way before, but now I just have to fill in another access password to use Gemini. I don't know if I expressed it clearly.

正常来说如果后台配置了访问密码和 key,那在不使用 UI 配置接口密钥的时候是必须填写访问密码。
如果之前只是在 UI 填写 openai 的接口密钥就可以访问到后台配置的 gemini 模型其实才是不正常的。

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


Normally, if the access password and key are configured in the background, the access password must be filled in when the interface key is not configured using the UI.
It would actually be abnormal if you could access the gemini model configured in the background just by filling in the openai interface key in the UI.

正常来说如果后台配置了访问密码和 key,那在不使用 UI 配置接口密钥的时候是必须填写访问密码。 如果之前只是在 UI 填写 openai 的接口密钥就可以访问到后台配置的 gemini 模型其实才是不正常的。

感谢回答,那这个过了。顺便提一嘴界面上的改动点,NextChat最新版本已经支持传图,他们也做了传图的按钮,跟您这边略有不同,传图的效果也不同,NextChat面板支持多图上传,这个您是否考虑同步呢?
image

image

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


Normally, if the access password and key are configured in the background, the access password must be filled in when the interface key is not configured using the UI. It would actually be abnormal if you could access the gemini model configured in the background just by filling in the openai interface key in the UI.

Thanks for the answer, that's it. By the way, let me mention the changes in the interface. The latest version of NextChat already supports image uploading. They have also made a button for image uploading, which is slightly different from yours. The effect of image transferring is also different. The NextChat panel supports multiple image uploads. This Have you considered syncing?
image

image

这块的变动有点大,会晚一些,本周内会同步。

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


The changes in this area are a bit big and will be delayed. They will be synchronized within this week.

这块的变动有点大,会晚一些,本周内会同步。

谢谢!