@lobehub/chat 0.147.7 → 0.147.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +2 -2
  3. package/docs/self-hosting/advanced/model-list.mdx +48 -0
  4. package/docs/self-hosting/advanced/model-list.zh-CN.mdx +46 -0
  5. package/docs/self-hosting/environment-variables/basic.mdx +11 -0
  6. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +11 -0
  7. package/docs/self-hosting/environment-variables/model-provider.mdx +82 -70
  8. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +80 -70
  9. package/docs/self-hosting/examples/azure-openai.mdx +6 -2
  10. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +3 -1
  11. package/docs/self-hosting/examples/ollama.mdx +0 -2
  12. package/package.json +1 -1
  13. package/src/app/api/config/__snapshots__/route.test.ts.snap +45 -43
  14. package/src/app/api/config/parseDefaultAgent.test.ts +1 -1
  15. package/src/app/api/config/route.test.ts +2 -10
  16. package/src/app/api/config/route.ts +37 -16
  17. package/src/app/api/openai/createBizOpenAI/index.ts +3 -13
  18. package/src/app/api/openai/images/route.ts +1 -1
  19. package/src/app/api/openai/stt/route.ts +1 -1
  20. package/src/app/api/openai/tts/route.ts +1 -1
  21. package/src/app/chat/(desktop)/features/ChatHeader/Tags.tsx +1 -1
  22. package/src/app/chat/(desktop)/features/ChatInput/Footer/index.tsx +1 -1
  23. package/src/app/settings/llm/Azure/index.tsx +2 -2
  24. package/src/app/settings/llm/components/ProviderModelList/ModelFetcher.tsx +7 -3
  25. package/src/app/settings/llm/components/ProviderModelList/Option.tsx +3 -3
  26. package/src/app/settings/llm/components/ProviderModelList/index.tsx +4 -4
  27. package/src/config/__tests__/server.test.ts +0 -12
  28. package/src/config/server/provider.ts +12 -8
  29. package/src/features/AgentSetting/AgentConfig/ModelSelect.tsx +5 -2
  30. package/src/features/AgentSetting/AgentPrompt/TokenTag.tsx +1 -1
  31. package/src/features/ChatInput/ActionBar/FileUpload.tsx +2 -2
  32. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +1 -1
  33. package/src/features/ChatInput/ActionBar/Token/index.tsx +1 -1
  34. package/src/features/ChatInput/ActionBar/Tools/index.tsx +1 -1
  35. package/src/features/ChatInput/useChatInput.ts +1 -1
  36. package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +3 -3
  37. package/src/features/ModelSwitchPanel/index.tsx +5 -2
  38. package/src/migrations/FromV3ToV4/fixtures/openai-output-v4.json +1 -3
  39. package/src/migrations/FromV3ToV4/fixtures/openrouter-output-v4.json +2 -6
  40. package/src/migrations/FromV3ToV4/index.ts +8 -2
  41. package/src/services/_auth.ts +1 -3
  42. package/src/services/chat.ts +4 -5
  43. package/src/store/global/slices/settings/actions/llm.test.ts +2 -2
  44. package/src/store/global/slices/settings/actions/llm.ts +3 -3
  45. package/src/store/global/slices/settings/selectors/modelConfig.test.ts +0 -88
  46. package/src/store/global/slices/settings/selectors/modelConfig.ts +17 -81
  47. package/src/store/global/slices/settings/selectors/modelProvider.test.ts +99 -15
  48. package/src/store/global/slices/settings/selectors/modelProvider.ts +94 -30
  49. package/src/store/global/slices/settings/selectors/settings.ts +7 -1
  50. package/src/types/serverConfig.ts +1 -0
  51. package/src/types/settings/modelProvider.ts +0 -2
  52. package/src/utils/parseModels.test.ts +146 -0
  53. package/src/utils/parseModels.ts +67 -15
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.147.9](https://github.com/lobehub/lobe-chat/compare/v0.147.8...v0.147.9)
6
+
7
+ <sup>Released on **2024-04-12**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix custom model list not display correctly.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix custom model list not display correctly, closes [#2009](https://github.com/lobehub/lobe-chat/issues/2009) ([7d0e220](https://github.com/lobehub/lobe-chat/commit/7d0e220))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ### [Version 0.147.8](https://github.com/lobehub/lobe-chat/compare/v0.147.7...v0.147.8)
31
+
32
+ <sup>Released on **2024-04-12**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: Update README.md.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Code refactoring
44
+
45
+ - **misc**: Update README.md ([44b5a23](https://github.com/lobehub/lobe-chat/commit/44b5a23))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.147.7](https://github.com/lobehub/lobe-chat/compare/v0.147.6...v0.147.7)
6
56
 
7
57
  <sup>Released on **2024-04-12**</sup>
package/README.md CHANGED
@@ -123,12 +123,12 @@ We have implemented support for the following model service providers:
123
123
  - **AWS Bedrock**: Integrated with AWS Bedrock service, supporting models such as **Claude / LLama2**, providing powerful natural language processing capabilities. [Learn more](https://aws.amazon.com/cn/bedrock)
124
124
  - **Anthropic (Claude)**: Accessed Anthropic's **Claude** series models, including Claude 3 and Claude 2, with breakthroughs in multi-modal capabilities and extended context, setting a new industry benchmark. [Learn more](https://www.anthropic.com/claude)
125
125
  - **Google AI (Gemini Pro, Gemini Vision)**: Access to Google's **Gemini** series models, including Gemini and Gemini Pro, to support advanced language understanding and generation. [Learn more](https://deepmind.google/technologies/gemini/)
126
- - **ChatGLM**: Added the **ChatGLM** series models from Zhipuai (GLM-4/GLM-4-vision/GLM-3-turbo), providing users with another efficient conversation model choice. [Learn more](https://www.zhipuai.cn/)
127
- - **Moonshot AI (Dark Side of the Moon)**: Integrated with the Moonshot series models, an innovative AI startup from China, aiming to provide deeper conversation understanding. [Learn more](https://www.moonshot.cn/)
128
126
  - **Groq**: Accessed Groq's AI models, efficiently processing message sequences and generating responses, capable of multi-turn dialogues and single-interaction tasks. [Learn more](https://groq.com/)
129
127
  - **OpenRouter**: Supports routing of models including **Claude 3**, **Gemma**, **Mistral**, **Llama2** and **Cohere**, with intelligent routing optimization to improve usage efficiency, open and flexible. [Learn more](https://openrouter.ai/)
130
128
  - **01.AI (Yi Model)**: Integrated the 01.AI models, with series of APIs featuring fast inference speed, which not only shortened the processing time, but also maintained excellent model performance. [Learn more](https://01.ai/)
131
129
  - **Together.ai**: Over 100 leading open-source Chat, Language, Image, Code, and Embedding models are available through the Together Inference API. For these models you pay just for what you use. [Learn more](https://www.together.ai/)
130
+ - **ChatGLM**: Added the **ChatGLM** series models from Zhipuai (GLM-4/GLM-4-vision/GLM-3-turbo), providing users with another efficient conversation model choice. [Learn more](https://www.zhipuai.cn/)
131
+ - **Moonshot AI (Dark Side of the Moon)**: Integrated with the Moonshot series models, an innovative AI startup from China, aiming to provide deeper conversation understanding. [Learn more](https://www.moonshot.cn/)
132
132
 
133
133
  At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/1284).
134
134
 
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: Customizing Provider Model List in LobeChat for Deployment
3
+ description: >-
4
+ Learn how to customize the model list in LobeChat for deployment with the
5
+ syntax and extension capabilities
6
+ tags:
7
+ - LobeChat
8
+ - model customization
9
+ - deployment
10
+ - extension capabilities
11
+ ---
12
+
13
+ # Model List
14
+
15
+ LobeChat supports customizing the model list during deployment. You can use `+` to add a model, `-` to hide a model, and use `model name=display name<extension configuration>` to customize the display name of a model, separated by English commas. The basic syntax is as follows:
16
+
17
+ ```shell
18
+ id=displayName < maxToken:vision:fc:file > ,model2,model3
19
+ ```
20
+
21
+ For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
22
+
23
+ In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only enabling `gpt-3.5-turbo`.
24
+
25
+ ## Extension Capabilities
26
+
27
+ Considering the diversity of model capabilities, we started to add extension configuration in version `0.147.8`, with the following rules:
28
+
29
+ ```shell
30
+ id=displayName<maxToken:vision:fc:file>
31
+ ```
32
+
33
+ The first value in angle brackets is designated as the `maxToken` for this model. The second value and beyond are the model's extension capabilities, separated by colons `:`, and the order is not important.
34
+
35
+ Examples are as follows:
36
+
37
+ - `chatglm-6b=ChatGLM 6B<4096>`: ChatGLM 6B, maximum context of 4k, no advanced capabilities;
38
+ - `spark-v3.5=讯飞星火 v3.5<8192:fc>`: Xunfei Spark 3.5 model, maximum context of 8k, supports Function Call;
39
+ - `gemini-pro-vision=Gemini Pro Vision<16000:vision>`: Google Vision model, maximum context of 16k, supports image recognition;
40
+ - `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`, hacked version of ChatGPT Plus web, context of 128k, supports image recognition, Function Call, file upload.
41
+
42
+ Currently supported extension capabilities are:
43
+
44
+ | --- | Description |
45
+ | -------- | -------------------------------------------------------- |
46
+ | `fc` | Function Calling |
47
+ | `vision` | Image Recognition |
48
+ | `file` | File Upload (a bit hacky, not recommended for daily use) |
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: LobeChat 自定义模型服务商模型列表及扩展能力配置
3
+ description: 了解如何在 LobeChat 中自定义模型列表以及扩展能力配置的基本语法和规则。
4
+ tags:
5
+ - LobeChat
6
+ - 自定义模型列表
7
+ - 扩展能力配置
8
+ - 模型展示名
9
+ - 模型能力
10
+ ---
11
+ # Model List
12
+
13
+ LobeChat 支持在部署时自定义模型列表,可以使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。通过 `<>` 来添加扩展配置。基本语法如下:
14
+
15
+ ```shell
16
+ id=displayName < maxToken:vision:fc:file > ,model2,model3
17
+ ```
18
+
19
+ 例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
20
+
21
+ 上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。
22
+
23
+ ## 扩展能力
24
+
25
+ 考虑到模型的能力多样性,我们在 `0.147.8` 版本开始增加扩展性配置,它的规则如下:
26
+
27
+ ```shell
28
+ id=displayName<maxToken:vision:fc:file>
29
+ ```
30
+
31
+ 尖括号第一个值约定为这个模型的 `maxToken` 。第二个及以后作为模型的扩展能力,能力与能力之间用冒号 `:` 作为分隔符,顺序不重要。
32
+
33
+ 举例如下:
34
+
35
+ - `chatglm-6b=ChatGLM 6B<4096>`:ChatGLM 6B,最大上下文 4k,没有高阶能力;
36
+ - `spark-v3.5=讯飞星火 v3.5<8192:fc>`:讯飞星火 3.5 模型,最大上下文 8k,支持 Function Call;
37
+ - `gemini-pro-vision=Gemini Pro Vision<16000:vision>`:Google 视觉模型,最大上下文 16k,支持图像识别;
38
+ - `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`,hack 的 ChatGPT Plus 网页版,上下 128k ,支持图像识别、Function Call、文件上传
39
+
40
+ 目前支持的扩展能力有:
41
+
42
+ | --- | 描述 |
43
+ | -------- | ------------------------------------ |
44
+ | `fc` | 函数调用(function calling) |
45
+ | `vision` | 视觉识别 |
46
+ | `file` | 文件上传(比较hack,不建议日常使用) |
@@ -27,6 +27,17 @@ LobeChat provides some additional configuration options during deployment, which
27
27
  - Default: -
28
28
  - Example: `awCTe)re_r74` or `rtrt_ewee3@09!`
29
29
 
30
+ ### `API_KEY_SELECT_MODE`
31
+
32
+ - Type:Optional
33
+ - Description:Controls the mode for selecting the API Key when multiple API Keys are available. Currently supports `random` and `turn`.
34
+ - Default:`random`
35
+ - Example:`random` or `turn`
36
+
37
+ When using the `random` mode, a random API Key will be selected from the available multiple API Keys.
38
+
39
+ When using the `turn` mode, the API Keys will be retrieved in a round-robin manner according to the specified order.
40
+
30
41
  ### `ENABLE_OAUTH_SSO`
31
42
 
32
43
  - Type: Optional
@@ -23,6 +23,17 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
23
23
  - 默认值:-
24
24
  - 示例:`awCTe)re_r74` or `rtrt_ewee3@09!`
25
25
 
26
+ ### `API_KEY_SELECT_MODE`
27
+
28
+ - 类型:可选
29
+ - 描述:用于控制多个 API Keys 时,选择 Key 的模式,当前支持 `random` 和 `turn`
30
+ - 默认值:`random`
31
+ - 示例:`random` 或 `turn`
32
+
33
+ 使用 `random` 模式下,将在多个 API Keys 中随机获取一个 API Key。
34
+
35
+ 使用 `turn` 模式下,将按照填写的顺序,轮训获取得到 API Key。
36
+
26
37
  ### `ENABLE_OAUTH_SSO`
27
38
 
28
39
  - 类型:可选
@@ -18,7 +18,7 @@ When deploying LobeChat, a rich set of environment variables related to model se
18
18
  ### `OPENAI_API_KEY`
19
19
 
20
20
  - Type: Required
21
- - Description: This is the API key you applied for on the OpenAI account page, you can check it out [here](openai-api-page)
21
+ - Description: This is the API key you applied for on the OpenAI account page, you can check it out [here](https://platform.openai.com/api-keys)
22
22
  - Default: -
23
23
  - Example: `sk-xxxxxx...xxxxxx`
24
24
 
@@ -51,7 +51,7 @@ Related discussions:
51
51
  ### `OPENAI_MODEL_LIST`
52
52
 
53
53
  - Type: Optional
54
- - Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas.
54
+ - Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]
55
55
  - Default: `-`
56
56
  - Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
57
57
 
@@ -61,57 +61,35 @@ You can find all current model names in [modelProviders](https://github.com/lobe
61
61
 
62
62
  ## Azure OpenAI
63
63
 
64
- If you need to use Azure OpenAI to provide model services, you can refer to the [Deploying with Azure OpenAI](../Deployment/Deploy-with-Azure-OpenAI.en-US.md) section for detailed steps. Here, we will list the environment variables related to Azure OpenAI.
65
-
66
- ### `API_KEY_SELECT_MODE`
67
-
68
- - Type:Optional
69
- - Description:Controls the mode for selecting the API Key when multiple API Keys are available. Currently supports `random` and `turn`.
70
- - Default:`random`
71
- - Example:`random` or `turn`
72
-
73
- When using the `random` mode, a random API Key will be selected from the available multiple API Keys.
74
-
75
- When using the `turn` mode, the API Keys will be retrieved in a round-robin manner according to the specified order.
76
-
77
- ### `USE_AZURE_OPENAI`
78
-
79
- - Type: Optional
80
- - Description: Set this value to `1` to enable Azure OpenAI configuration
81
- - Default: -
82
- - Example: `1`
64
+ If you need to use Azure OpenAI to provide model services, you can refer to the [Deploying with Azure OpenAI](/docs/self-hosting/examples/azure-openai) section for detailed steps. Here, we will list the environment variables related to Azure OpenAI.
83
65
 
84
66
  ### `AZURE_API_KEY`
85
67
 
86
- - Type: Optional
68
+ - Type: Required
87
69
  - Description: This is the API key you applied for on the Azure OpenAI account page
88
70
  - Default: -
89
71
  - Example: `c55168be3874490ef0565d9779ecd5a6`
90
72
 
91
- ### `AZURE_API_VERSION`
73
+ ### `AZURE_ENDPOINT`
92
74
 
93
- - Type: Optional
94
- - Description: The API version of Azure, following the format YYYY-MM-DD
95
- - Default: `2023-08-01-preview`
96
- - Example: `2023-05-15`, refer to [latest version](https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version)
97
-
98
- ## ZHIPU AI
75
+ - Type: Required
76
+ - Description: The endpoint of Azure OpenAI, you can find it in the Azure OpenAI account page
77
+ - Default: `-`
78
+ - Example: `https://docs-test-001.openai.azure.com`
99
79
 
100
- ### `ZHIPU_API_KEY`
80
+ ### `AZURE_API_VERSION`
101
81
 
102
82
  - Type: Required
103
- - Description: This is the API key you applied for in the ZHIPU AI service
104
- - Default: -
105
- - Example: `4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT`
83
+ - Description: The API version of Azure, following the format YYYY-MM-DD
84
+ - Default: `-`
85
+ - Example: `2023-02-01`, refer to [latest version](https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version)
106
86
 
107
- ## Moonshot AI
87
+ ### `AZURE_MODEL_LIST`
108
88
 
109
- ### `MOONSHOT_API_KEY`
110
-
111
- - Type: Required
112
- - Description: This is the API key you applied for in the Moonshot AI service
113
- - Default: -
114
- - Example: `Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=`
89
+ - Type: Optional
90
+ - Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deplymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]
91
+ - Default: `-`
92
+ - Example: `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>`
115
93
 
116
94
  ## Google AI
117
95
 
@@ -125,10 +103,26 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
125
103
  ### `GOOGLE_PROXY_URL`
126
104
 
127
105
  - Type: Optional
128
- - Description: If you manually configure the Google interface proxy, you can use this configuration item to override the default Google API request base URL
106
+ - Description: If you manually configure the Google API proxy, you can use this configuration item to override the default Google API request base URL
129
107
  - Default: `https://generativelanguage.googleapis.com`
130
108
  - Example: `https://api.genai.gd.edu.kg/google`
131
109
 
110
+ ## Anthropic AI
111
+
112
+ ### `ANTHROPIC_API_KEY`
113
+
114
+ - Type: Required
115
+ - Description: This is the API key you applied from Anthropic AI
116
+ - Default: -
117
+ - Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx`
118
+
119
+ ### `ANTHROPIC_PROXY_URL`
120
+
121
+ - Type: Optional
122
+ - Description: If you manually configure the Anthropic API proxy, you can use this configuration item to override the default Anthropic API request base URL
123
+ - Default: `https://api.anthropic.com`
124
+ - Example: `https://my-anthropic-proxy.com`
125
+
132
126
  ## AWS Bedrock
133
127
 
134
128
  ### `AWS_ACCESS_KEY_ID`
@@ -152,11 +146,43 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
152
146
  - Default: `us-east-1`
153
147
  - Example: `us-east-1`
154
148
 
149
+ ## OpenRouter AI
150
+
151
+ ### `OPENROUTER_API_KEY`
152
+
153
+ - Type: Required
154
+ - Description: This is the API key you applied for in the OpenRouter AI service
155
+ - Default: -
156
+ - Example: `sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
157
+
158
+ ### `OPENROUTER_MODEL_LIST`
159
+
160
+ - Type: Optional
161
+ - Description: Used to specify a custom OpenRouter model list. Model definition syntax rules see [model-list][model-list]
162
+ - Default: `-`
163
+ - Example: `-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta`
164
+
165
+ ## TogetherAI
166
+
167
+ ### `TOGETHERAI_API_KEY`
168
+
169
+ - Type: Required
170
+ - Description: This is the API key you applied for in the TogetherAI service
171
+ - Default: -
172
+ - Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
173
+
174
+ ### `TOGETHERAI_MODEL_LIST`
175
+
176
+ - Type: Optional
177
+ - Description: Used to specify a custom TogetherAI model list. Model definition syntax rules see [model-list][model-list]
178
+ - Default: `-`
179
+ - Example: `01-ai/yi-34b-chat`
180
+
155
181
  ## Ollama
156
182
 
157
183
  ### `OLLAMA_PROXY_URL`
158
184
 
159
- - Type: Optional
185
+ - Type: Required
160
186
  - Description: Used to enable the Ollama service, setting this will display optional open-source language models in the language model list and can also specify custom language models
161
187
  - Default: -
162
188
  - Example: `http://127.0.0.1:11434/v1`
@@ -164,27 +190,27 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
164
190
  ### `OLLAMA_MODEL_LIST`
165
191
 
166
192
  - Type: Optional
167
- - Description: Used to customize your own language models
193
+ - Description: Used to specify a custom Ollama language model. Model definition syntax rules see [model-list][model-list]
168
194
  - Default: -
169
195
  - Example: `llama2:7B`
170
196
 
171
- ## Perplexity AI
197
+ ## Moonshot AI
172
198
 
173
- ### `PERPLEXITY_API_KEY`
199
+ ### `MOONSHOT_API_KEY`
174
200
 
175
201
  - Type: Required
176
- - Description: This is the API key you applied from Perplexity AI
202
+ - Description: This is the API key you applied for in the Moonshot AI service
177
203
  - Default: -
178
- - Example: `pplx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
204
+ - Example: `Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=`
179
205
 
180
- ## Anthropic AI
206
+ ## Perplexity AI
181
207
 
182
- ### `ANTHROPIC_API_KEY`
208
+ ### `PERPLEXITY_API_KEY`
183
209
 
184
210
  - Type: Required
185
- - Description: This is the API key you applied from Anthropic AI
211
+ - Description: This is the API key you applied from Perplexity AI
186
212
  - Default: -
187
- - Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx`
213
+ - Example: `pplx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
188
214
 
189
215
  ## Mistral AI
190
216
 
@@ -204,21 +230,14 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
204
230
  - Default: -
205
231
  - Example: `gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
206
232
 
207
- ## OpenRouter AI
233
+ ## ZHIPU AI
208
234
 
209
- ### `OPENROUTER_API_KEY`
235
+ ### `ZHIPU_API_KEY`
210
236
 
211
237
  - Type: Required
212
- - Description: This is the API key you applied for in the OpenRouter AI service
238
+ - Description: This is the API key you applied for in the ZHIPU AI service
213
239
  - Default: -
214
- - Example: `sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
215
-
216
- ### `OPENROUTER_MODEL_LIST`
217
-
218
- - Type: Optional
219
- - Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas.
220
- - Default: `-`
221
- - Example: `-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta`
240
+ - Example: `4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT`
222
241
 
223
242
  ## 01.AI
224
243
 
@@ -229,11 +248,4 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
229
248
  - Default: -
230
249
  - 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
231
250
 
232
- ## TogetherAI
233
-
234
- ### `TOGETHERAI_API_KEY`
235
-
236
- - Type: Required
237
- - Description: This is the API key you applied for in the TogetherAI service
238
- - Default: -
239
- - Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
251
+ [model-list]: /docs/self-hosting/advanced/model-list