Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何使用v2.13.0的自定义模型功能(how to use 2.13.0 multi models) #5001

Open
lloydzhou opened this issue Jul 14, 2024 · 21 comments
Labels
documentation Improvements or additions to documentation

Comments

@lloydzhou
Copy link
Member

  1. 在v2.13.0版本扩展了CUSTOM_MODELS支持的语法

支持通过@指定provider,支持通过=指定deploy_name

  1. 解决Azure和OpenAI的模型不能共存的问题

+gpt-3.5-turbo@openai,+gpt-3.5-turbo@azure=gpt-3.5
以上配置会分别展示两个模型gpt-3.5-turbo(OpenAI)以及gpt-3.5(Azure)
并且使用Azure部署的gpt-3.5-turbo模型会把请求发送到deploy_name=gpt-3.5这个部署的服务上面

  1. 新增使用字节跳动提供的豆包模型的时候定义deploy_id

+Doubao-lite-4k@bytedance=ep-2024xxxx-xxx
以上配置会新增一个Doubao-lite-4k(ByteDance)的模型,当选择这个模型的时候,会将请求发送到ep-2024xxxx-xxx这个deploy-id服务上面

  1. 支持自定义厂商发布的不在内置模型列表中的新模型

假如openai发布了gpt-4.5,但是nextchat未及时发布新版
可以配置+gpt-4.5@OpenAI,模型列表会新增gpt-4.5(OpenAI)选项,并且按openai的消息格式发送请求

  1. 考虑到一些厂商做中转的时候会将多家厂商的模型都按OpenAI的格式做转发,也可以通过CUSTOM_MODELS配置使用:

