ChatGPTNextWeb / ChatGPT-Next-Web

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

[Bug] Windows 本地客户端使用 Gemini Pro 模型时报错 #3735

Open taurusxin opened 6 months ago

taurusxin commented 6 months ago

Describe the bug 使用 Gemini Pro 模型时,会出现如下报错

{
  "error": true,
  "message": "Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON"
}

To Reproduce Steps to reproduce the behavior: 使用 Gemini Pro 模型时

Expected behavior 期望出现正确的相应,在 Web 端没有问题

Screenshots

PixPin_2024-01-02_10-27-09

Deployment

Desktop (please complete the following information):

Additional Logs Add any logs about the problem here.

Issues-translate-bot commented 6 months ago

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


Title: [Bug] An error occurs when using Gemini Pro model on Windows local client

H0llyW00dzZ commented 6 months ago

been known this bug

H0llyW00dzZ commented 6 months ago

it's because of this

image

in client if using that path it's become localhost

taurusxin commented 6 months ago

been known this bug

Thank you for your work, so this is your fork of NextChat and has not been merge into the main repo?

H0llyW00dzZ commented 6 months ago

been known this bug

Thank you for your work, so this is your fork of NextChat and has not been merge into the main repo?

later, because in a fix temporary it used a default cors host and currently can't be customize like ChatGPT LLM Api by @Yidadaa which can be customize by using custom end point for routing it such as proxy

ShinChven commented 6 months ago

我现在把 gemini pro 丢到 One API 里面,当作 openai 的 model 使用,没什么问题,非常丝滑。 NextChat 的 gemini pro 兼容目前不太稳定。

Issues-translate-bot commented 6 months ago

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


I now throw gemini pro into One API and use it as an openai model. There is no problem and it is very smooth. NextChat's gemini pro compatibility is currently unstable.

onlyhuman028 commented 6 months ago

被收购后,这么个简单问题都没人搞定么?连个正常的回复都没有

Issues-translate-bot commented 6 months ago

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


After being acquired, has no one solved such a simple problem? Not even a normal reply

kitaev-chen commented 6 months ago

我现在把 gemini pro 丢到 One API 里面,当作 openai 的 model 使用,没什么问题,非常丝滑。 NextChat 的 gemini pro 兼容目前不太稳定。

请问以下具体操作细节?不是太了解 One API

Issues-translate-bot commented 6 months ago

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


I now throw gemini pro into One API and use it as an openai model. There is no problem and it is very smooth. NextChat's gemini pro compatibility is currently unstable.

Could you please tell me the following specific operation details? Don’t know much about One API

Barry04 commented 5 months ago

这个问题还没被解决吗?

Issues-translate-bot commented 5 months ago

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


Has this issue not been resolved yet?

ShinChven commented 5 months ago

One API 兼容的问题吗? 我提交issue的时候的时候,maintainer回都不回就直接把我的issue关了。

Issues-translate-bot commented 5 months ago

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


One API compatibility issues? When I submitted an issue, the maintainer closed my issue without replying.

kitaev-chen commented 5 months ago

可以参考这个issue https://github.com/songquanpeng/one-api/issues/887

ShinChven commented 5 months ago

可以参考这个issue songquanpeng/one-api#887

我之前是建了一个自定义的模型叫 google-gemini-pro 然后把 google-gemini-pro 的请求重定向到 gemini-pro 这样就可以使用用 ONE API 的 OpenAI 协议接口调用 gemini-pro 了。

Issues-translate-bot commented 5 months ago

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


You can refer to this issue songquanpeng/one-api#887

I previously built a custom model called google-gemini-pro and then redirected the request of google-gemini-pro to gemini-pro so that I can call gemini-pro using the OpenAI protocol interface of ONE API.

BLACKFTVV commented 5 months ago

我现在把gemini pro丢到一个API里面,目前openai的模型使用,没什么问题,非常丝滑 。NextChat的gemini pro兼容目前不太稳定。

怎样操作啊?

Issues-translate-bot commented 5 months ago

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


I now put gemini pro into an API and use it with the current openai model. There is no problem and it is very smooth. NextChat's gemini pro compatibility is currently unstable.

How to operate?

openmynet commented 1 month ago

在未修复的本地客户端版本终端地址URL格式为: https://gemini.you.proxy/v1beta/models/gemini-pro:generateContent https://{domain}/v1beta/models/{model}:generateContent

模型地址:https://{domain}/v1beta/models or https://generativelanguage.googleapis.com/v1beta/models