ChatGPTNextWeb / ChatGPT-Next-Web

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

[Bug] Gemini 未正确拼接 #4944

Closed iamananba closed 1 month ago

iamananba commented 1 month ago

Bug Description

配置Gemini后。gemini机器人发送的请求路径不正确(只有根路径)

Steps to Reproduce

  1. web方式打开项目
  2. 设置中点开自定义接口,选择google
  3. 终端地址输入:https://gemini.xx.cn
  4. 输入密钥
  5. 回到聊天页面,打开控制台。
  6. 选择gemini-pro-1.5-latest机器人,聊一句话
  7. 请求错误,请求网址为: https://gemini.xx.cn/?alt=sse 目标应该为 https://gemini.xx.cn/v1beta/models/gemini-1.5-pro-latest:generateContent
  8. 回到设置修改版本号为v1beta,抓包。 请求路径依然为https://gemini.xx.cn/?alt=sse,无任何变化

Expected Behavior

请求路径正确拼接 v1beta/models/gemini-1.5-pro-latest:generateContent

Screenshots

No response

Deployment Method

Desktop OS

window 11

Desktop Browser

chrome

Desktop Browser Version

126

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: [Bug] Gemini is not spliced ​​correctly

lloydzhou commented 1 month ago

@iamananba

最新的main分支应该已经修复当前问题。 不过,自定义接口处不能直接填写官方的地址(可使用/api/google做转发)。因为官方地址不支持跨域。

Issues-translate-bot commented 1 month ago

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


@iamananba

The latest main branch should have the current issue fixed. However, the official address cannot be directly filled in at the custom interface (/api/google can be used for forwarding). Because the official address does not support cross-domain.