[Feature Request] 额外的自定义API请求参数
🥰 需求描述
对于一些渠道的API,可能会有默认选项之外的API请求的参数需求,例如当我使用Ollama API时,需要添加num_ctx参数来设置模型的上下文窗口,否则模型默认只有2k或1k tokens。
🧐 解决方案
添加一个textarea 让用户可以输入自定义的额外的请求参数,例如
num_ctx: 32768,
num_predict: 1000
或者
options: {
num_ctx: 32768,
num_predict: 1000
}
这两种格式分别对应经过转换成OpenAI格式的API请求格式,以及ollama原生的REST API 请求格式,下图可作为参考
📝 补充信息
Anyway,这样可以让用户在设置API请求参数的时候有更多的自由度 No response
Bot detected the issue body's language is not English, translate it automatically.
Title: [Feature Request] Additional custom API request parameters
🥰 Description of requirements
For some channel APIs, there may be parameter requirements for API requests other than the default options. For example, when I use the Ollama API, I need to add the num_ctx parameter to set the context window of the model. Otherwise, the model only has 2k or 1k tokens by default.
🧐 Solution
Add a textarea to allow users to enter custom additional request parameters, such as
num_ctx: 32768
num_predict: 1000
or
options: {
num_ctx: 32768,
num_predict: 1000
}
These two formats respectively correspond to the API request format converted into OpenAI format, and ollama's native REST API request format.
📝 Supplementary information
No response
双手附议。这个需求确实存在,比如baichuan的websearch字段,或者自己部署的接口实现的额外字段。如果可以增加这个功能的话,可以更方便地广泛尝试模型能力,尤其对于开发者群体来讲可以借助nextchat快速完成模型部署和调试的工作,希望开发者可以考虑增加这个功能。🙏
Bot detected the issue body's language is not English, translate it automatically.
Hands seconded. This requirement does exist, such as the websearch field of Baichuan, or the additional field implemented by the interfaces deployed by itself. If this function can be added, it will be more convenient to extensively try out model capabilities. Especially for the developer community, they can use nextchat to quickly complete model deployment and debugging. I hope developers can consider adding this function. 🙏
赞同。譬如,qwen-plus通过在body中设置参数enable_search=true,可以联网搜索。
这是个非常实用的功能。
Bot detected the issue body's language is not English, translate it automatically.
Agree. For example, qwen-plus can search online by setting the parameter enable_search=true in body.
This is a very practical function.