[Feature] 设置默认模型 Custom DEFAULT Model Support
支持设置默认模型
我已经搜索过了 #3384 等相关 issue,其中 CUSTOM_MODELS 并不是我想要的,即我并不希望通过减少可用模型的方式指定默认模型。
目前我使用的一种野蛮的方法:
cd /tmp
git clone https://github.com/Yidadaa/ChatGPT-Next-Web
cd ChatGPT-Next-Web
sed -i 's/model: "gpt-3.5-turbo" as ModelType,/model: "gpt-4-1106-preview" as ModelType,/g' ./app/store/config.ts
sed -i 's/export const SUMMARIZE_MODEL = "gpt-3.5-turbo";/export const SUMMARIZE_MODEL = "gpt-4-1106-preview";/g' ./app/constant.ts # may not be necessary
docker build --pull -t kumatea/gpt-web --push .
docker run -d -p 3000:3000 -e OPENAI_API_KEY=sk-xxxx -e CODE=your-password kumatea/gpt-web
启动后可以发现默认模型已经切换。
希望后续得到官方支持。
Support Settings of Custom DEFAULT Model
I've searched Custom Default Model related issues like #3384 and confirmed those are not as I expected, that I would not like to define the default model by decreasing available choices.
Currently I found a not elegant but working way: (see code above)
After container created the desired default model has been selected.
I wish this option could be support officially later.
Bot detected the issue body's language is not English, translate it automatically.
Title: [Feature] Set the default model Custom DEFAULT Model Support
this one I recommended better summarizing depends of model selected so you don't have to do this in bash
sed -i 's/export const SUMMARIZE_MODEL = "gpt-3.5-turbo";/export const SUMMARIZE_MODEL = "gpt-4-1106-preview";/g' ./app/constant.ts # may not be necessary
here is example how it work you can do test in my site: https://chatgpt.btz.sh/
another proof while summarizing using selected model
source: https://github.com/Yidadaa/ChatGPT-Next-Web/discussions/3416
other (this a wild)
[!NOTE]
screenshot other it's context AI fixing a syntax for k8s
我也需要这个功能,希望后续能够通过环境变量切换默认模型。
Bot detected the issue body's language is not English, translate it automatically.
I also need this function and hope to be able to switch the default model through environment variables in the future.
所以后续有这个计划吗?设置一个环境变量来改变模型的优先级,该环境变量用逗号分割,从前往后,如果模型存在于CUSTOM_MODELS就作为默认模型,否者就继续判断。
Bot detected the issue body's language is not English, translate it automatically.
So is there any follow-up plan? Set an environment variable to change the priority of the model. The environment variable is separated by commas. From front to back, if the model exists in CUSTOM_MODELS, it will be used as the default model. Otherwise, the judgment will continue.
any update? It is helpful.
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/4545 感谢社区小伙伴的贡献,目前最新版本已经支持了通过环境变量自定义DEFAULT_MODEL
Bot detected the issue body's language is not English, translate it automatically.
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/4545 Thanks to the contributions of community partners, the latest version now supports customizing DEFAULT_MODEL through environment variables.