ChatGPTNextWeb / ChatGPT-Next-Web

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

GEMINI-pro 希望支持one-api #3793

Open kuziTony opened 6 months ago

kuziTony commented 6 months ago

如果输入模型gemini-pro会自动识别为google的模型,在后端部署了one-api被转化成了标准的openai的接口,期望可以自定义模型的时候输入模型名称,自定义选择是google或者是openai或者是微软。

Issues-translate-bot commented 6 months ago

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


Title: GEMINI-pro hopes to support one-api

If you enter the model gemini-pro will automatically recognize it as a Google model. One-api is deployed on the backend and converted into a standard openai interface. If you want to customize the model, enter the model name. The custom choice is google or openai or Microsoft.

H0llyW00dzZ commented 6 months ago

currently it's still not supported yet to be honest its hard for front-end, unlike in back-end so easy even I was made this hahaha

https://github.com/H0llyW00dzZ/GoGenAI-Terminal-Chat

iamsad3508 commented 6 months ago

只能先参照这个issue用吧。https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/3693

Issues-translate-bot commented 6 months ago

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


You can only refer to this issue first. https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/3693

QAbot-zh commented 5 months ago

currently it's still not supported yet to be honest its hard for front-end, unlike in back-end so easy even I was made this hahaha

https://github.com/H0llyW00dzZ/GoGenAI-Terminal-Chat

Regarding this issue, I have a suggestion that users should be allowed to set the communication type for the model. When users add a model through CUSTOM_MODEL, they can add the type setting by using #(or other identifier), such as model#type, gemini-pro#OpenAI. If not added, it defaults to the OpenAI endpoint.

poweroc commented 3 months ago

改一下api.ts文件就行, 两个地方

  1. 下面这里的判断注释掉 constructor(provider: ModelProvider = ModelProvider.GPT) { // if (provider === ModelProvider.GeminiPro) { // this.llm = new GeminiProApi(); // return; // } this.llm = new ChatGPTApi(); }
  2. 下面isGoogle直接赋值false // const isGoogle = modelConfig.model.startsWith("gemini"); const isGoogle = false; image