ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
74.37k stars 58.7k forks source link

关于新版无法使用Gemini的情况[Bug] #5000

Closed alltobebetter closed 1 month ago

alltobebetter commented 1 month ago

Bug Description

如题,我无论如何都无法在新版中使用Gemini,我的apikey是官方的,调用的时候一直加载,我用python调用了一下发现这个key没有问题,然后我又去本项目的app.nextchat.dev网站上自定义了一下key,发现还是同样的结果,我填入的是gemini-1.5-flash-latest模型,大佬求解

Steps to Reproduce

1.进入app.nextchat.dev 2.点击左下角设置 3.选中自定义接口 4.服务商选择Google 5.终端地址不填(即默认) 6.填写Google密钥 7.其他不改动,发送任意消息

Expected Behavior

我想让其恢复

Screenshots

image

Deployment Method

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

Issues-translate-bot commented 1 month ago

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


Title: About the inability to use Gemini in the new version [Bug]

lloydzhou commented 1 month ago

刚刚在app.nextchat.dev测试了,未复现问题

image

image

Issues-translate-bot commented 1 month ago

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


I just tested it on app.nextchat.dev and the problem is not reproduced.

image

image

lloydzhou commented 1 month ago

或许你可以尝试开启隐身模式或者换一个浏览器再试试? 旧的配置会保存到localstorage,(用这个方式可以排除:测试没有覆盖到的升级迁移问题)

Issues-translate-bot commented 1 month ago

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


Maybe you can try turning on incognito mode or try another browser? The old configuration will be saved to localstorage (this method can eliminate upgrade and migration issues not covered by the test)

alltobebetter commented 1 month ago

谢谢你,我发现这么填写确实没问题。 可是搭建就有问题了,是不是因为环境变量的问题,我的环境变量就这四个,是否一定要具有Google_url? image 而且,我发现,当我不更改终端地址时,没有任何问题出现,当我将终端地址改为 https://generativelanguage.googleapis.com 时则没有反应,和我在vercel搭建的网站情况相似 image image 本人小白 感谢!

Issues-translate-bot commented 1 month ago

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


Thank you, I found that filling it out like this is indeed no problem. But there is a problem with the setup. Is it because of the environment variables? I only have these four environment variables. Do I have to have Google_url? image Also, I found that when I didn't change the terminal address, no problems appeared, and when I changed the terminal address to There is no response when https://generativelanguage.googleapis.com, which is similar to the website I built on vercel. image image I am a novice. Thank you!

lloydzhou commented 1 month ago

而且,我发现,当我不更改终端地址时,没有任何问题出现,当我将终端地址改为 https://generativelanguage.googleapis.com/ 时则没有反应

原因是googleapis提供的API不支持跨域使用。会触发cors报错,所以卡片展示empty response

hugoyue commented 1 month ago

ChatGPT-Next-Web v2.13.0 Docker 部署,使用 Gemini 模型 gemini-1.5-pro-latest 报错:


