Hk-Gosuto / ChatGPT-Next-Web-LangChain

一键拥有你自己的 ChatGPT 网页服务。 One-Click to deploy your own ChatGPT web UI.(基于 langchain 实现的插件版本 Plugin version implemented based on langchain)
https://n3xt.chat
MIT License
1.15k stars 385 forks source link

[Bug] v2.10.1版本使用gemini报错“empty response” #183

Closed ccinoo closed 8 months ago

ccinoo commented 8 months ago

为了提高交流效率,我们设立了官方 QQ 群和 QQ 频道,如果你在使用或者搭建过程中遇到了任何问题,请先第一时间加群或者频道咨询解决,除非是可以稳定复现的 Bug 或者较为有创意的功能建议,否则请不要随意往 Issue 区发送低质无意义帖子。

点击加入官方群聊

反馈须知

⚠️ 注意:不遵循此模板的任何帖子都会被立即关闭,如果没有提供下方的信息,我们无法定位你的问题。

请在下方中括号内输入 x 来表示你已经知晓相关内容。

描述问题 请在此描述你遇到了什么问题。 v2.10.1版本使用gemini报错“empty response” 如何复现 请告诉我们你是通过什么操作触发的该问题。 新建gemini对话或原有gemini对话都报错“empty response”

截图 请在此提供控制台截图、屏幕截图或者服务端的 log 截图。 一些必要的信息

Issues-translate-bot commented 8 months ago

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


In order to improve communication efficiency, we have set up an official QQ group and QQ channel. If you encounter any problems during use or construction, please join the group or channel for consultation as soon as possible, unless it is a bug that can be stably reproduced or More creative feature suggestions, otherwise please do not send low-quality and meaningless posts to the Issue area.

Click to join the official group chat

Feedback Instructions

⚠️ NOTE: Any post that does not follow this template will be immediately closed and we will not be able to locate your issue without providing the information below.

Please enter x in the square brackets below to indicate that you already know the relevant content.

Describe the problem Please describe what problem you encountered here. v2.10.1 version uses gemini to report an error "empty response" How ​​to reproduce Please tell us what action triggered this issue. The error "empty response" is reported when creating a new gemini conversation or existing gemini conversation.

screenshot Please provide console screenshots, screen shots, or server-side log screenshots here. Some necessary information

Hk-Gosuto commented 8 months ago

目前主分支的最新版本没有复现该问题,更新代码到最新后检查一下配置是否有问题。

Issues-translate-bot commented 8 months ago

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


Currently, the latest version of the main branch does not reproduce this problem. After updating the code to the latest version, check whether there are any problems with the configuration.

ccinoo commented 8 months ago

目前主分支的最新版本没有复现该问题,更新代码到最新后检查一下配置是否有问题。

感谢您这么快回复。如图已再次使用主分支最新版本重新部署,还是报错“empty response”

另外vercel部署日志中有以下报错: `

./node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js -- 11:50:48.020 | Module not found: Can't resolve 'aws-crt' in '/vercel/path0/node_modules/@aws-sdk/util-user-agent-node/dist-cjs' 11:50:48.020 |   11:50:48.020 | Import trace for requested module: 11:50:48.020 | ./node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js 11:50:48.020 | ./node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js 11:50:48.020 | ./node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js 11:50:48.021 | ./node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js 11:50:48.021 | ./node_modules/@aws-sdk/client-s3/dist-cjs/index.js 11:50:48.021 | ./app/utils/s3_file_storage.ts 11:50:48.021 | ./app/api/file/upload/route.ts 11:50:48.021 |   11:50:48.024 | - info Linting and checking validity of types... 11:50:55.899 |   11:50:55.900 | ./app/components/markdown.tsx 11:50:55.900 | 127:29 Warning: Using `` could result in slower LCP and higher bandwidth. Consider using `` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element 11:50:55.900 |   11:50:55.900 | ./app/components/search-bar.tsx 11:50:55.900 | 163:6 Warning: React Hook useCallback has a missing dependency: 'input'. Either include it or remove the dependency array. react-hooks/exhaustive-deps 11:50:55.901 | 204:6 Warning: React Hook useEffect has a missing dependency: 'setIsSearching'. Either include it or remove the dependency array. If 'setIsSearching' changes too often, find the parent component that defines it and wrap that definition in useCallback. react-hooks/exhaustive-deps

`

Hk-Gosuto commented 8 months ago

检查一下 GOOGLE_BASE_URLGOOGLE_API_KEY 两个参数配置是否正确,如果是 vercel 环境部署的话可以不配置 GOOGLE_BASE_URL

Issues-translate-bot commented 8 months ago

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


Check whether the two parameters GOOGLE_BASE_URL and GOOGLE_API_KEY are configured correctly. If it is deployed in a vercel environment, you do not need to configure GOOGLE_BASE_URL

ccinoo commented 8 months ago

检查一下 GOOGLE_BASE_URLGOOGLE_API_KEY 两个参数配置是否正确,如果是 vercel 环境部署的话可以不配置 GOOGLE_BASE_URL

Vercel中环境变量GOOGLE_API_KEY我配置的是GoogleCustomSearch的KEY,gemini的GOOGLE_API_KEYGOOGLE_BASE_URL我是通过启用“自定义接口”后手动配置的。因为我的这两个GOOGLE_API_KEY不同。

之前 vercel 环境变量中我是设置了GOOGLE_BASE_URL,我已删除后重新部署,还是由此报错。不知是否和我通过启用“自定义接口”后手动配置gemini有关,但之前版本是正常的。

Issues-translate-bot commented 8 months ago

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


Check whether the two parameters GOOGLE_BASE_URL and GOOGLE_API_KEY are configured correctly. If it is deployed in a vercel environment, you do not need to configure GOOGLE_BASE_URL

In the environment variable GOOGLE_API_KEY in Vercel, I configured the KEY of GoogleCustomSearch. I configured the GOOGLE_API_KEY and GOOGLE_BASE_URL of gemini manually by enabling "custom interface". Because my two GOOGLE_API_KEY are different.

I had set GOOGLE_BASE_URL in the vercel environment variable before. I deleted it and redeployed it, but I still got an error. I don't know if it has something to do with the fact that I manually configured gemini after enabling "custom interface", but the previous version was normal.

Hk-Gosuto commented 8 months ago

应该是自定义接口那块的问题,估计是后面合代码引入的,今天就会修复。

Issues-translate-bot commented 8 months ago

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


It should be a problem with the custom interface. It is probably introduced in the later code and will be fixed today.

ccinoo commented 8 months ago

应该是自定义接口那块的问题,估计是后面合代码引入的,今天就会修复。

大佬威武,感谢~~

Issues-translate-bot commented 8 months ago

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


It should be a problem with the custom interface. It is probably introduced in the later code and will be fixed today.

Great boss, thank you~~