例如,厂商同时中转了gpt-3.5-turboclaude-2.1,都走兼容openai的格式
配置+gpt-3.5-turbo@OpenAI,+claude-2.1@OpenAI(这里使用OpenAI而不是openai代表不是内置的服务商列表,只是符合OpenAI的消息格式)
会新增gpt-3.5-turbo(OpenAI)claude-2.1(OpenAI)两个模型选项。请求都会发送到/api/openai/*
这个时候可以在.env通过配置BASE_URL+OPENAI_API_KEY的模式,或者签到配置自定义接口走这家中转供应商的服务

@nextchat-manager
Copy link

Please follow the issue template to update title and description of your issue.

@Issues-translate-bot
Copy link

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


Title: How to use the custom model function of v2.13.0 (how to use 2.13.0 multi models)

  1. The syntax supported by CUSTOM_MODELS has been expanded in version v2.13.0

Supports specifying provider through @, and supports specifying deploy_name through =

  1. Solve the problem that Azure and OpenAI models cannot coexist

+gpt-3.5-turbo@openai,+gpt-3.5-turbo@azure=gpt-3.5
The above configuration will display two models gpt-3.5-turbo(OpenAI) and gpt-3.5(Azure) respectively
And using the gpt-3.5-turbo model deployed by Azure will send the request to the deployed service deploy_name=gpt-3.5

  1. Added the definition of deploy_id when using the beanbao model provided by ByteDance.

+Doubao-lite-4k@bytedance=ep-2024xxxx-xxx
The above configuration will add a Doubao-lite-4k(ByteDance) model. When this model is selected, the request will be sent to the ep-2024xxxx-xxx deploy-id service

  1. Support new models released by custom manufacturers that are not in the built-in model list

If openai releases gpt-4.5, but nextchat does not release the new version in time
You can configure +gpt-4.5@OpenAI, the gpt-4.5(OpenAI) option will be added to the model list, and the request will be sent according to the message format of openai

  1. Considering that some manufacturers will forward models from multiple manufacturers according to the OpenAI format when transferring, they can also be configured and used through CUSTOM_MODELS:

For example, the manufacturer forwarded gpt-3.5-turbo and claude-2.1 at the same time, both in formats compatible with openai.
Configure +gpt-3.5-turbo@OpenAI,+claude-2.1@OpenAI (the use of OpenAI instead of openai here means that it is not a built-in service provider list, but only conforms to the message format of OpenAI)
Two new model options, gpt-3.5-turbo(OpenAI) and claude-2.1(OpenAI), will be added. Requests will be sent to /api/openai/*
At this time, you can configure the BASE_URL+OPENAI_API_KEY mode in .env, or sign in to configure a custom interface to use the services of this transit provider

@siwuxei
Copy link

siwuxei commented Jul 14, 2024

感谢提供的帮助。有个疑问,怎么对模型进行排序,比如自定义模型排列在最前面。

image

@Issues-translate-bot
Copy link

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


Thanks for the help. I have a question, how to sort the models, such as custom models at the front.

image

@ice-lemon
Copy link

ice-lemon commented Jul 15, 2024

另外想问一下如何支持多个相同的自定义部署呢 比如Azure #4398
当前已知的是可以支持相同的资源使用不同的部署,但是无法使用跨区域资源的不同部署

@Issues-translate-bot
Copy link

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


Also, I would like to ask how to support multiple custom deployments #4398

@aiyurui
Copy link

aiyurui commented Jul 15, 2024

docker compose部署发现按描述配置:+gpt-3.5-turbo@azure=gpt-3.5,无法正常生效,没有配置任何openai的参数,但默认走openai导致返回错误

@Issues-translate-bot
Copy link

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


The docker compose deployment found that it was configured as described: +gpt-3.5-turbo@azure=gpt-3.5, which could not take effect normally. No openai parameters were configured, but openai was used by default.

@kele527
Copy link

kele527 commented Jul 20, 2024

自定义模型的url,在env中是配置哪个变量?

@Issues-translate-bot
Copy link

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


Which variable is configured in env for the custom model url?

@huelsgp27
Copy link

问答时报错:Unknown parameter: 'path'
chatgpt-next的配置: gpt-4o@openai,代理地址是one-api,one-api对接的是azure的api。

请求one-api的参数:
{
"messages": [
{
"role": "system",
"content": "\nYou are ChatGPT, a large language model trained by OpenAI.\nKnowledge cutoff: 2023-10\nCurrent model: gpt-4o\nCurrent time: Mon Jul 22 2024 16:32:39 GMT+0800 (中国标准时间)\nLatex inline: \(x^2\) \nLatex block: $$e=mc^2$$\n\n"
},
{
"role": "user",
"content": "你好呀,gpt"
}
],
"stream": true,
"model": "gpt-4o",
"temperature": 0.5,
"presence_penalty": 0,
"frequency_penalty": 0,
"top_p": 1,
"path": "completions"
}

@Issues-translate-bot
Copy link

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


Error during Q&A: Unknown parameter: 'path'
The configuration of chatgpt-next: gpt-4o@openai, the proxy address is one-api, and one-api is connected to the azure api.

Parameters for requesting one-api:
{
"messages": [
{
"role": "system",
"content": "\nYou are ChatGPT, a large language model trained by OpenAI.\nKnowledge cutoff: 2023-10\nCurrent model: gpt-4o\nCurrent time: Mon Jul 22 2024 16:32:39 GMT+0800 (China Standard time)\nLatex inline: \(x^2\) \nLatex block: $$e=mc^2$$\n\n"
},
{
"role": "user",
"content": "Hello, gpt"
}
],
"stream": true,
"model": "gpt-4o",
"temperature": 0.5,
"presence_penalty": 0,
"frequency_penalty": 0,
"top_p": 1,
"path": "completions"
}

@geek2024811
Copy link

谢谢,解决了第三方api的问题

@Issues-translate-bot
Copy link

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


Thank you, the problem with the third-party API has been solved

@hp0912
Copy link

hp0912 commented Jul 30, 2024

弱弱地问下,插件里面的Artifacts是干嘛的,谷歌、百度了一遍,还是没看明白。。。

@Issues-translate-bot

This comment was marked as duplicate.

@wenzhaoabc
Copy link

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

I asked weakly what the Artifacts in the plug-in are for. I searched Google and Baidu, but I still don’t understand. . .

适用Claude模型的一个插件,具体可以看一下官方的说明
https://www.anthropic.com/news/claude-3-5-sonnet

@Qshuangyan
Copy link

我在使用该项目调用自己微调的大模型接口时,输出的token被限制在了100,请问 我应该如何修改。

@Issues-translate-bot
Copy link

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


When I use this project to call the large model interface I fine-tuned, the output token is limited to 100. How should I modify it?

@JIeJaitt
Copy link

@lloydzhou v2.15.5版本尝试+claude-3-5-sonnet-20240620@OpenAI,+claude-3-haiku-20240307@OpenAI ,在OpenAI渠道下没看到相关模型选项

@Issues-translate-bot
Copy link

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


@lloydzhou v2.15.5 version tried +claude-3-5-sonnet-20240620@OpenAI, +claude-3-haiku-20240307@OpenAI, but did not see the relevant model options under the OpenAI channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

13 participants