<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/><link rel="stylesheet" href="/_next/static/css/b0ebe1618ba2d39f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-814905f9f248c768.js"/><script src="/_next/static/chunks/fd9d1056-fdfda9478f9bc4a3.js" async=""></script><script src="/_next/static/chunks/8069-86a6f6a0586c0b28.js" async=""></script><script src="/_next/static/chunks/main-app-4d1564f0311960d9.js" async=""></script><meta name="robots" content="noindex"/><meta name="config" content="{&quot;version&quot;:&quot;v2.13.0&quot;,&quot;commitDate&quot;:&quot;unknown&quot;,&quot;commitHash&quot;:&quot;unknown&quot;,&quot;buildMode&quot;:&quot;standalone&quot;,&quot;isApp&quot;:false,&quot;template&quot;:&quot;{{input}}&quot;}"/><link rel="manifest" href="/site.webmanifest"/><title>404: This page could not be found.</title><meta name="theme-color" media="(prefers-color-scheme: light)" content="#fafafa"/><meta name="theme-color" media="(prefers-color-scheme: dark)" content="#151515"/><title>NextChat</title><meta name="description" content="Your personal ChatGPT Chat Bot."/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="NextChat"/><meta name="apple-mobile-web-app-status-bar-style" content="default"/><script src="/serviceWorkerRegister.js" defer=""></script><script src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-814905f9f248c768.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/b0ebe1618ba2d39f.css\",\"style\"]\n0:\"$L2\"\n"])</script><script>self.__next_f.push([1,"3:I[47690,[],\"\"]\n5:I[5613,[],\"\"]\n6:I[31778,[],\"\"]\nc:I[48955,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWe"])</script><script>self.__next_f.push([1,"ight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"2:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b0ebe1618ba2d39f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L3\",null,{\"buildId\":\"MsvPY8vek74bYfWH8KMg8\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/v1beta/models/gemini-1.5-pro-latest:streamGenerateContent?alt=sse\",\"initialTree\":[\"\",{\"children\":[\"__PAGE__?{\\\"alt\\\":\\\"sse\\\"}\",{}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"__PAGE__\",{},[\"$L4\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null]]},[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"config\",\"content\":\"{\\\"version\\\":\\\"v2.13.0\\\",\\\"commitDate\\\":\\\"unknown\\\",\\\"commitHash\\\":\\\"unknown\\\",\\\"buildMode\\\":\\\"standalone\\\",\\\"isApp\\\":false,\\\"template\\\":\\\"{{input}}\\\"}\"}],[\"$\",\"meta\",null,{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\"}],[\"$\",\"link\",null,{\"rel\":\"manifest\",\"href\":\"/site.webmanifest\"}],[\"$\",\"script\",null,{\"src\":\"/serviceWorkerRegister.js\",\"defer\":true}]]}],[\"$\",\"body\",null,{\"children\":[[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"loadingScripts\":\"$undefined\",\"hasLoading\":false,\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}],false,\"$undefined\"]}]]}],null]],\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1\"}],[\"$\",\"meta\",\"1\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: light)\",\"content\":\"#fafafa\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"media\":\"(prefers-color-scheme: dark)\",\"content\":\"#151515\"}],[\"$\",\"meta\",\"3\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"4\",{\"children\":\"NextChat\"}],[\"$\",\"meta\",\"5\",{\"name\":\"description\",\"content\":\"Your personal ChatGPT Chat Bot.\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"7\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"NextChat\"}],[\"$\",\"meta\",\"8\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"default\"}]]\n"])</script><script>self.__next_f.push([1,"4:null\n"])</script><script>self.__next_f.push([1,""])</script></body></html>
alltobebetter commented 1 month ago

所以说googol_url不填就行?但是我这还是不行昂:( chat.suaolin.one 这是我的网站的地址 image 这是配置

fishredleung commented 1 month ago

刚刚在app.nextchat.dev测试了,未复现问题

image

image

這個custom endpoint 可以在environment_variables 裏面加入的嗎

Issues-translate-bot commented 1 month ago

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


刚刚在app.nextchat.dev测试了,未复现问题

Inr5CCI6IKPxvcj9.eyjpc3MIIIJNAXRDWIUY29TIIWIYXVKICICMF3LMDDGH1YNV 6MTCYMDK0NTI4OCwicgf0ACI6I8xodi2Njg1Lzm0odexnty3nyymmzlota3yy00 1m0luhnqumtu0hbmju2jlgtqw16lunyzwrlrPyPyw9QutjqvzdttttfnbntnQuus0wkemkyymdi0mdcxncuyrnvzlvhc3Qtmsmsuyrnmzjtjgyxdznf9yzxf1zxn 0jlgtqw16lurhdgu9mjaynda3mtrumdgymti4wizeyluftei1fehbpcmvzptmm Yjfjyjwotazyjvjmy2nnotviztexmdzjni5nde1nszyluftei1tawduuzwswfkzxjzpwhvc3QMywn0B3jfawq9mczrzrzrfawq9mcZyzyzvvx2LKPTAFQ.AR XBTVVFQPWAVSZCCCXQL4QrwHT7KMBKGINOFRS)

Inr5CCI6IKPxvcj9.eyjpc3MIIIJNAXRDWIUY29TIIWIYXVKICICMF3LMDDGH1YNV 6MTCYMDK0NTI4OCwicgf0ACI6I8xodi2Njg1Lzm0odexNTCXMC00ZMU1NZRJNI 1BV1M0LUHNQUMU0HBMJU2JLGTTQW16LUNYZWRLBNRPYW9QUTJQVZDTTTTTTFNBNBNTNQUUS0WKEMKYMDI0MDCXNCUYRNVZLVHC3QTMSUYRNMZJ The Zxn0jlgtqw16lurhdgu9mjaynda3mtrumdgymti4wizeyluftei1fehbpcmvzptm Nimzvhzjizmzy0zjrhytmwztyxmzlmzmizyjywytuxnmewmszyZyluftei1tawooduzwrizwfkzxjzpwhvc3Qmywn0B3jfawq9MCZRZRZRZXLFAQ9MCZYZXBX2LKPTAFQ .Gpsb6ASLQ4KYRHVCRD_OOQAPC1W4ZIWE00VK04_DMGA)

這個custom endpoint 可以在environment_variables 裏面加入的嗎