Giter Club home page Giter Club logo

Comments (3)

Issues-translate-bot avatar Issues-translate-bot commented on June 22, 2024

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


Title: [Feature Request]: Select the request format based on the model service provider + model name, rather than simply relying on the model name

Problem Description

There are the following scenarios:
Get the gemini-pro model of the openai request format through one-api, that is, the request format is similar:

POST {{one_base}}/v1/chat/completions
Content-Type: application/json
Authorization: Bearer {{one_key}}

{
  "model": "gemini-pro",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "hello"
    }
  ],
  "stream": true
}

If you fill in one_base as the custom endpoint of openai, fill in one_key, and the custom model gemini-pro, you will still be prompted to configure Google as the model service provider.

image

I believe there are many similar situations. In fact, if you transfer the API through one_api, you can easily implement multi-endpoint and multi-key polling using the openai API client. Just make sure that the API format that makes the request is not simply distinguished by the model name.

Solution Description

My solution to this problem is:

  1. Differentiate custom model settings. Each model service provider can configure corresponding custom models.
  2. Use model service provider + model name to uniquely describe the request format allowed by a model.
  3. The existing image recognition function can distinguish based on the model name, and the model service provider only distinguishes the request format.
  4. Determine the model name and request format (OpenAI/Google/Azure, etc.) based on the model name (service provider) selected by the user

Alternatives Considered

No response

Additional Context

No response

from chatgpt-next-web.

GrayXu avatar GrayXu commented on June 22, 2024

可以one-api里设置别名,next-web里再设置回显示名。

from chatgpt-next-web.

Issues-translate-bot avatar Issues-translate-bot commented on June 22, 2024

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


You can set the alias in one-api, and then set the display name back in next-web.

from chatgpt-next-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.