@lobehub/chat 0.162.17 → 0.162.19

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 (149) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/docs/self-hosting/advanced/settings-url-share.mdx +89 -57
  3. package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +87 -56
  4. package/locales/ar/error.json +7 -39
  5. package/locales/ar/modelProvider.json +15 -183
  6. package/locales/ar/setting.json +5 -8
  7. package/locales/bg-BG/error.json +6 -38
  8. package/locales/bg-BG/modelProvider.json +15 -183
  9. package/locales/bg-BG/setting.json +5 -8
  10. package/locales/de-DE/error.json +6 -38
  11. package/locales/de-DE/modelProvider.json +15 -183
  12. package/locales/de-DE/setting.json +5 -8
  13. package/locales/en-US/error.json +6 -38
  14. package/locales/en-US/modelProvider.json +15 -183
  15. package/locales/en-US/setting.json +6 -9
  16. package/locales/es-ES/error.json +6 -38
  17. package/locales/es-ES/modelProvider.json +15 -183
  18. package/locales/es-ES/setting.json +5 -8
  19. package/locales/fr-FR/error.json +6 -38
  20. package/locales/fr-FR/modelProvider.json +15 -183
  21. package/locales/fr-FR/setting.json +9 -12
  22. package/locales/it-IT/error.json +6 -38
  23. package/locales/it-IT/modelProvider.json +15 -183
  24. package/locales/it-IT/setting.json +5 -8
  25. package/locales/ja-JP/error.json +6 -38
  26. package/locales/ja-JP/modelProvider.json +15 -183
  27. package/locales/ja-JP/setting.json +5 -8
  28. package/locales/ko-KR/error.json +6 -38
  29. package/locales/ko-KR/modelProvider.json +15 -183
  30. package/locales/ko-KR/setting.json +5 -8
  31. package/locales/nl-NL/error.json +6 -38
  32. package/locales/nl-NL/modelProvider.json +15 -183
  33. package/locales/nl-NL/setting.json +5 -8
  34. package/locales/pl-PL/error.json +6 -38
  35. package/locales/pl-PL/modelProvider.json +15 -183
  36. package/locales/pl-PL/setting.json +6 -9
  37. package/locales/pt-BR/error.json +6 -38
  38. package/locales/pt-BR/modelProvider.json +15 -183
  39. package/locales/pt-BR/setting.json +5 -8
  40. package/locales/ru-RU/error.json +6 -38
  41. package/locales/ru-RU/modelProvider.json +15 -183
  42. package/locales/ru-RU/setting.json +5 -8
  43. package/locales/tr-TR/error.json +6 -38
  44. package/locales/tr-TR/modelProvider.json +15 -183
  45. package/locales/tr-TR/setting.json +5 -8
  46. package/locales/vi-VN/error.json +6 -38
  47. package/locales/vi-VN/modelProvider.json +15 -183
  48. package/locales/vi-VN/setting.json +5 -8
  49. package/locales/zh-CN/error.json +7 -39
  50. package/locales/zh-CN/modelProvider.json +15 -183
  51. package/locales/zh-CN/setting.json +5 -8
  52. package/locales/zh-TW/error.json +7 -39
  53. package/locales/zh-TW/modelProvider.json +15 -183
  54. package/locales/zh-TW/setting.json +5 -8
  55. package/package.json +1 -2
  56. package/src/app/(main)/settings/llm/ProviderList/Azure/index.tsx +107 -0
  57. package/src/app/(main)/settings/llm/ProviderList/Bedrock/index.tsx +68 -0
  58. package/src/app/(main)/settings/llm/ProviderList/Ollama/index.tsx +29 -0
  59. package/src/app/(main)/settings/llm/ProviderList/OpenAI/index.tsx +20 -0
  60. package/src/app/(main)/settings/llm/ProviderList/providers.tsx +141 -0
  61. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +18 -27
  62. package/src/app/(main)/settings/llm/index.tsx +7 -36
  63. package/src/app/(main)/settings/llm/type.ts +5 -0
  64. package/src/app/api/chat/[provider]/route.ts +8 -3
  65. package/src/app/api/errorResponse.test.ts +7 -95
  66. package/src/app/api/errorResponse.ts +6 -46
  67. package/src/app/api/middleware/auth/index.ts +7 -3
  68. package/src/components/ModelSelect/index.tsx +7 -10
  69. package/src/config/modelProviders/anthropic.ts +5 -0
  70. package/src/config/modelProviders/azure.ts +2 -0
  71. package/src/config/modelProviders/bedrock.ts +2 -0
  72. package/src/config/modelProviders/deepseek.ts +4 -1
  73. package/src/config/modelProviders/google.ts +5 -0
  74. package/src/config/modelProviders/groq.ts +5 -0
  75. package/src/config/modelProviders/minimax.ts +2 -0
  76. package/src/config/modelProviders/mistral.ts +2 -0
  77. package/src/config/modelProviders/moonshot.ts +2 -0
  78. package/src/config/modelProviders/ollama.ts +4 -0
  79. package/src/config/modelProviders/openai.ts +3 -0
  80. package/src/config/modelProviders/openrouter.ts +3 -0
  81. package/src/config/modelProviders/perplexity.ts +5 -0
  82. package/src/config/modelProviders/qwen.ts +3 -0
  83. package/src/config/modelProviders/togetherai.ts +3 -0
  84. package/src/config/modelProviders/zeroone.ts +4 -2
  85. package/src/config/modelProviders/zhipu.ts +2 -0
  86. package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +7 -4
  87. package/src/features/Conversation/Error/OllamaBizError/InvalidOllamaModel/index.tsx +11 -14
  88. package/src/features/Conversation/Error/index.tsx +29 -20
  89. package/src/features/Conversation/components/ChatItem/index.tsx +4 -13
  90. package/src/features/ModelSelect/index.tsx +1 -1
  91. package/src/features/ModelSwitchPanel/index.tsx +1 -1
  92. package/src/hooks/useProviderName.ts +8 -0
  93. package/src/libs/agent-runtime/anthropic/index.test.ts +8 -5
  94. package/src/libs/agent-runtime/anthropic/index.ts +3 -3
  95. package/src/libs/agent-runtime/azureOpenai/index.test.ts +5 -2
  96. package/src/libs/agent-runtime/azureOpenai/index.ts +2 -2
  97. package/src/libs/agent-runtime/bedrock/index.test.ts +2 -2
  98. package/src/libs/agent-runtime/bedrock/index.ts +2 -2
  99. package/src/libs/agent-runtime/deepseek/index.test.ts +3 -2
  100. package/src/libs/agent-runtime/deepseek/index.ts +0 -5
  101. package/src/libs/agent-runtime/error.ts +11 -46
  102. package/src/libs/agent-runtime/google/index.test.ts +3 -4
  103. package/src/libs/agent-runtime/google/index.ts +4 -4
  104. package/src/libs/agent-runtime/groq/index.test.ts +3 -2
  105. package/src/libs/agent-runtime/groq/index.ts +0 -4
  106. package/src/libs/agent-runtime/minimax/index.test.ts +3 -2
  107. package/src/libs/agent-runtime/minimax/index.ts +5 -5
  108. package/src/libs/agent-runtime/mistral/index.test.ts +2 -2
  109. package/src/libs/agent-runtime/mistral/index.ts +0 -5
  110. package/src/libs/agent-runtime/moonshot/index.test.ts +3 -2
  111. package/src/libs/agent-runtime/moonshot/index.ts +0 -5
  112. package/src/libs/agent-runtime/openrouter/index.test.ts +3 -2
  113. package/src/libs/agent-runtime/openrouter/index.ts +0 -6
  114. package/src/libs/agent-runtime/perplexity/index.test.ts +2 -2
  115. package/src/libs/agent-runtime/perplexity/index.ts +0 -5
  116. package/src/libs/agent-runtime/qwen/index.test.ts +2 -2
  117. package/src/libs/agent-runtime/qwen/index.ts +0 -5
  118. package/src/libs/agent-runtime/togetherai/index.test.ts +3 -2
  119. package/src/libs/agent-runtime/togetherai/index.ts +0 -5
  120. package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.test.ts +2 -6
  121. package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.ts +12 -6
  122. package/src/libs/agent-runtime/zeroone/index.test.ts +3 -2
  123. package/src/libs/agent-runtime/zeroone/index.ts +1 -5
  124. package/src/libs/agent-runtime/zhipu/index.test.ts +8 -5
  125. package/src/libs/agent-runtime/zhipu/index.ts +2 -2
  126. package/src/locales/default/error.ts +10 -51
  127. package/src/locales/default/modelProvider.ts +12 -169
  128. package/src/locales/default/setting.ts +5 -8
  129. package/src/services/message/client.test.ts +4 -1
  130. package/src/types/fetch.ts +3 -1
  131. package/src/types/llm.ts +22 -0
  132. package/src/app/(main)/settings/llm/Anthropic/index.tsx +0 -25
  133. package/src/app/(main)/settings/llm/Azure/index.tsx +0 -110
  134. package/src/app/(main)/settings/llm/Bedrock/index.tsx +0 -74
  135. package/src/app/(main)/settings/llm/DeepSeek/index.tsx +0 -21
  136. package/src/app/(main)/settings/llm/Google/index.tsx +0 -31
  137. package/src/app/(main)/settings/llm/Groq/index.tsx +0 -26
  138. package/src/app/(main)/settings/llm/Minimax/index.tsx +0 -20
  139. package/src/app/(main)/settings/llm/Mistral/index.tsx +0 -20
  140. package/src/app/(main)/settings/llm/Moonshot/index.tsx +0 -28
  141. package/src/app/(main)/settings/llm/Ollama/index.tsx +0 -37
  142. package/src/app/(main)/settings/llm/OpenAI/index.tsx +0 -28
  143. package/src/app/(main)/settings/llm/OpenRouter/index.tsx +0 -21
  144. package/src/app/(main)/settings/llm/Perplexity/index.tsx +0 -23
  145. package/src/app/(main)/settings/llm/Qwen/index.tsx +0 -21
  146. package/src/app/(main)/settings/llm/TogetherAI/index.tsx +0 -19
  147. package/src/app/(main)/settings/llm/ZeroOne/index.tsx +0 -20
  148. package/src/app/(main)/settings/llm/Zhipu/index.tsx +0 -18
  149. /package/src/app/(main)/settings/llm/{Ollama → ProviderList/Ollama}/Checker.tsx +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.162.19](https://github.com/lobehub/lobe-chat/compare/v0.162.18...v0.162.19)
6
+
7
+ <sup>Released on **2024-06-07**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix OpenAi BaseURL in api form.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix OpenAi BaseURL in api form, closes [#2806](https://github.com/lobehub/lobe-chat/issues/2806) ([1392957](https://github.com/lobehub/lobe-chat/commit/1392957))
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.162.18](https://github.com/lobehub/lobe-chat/compare/v0.162.17...v0.162.18)
31
+
32
+ <sup>Released on **2024-06-06**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: Refactor model provider implement.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Code refactoring
44
+
45
+ - **misc**: Refactor model provider implement, closes [#2801](https://github.com/lobehub/lobe-chat/issues/2801) ([7bb4fec](https://github.com/lobehub/lobe-chat/commit/7bb4fec))
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.162.17](https://github.com/lobehub/lobe-chat/compare/v0.162.16...v0.162.17)
6
56
 
7
57
  <sup>Released on **2024-06-04**</sup>
@@ -1,9 +1,10 @@
1
- # Share settings via URL
1
+ # Share settings via URL
2
2
 
3
3
  LobeChat support import settings from external URL to quickly set up LobeChat configuration.
4
4
 
5
5
  The currently supported settings are:
6
6
 
7
+ - `keyVaults`: provider api key and baseURL settings
7
8
  - `languageModel`: Language model settings
8
9
 
9
10
  ## Import from URL
@@ -12,18 +13,18 @@ Use the following URL format to import settings parameters from an external URL:
12
13
 
13
14
  ```plaintext
14
15
  https://lobehub.com/?settings=<settings object in JSON format>
15
- https://lobehub.com/?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
16
+ https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}}
16
17
  ```
17
18
 
18
19
  Example of settings in JSON format:
19
20
 
20
21
  ```json
21
22
  {
22
- "languageModel": {
23
- "openai": {
24
- "apiKey": "user-key"
25
- }
23
+ "keyVaults": {
24
+ "openai": {
25
+ "apiKey": "user-key"
26
26
  }
27
+ }
27
28
  }
28
29
  ```
29
30
 
@@ -32,69 +33,100 @@ Example of settings in JSON format:
32
33
  ```ts
33
34
  // Generate settings to export to URL
34
35
  const settings = {
35
- languageModel: {
36
+ keyVaults: {
36
37
  openai: {
37
- apiKey: 'user-key',
38
- endpoint: 'https://lobehub.com/v1'
38
+ apiKey: 'user-key',
39
+ baseURL: 'https://your-proxy.com/v1',
39
40
  },
40
- }};
41
+ },
42
+ };
41
43
  // Convert settings to a JSON formatted string
42
44
  const url = `/?settings=${JSON.stringify(settings)}`;
43
- console.log(url);
44
- // /?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
45
+ console.log(url);
46
+ // /?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}}
45
47
  ```
46
48
 
47
49
  <Callout type={'warning'}>
48
- LobeChat does not verify the correctness of the settings parameters in the URL, nor provide encryption or decryption methods. Please use with caution.
50
+ LobeChat does not verify the correctness of the settings parameters in the URL, nor provide
51
+ encryption or decryption methods. Please use with caution.
49
52
  </Callout>
50
53
 
51
54
  ## Parameter schema
52
55
 
53
- ### languageModel
56
+ ### keyVaults
54
57
 
55
58
  - Property name and type
56
59
 
57
- | Property name | Type |
58
- |---------------|--------------------------------|
59
- | anthropic | GeneralModelProviderConfig |
60
- | azure | AzureOpenAIConfig |
61
- | bedrock | AWSBedrockConfig |
62
- | google | GeneralModelProviderConfig |
63
- | groq | GeneralModelProviderConfig |
64
- | minimax | GeneralModelProviderConfig |
65
- | mistral | GeneralModelProviderConfig |
66
- | moonshot | GeneralModelProviderConfig |
67
- | ollama | GeneralModelProviderConfig |
68
- | openai | GeneralModelProviderConfig |
69
- | openrouter | GeneralModelProviderConfig |
70
- | perplexity | GeneralModelProviderConfig |
71
- | togetherai | GeneralModelProviderConfig |
72
- | zeroone | GeneralModelProviderConfig |
73
- | zhipu | GeneralModelProviderConfig |
74
-
75
- - Type `GeneralModelProviderConfig`
76
-
77
- | Property name | Type | Description |
78
- |-----------------------|--------------------------|-----------------------------------------------------------------------------|
79
- | apiKey | string | The API key for the model provider. |
80
- | autoFetchModelLists | boolean | Whether to automatically fetch model lists. |
81
- | enabled | boolean | Whether the model provider is enabled. |
82
- | enabledModels | string[] | null | The IDs of the enabled models. |
83
- | endpoint | string | The endpoint for the model provider. |
84
- | fetchOnClient | boolean | Whether to fetch on the client. |
85
-
86
- - Type `AzureOpenAIConfig`
87
- > Inherits the fields from `GeneralModelProviderConfig`
88
-
89
- | Property name | Type | Description |
90
- |-----------------------|--------------------------|-----------------------------------------------------------------------------|
91
- | apiVersion | string | The API version for Azure OpenAI. |
92
-
93
- - Type `AWSBedrockConfig`
94
- > Inherits all fields from `GeneralModelProviderConfig` except `apiKey, endpoint`
95
-
96
- | Property name | Type | Description |
97
- | accessKeyId | string | The access key ID for AWS Bedrock. |
98
- | region | string | The region for AWS Bedrock. |
99
- | secretAccessKey | string | The secret access key for AWS Bedrock. |
60
+ | Property name | Type |
61
+ | ------------- | ------------------------ |
62
+ | anthropic | `OpenAICompatibleKeyVault` |
63
+ | azure | `AzureOpenAIKeyVault` |
64
+ | bedrock | `AWSBedrockKeyVault` |
65
+ | google | `OpenAICompatibleKeyVault` |
66
+ | groq | `OpenAICompatibleKeyVault` |
67
+ | minimax | `OpenAICompatibleKeyVault` |
68
+ | mistral | `OpenAICompatibleKeyVault` |
69
+ | moonshot | `OpenAICompatibleKeyVault` |
70
+ | ollama | `OpenAICompatibleKeyVault` |
71
+ | openai | `OpenAICompatibleKeyVault` |
72
+ | openrouter | `OpenAICompatibleKeyVault` |
73
+ | perplexity | `OpenAICompatibleKeyVault` |
74
+ | togetherai | `OpenAICompatibleKeyVault` |
75
+ | zeroone | `OpenAICompatibleKeyVault` |
76
+ | zhipu | `OpenAICompatibleKeyVault` |
77
+
78
+ - Type `OpenAICompatibleKeyVault`
79
+
80
+ | Property name | Type | Description |
81
+ | ------------- | ------ | ------------------------------------ |
82
+ | apiKey | string | The API key for the model provider. |
83
+ | baseURL | string | The endpoint for the model provider. |
84
+
85
+ - Type `AzureOpenAIKeyVault`
86
+
87
+ | Property name | Type | Description |
88
+ | ------------- | ------ | ------------------------------------ |
89
+ | apiVersion | string | The API version for Azure OpenAI. |
90
+ | apiKey | string | The API key for the model provider. |
91
+ | endpoint | string | The endpoint for the model provider. |
92
+
93
+ - Type `AWSBedrockKeyVault`
94
+
95
+ | Property name | Type | Description |
96
+ | --------------- | ------ | -------------------------------------- |
97
+ | accessKeyId | string | The access key ID for AWS Bedrock. |
98
+ | region | string | The region for AWS Bedrock. |
99
+ | secretAccessKey | string | The secret access key for AWS Bedrock. |
100
+
101
+ ### languageModel
102
+
103
+ ```ts
104
+ export type UserModelProviderConfig = Record<string, ProviderConfig>;
105
+ ```
100
106
 
107
+ | Property name | Type |
108
+ | ------------- | -------------- |
109
+ | anthropic | `ProviderConfig` |
110
+ | azure | `ProviderConfig` |
111
+ | bedrock | `ProviderConfig` |
112
+ | google | `ProviderConfig` |
113
+ | groq | `ProviderConfig` |
114
+ | minimax | `ProviderConfig` |
115
+ | mistral | `ProviderConfig` |
116
+ | moonshot | `ProviderConfig` |
117
+ | ollama | `ProviderConfig` |
118
+ | openai | `ProviderConfig` |
119
+ | openrouter | `ProviderConfig` |
120
+ | perplexity | `ProviderConfig` |
121
+ | togetherai | `ProviderConfig` |
122
+ | zeroone | `ProviderConfig` |
123
+ | zhipu | `ProviderConfig` |
124
+
125
+ - Type `ProviderConfig`
126
+
127
+ | Property name | Type | Description |
128
+ | ------------------- | -------- | ------------------------------------------- | ------------------------------ |
129
+ | autoFetchModelLists | boolean | Whether to automatically fetch model lists. |
130
+ | enabled | boolean | Whether the model provider is enabled. |
131
+ | enabledModels | string[] | null | The IDs of the enabled models. |
132
+ | fetchOnClient | boolean | Whether to fetch on the client. |
@@ -4,7 +4,8 @@ LobeChat 支持从外部 URL 导入设置参数,以便于快速设置 LobeChat
4
4
 
5
5
  目前支持的设置项有:
6
6
 
7
- - `languageModel`:语言模型设置
7
+ - `keyVaults`: 模型供应商相关秘钥设置
8
+ - `languageModel`:语言模型设置
8
9
 
9
10
  ## 从 URL 中导入
10
11
 
@@ -12,18 +13,18 @@ LobeChat 支持从外部 URL 导入设置参数,以便于快速设置 LobeChat
12
13
 
13
14
  ```plaintext
14
15
  https://lobehub.com/?settings=<JSON格式的设置对象>
15
- https://lobehub.com/?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
16
+ https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}}
16
17
  ```
17
18
 
18
19
  JSON格式的设置示例:
19
20
 
20
21
  ```json
21
22
  {
22
- "languageModel": {
23
- "openai": {
24
- "apiKey": "user-key"
25
- }
23
+ "keyVaults": {
24
+ "openai": {
25
+ "apiKey": "user-key"
26
26
  }
27
+ }
27
28
  }
28
29
  ```
29
30
 
@@ -32,69 +33,99 @@ JSON格式的设置示例:
32
33
  ```ts
33
34
  // 生成要导出到 URL 的设置
34
35
  const settings = {
35
- languageModel: {
36
+ keyVaults: {
36
37
  openai: {
37
- apiKey: 'user-key',
38
- endpoint: 'https://lobehub.com/v1'
38
+ apiKey: 'user-key',
39
+ baseURL: 'https://your-proxy.com/v1',
39
40
  },
40
- }};
41
- // 将设置转为 JSON 格式的字符串
41
+ },
42
+ };
43
+ // Convert settings to a JSON formatted string
42
44
  const url = `/?settings=${JSON.stringify(settings)}`;
43
- console.log(url);
44
- // /?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}}
45
+ console.log(url);
46
+ // /?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}}
45
47
  ```
46
48
 
47
49
  <Callout type={'warning'}>
48
- LobeChat 不对 URL 中的设置参数进行正确性校验,也不提供加密、解密方法,请谨慎使用。
50
+ LobeChat 不对 URL 中的设置参数进行正确性校验,也不提供 URL 的加密、解密方法,请谨慎使用。
49
51
  </Callout>
50
52
 
51
53
  ## 参数格式
52
54
 
53
- ### languageModel
55
+ ### keyVaults
54
56
 
55
57
  - 参数及其类型
56
58
 
57
- | 参数名称 | 类型 |
58
- |---------------|--------------------------------|
59
- | anthropic | GeneralModelProviderConfig |
60
- | azure | AzureOpenAIConfig |
61
- | bedrock | AWSBedrockConfig |
62
- | google | GeneralModelProviderConfig |
63
- | groq | GeneralModelProviderConfig |
64
- | minimax | GeneralModelProviderConfig |
65
- | mistral | GeneralModelProviderConfig |
66
- | moonshot | GeneralModelProviderConfig |
67
- | ollama | GeneralModelProviderConfig |
68
- | openai | GeneralModelProviderConfig |
69
- | openrouter | GeneralModelProviderConfig |
70
- | perplexity | GeneralModelProviderConfig |
71
- | togetherai | GeneralModelProviderConfig |
72
- | zeroone | GeneralModelProviderConfig |
73
- | zhipu | GeneralModelProviderConfig |
74
-
75
- - 类型 `GeneralModelProviderConfig`
76
-
77
- | 参数 | TS 类型 | 描述 |
78
- |-----------------------|--------------------------|-----------------------------------------------------------------------------|
79
- | apiKey | string | 模型的 API 密钥。 |
80
- | autoFetchModelLists | boolean | 是否自动获取模型列表。 |
81
- | enabled | boolean | 是否启用该模型。 |
82
- | enabledModels | string[] | 启用的模型的 ID。 |
83
- | endpoint | string | 模型API端点。 |
84
- | fetchOnClient | boolean | 是否在客户端发起请求,默认在服务端发起请求。 |
85
-
86
- - 类型 `AzureOpenAIConfig`
87
- > 继承 `GeneralModelProviderConfig` 中的字段
88
-
89
- | 参数 | TS 类型 | 描述 |
90
- |-----------------------|--------------------------|-----------------------------------------------------------------------------|
59
+ | 参数名称 | 类型 |
60
+ | ---------- | ------------------------ |
61
+ | anthropic | `OpenAICompatibleKeyVault` |
62
+ | azure | `AzureOpenAIKeyVault` |
63
+ | bedrock | `AWSBedrockKeyVault` |
64
+ | google | `OpenAICompatibleKeyVault` |
65
+ | groq | `OpenAICompatibleKeyVault` |
66
+ | minimax | `OpenAICompatibleKeyVault` |
67
+ | mistral | `OpenAICompatibleKeyVault` |
68
+ | moonshot | `OpenAICompatibleKeyVault` |
69
+ | ollama | `OpenAICompatibleKeyVault` |
70
+ | openai | `OpenAICompatibleKeyVault` |
71
+ | openrouter | `OpenAICompatibleKeyVault` |
72
+ | perplexity | `OpenAICompatibleKeyVault` |
73
+ | togetherai | `OpenAICompatibleKeyVault` |
74
+ | zeroone | `OpenAICompatibleKeyVault` |
75
+ | zhipu | `OpenAICompatibleKeyVault` |
76
+
77
+ - Type `OpenAICompatibleKeyVault`
78
+
79
+ | 参数 | 类型 | 描述 |
80
+ | ------- | ------ | ----------------- |
81
+ | apiKey | string | 模型的 API 密钥。 |
82
+ | baseURL | string | 模型API端点。 |
83
+
84
+ - Type `AzureOpenAIKeyVault`
85
+
86
+ | 参数 | 类型 | 描述 |
87
+ | ---------- | ------ | -------------------------- |
91
88
  | apiVersion | string | Azure OpenAI 的 API 版本。 |
89
+ | apiKey | string | 模型的 API 密钥。 |
90
+ | baseURL | string | 模型API端点。 |
91
+
92
+ - Type `AWSBedrockKeyVault`
92
93
 
93
- - 类型 `AWSBedrockConfig`
94
- > 继承 `GeneralModelProviderConfig` 中除 `apiKey, endpoint` 外的所有字段
94
+ | 参数 | 类型 | 描述 |
95
+ | --------------- | ------ | --------------------------- |
96
+ | accessKeyId | string | AWS Bedrock 的访问密钥 ID。 |
97
+ | region | string | AWS Bedrock 的区域。 |
98
+ | secretAccessKey | string | AWS Bedrock 的访问密钥。 |
99
+
100
+ ### languageModel
101
+
102
+ ```ts
103
+ export type UserModelProviderConfig = Record<string, ProviderConfig>;
104
+ ```
95
105
 
96
- | 参数 | TS 类型 | 描述 |
97
- |-----------------------|--------------------------|-----------------------------------------------------------------------------|
98
- | accessKeyId | string | AWS Bedrock 的访问密钥 ID。 |
99
- | region | string | AWS Bedrock 的区域。 |
100
- | secretAccessKey | string | AWS Bedrock 的访问密钥。 |
106
+ | 参数名称 | 类型 |
107
+ | ---------- | -------------- |
108
+ | anthropic | `ProviderConfig` |
109
+ | azure | `ProviderConfig` |
110
+ | bedrock | `ProviderConfig` |
111
+ | google | `ProviderConfig` |
112
+ | groq | `ProviderConfig` |
113
+ | minimax | `ProviderConfig` |
114
+ | mistral | `ProviderConfig` |
115
+ | moonshot | `ProviderConfig` |
116
+ | ollama | `ProviderConfig` |
117
+ | openai | `ProviderConfig` |
118
+ | openrouter | `ProviderConfig` |
119
+ | perplexity | `ProviderConfig` |
120
+ | togetherai | `ProviderConfig` |
121
+ | zeroone | `ProviderConfig` |
122
+ | zhipu | `ProviderConfig` |
123
+
124
+ - 类型 `ProviderConfig`
125
+
126
+ | 参数 | TS 类型 | 描述 |
127
+ | ------------------- | -------- | -------------------------------------------- |
128
+ | autoFetchModelLists | boolean | 是否自动获取模型列表。 |
129
+ | enabled | boolean | 是否启用该模型。 |
130
+ | enabledModels | string[] | 启用的模型的 ID。 |
131
+ | fetchOnClient | boolean | 是否在客户端发起请求,默认在服务端发起请求。 |
@@ -54,40 +54,15 @@
54
54
  "503": "عذرًا، الخادم غير قادر حاليًا على معالجة طلبك، قد يكون بسبب الحمل الزائد أو الصيانة الجارية، يرجى المحاولة مرة أخرى لاحقًا",
55
55
  "504": "عذرًا، الخادم لم ينتظر ردًا من الخادم الأصلي، يرجى المحاولة مرة أخرى لاحقًا",
56
56
  "AgentRuntimeError": "حدث خطأ في تشغيل نموذج Lobe اللغوي، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
57
- "AnthropicBizError": "خطأ في طلب خدمة Anthropic AI، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
58
- "AzureBizError": "حدث خطأ في طلب خدمة Azure AI، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
59
- "BedrockBizError": "حدث خطأ في طلب خدمة Bedrock، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
60
- "DeepSeekBizError": "خطأ في طلب خدمة DeepSeek، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
61
- "GoogleBizError": "حدث خطأ في طلب خدمة Google، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
62
- "GroqBizError": "حدث خطأ في خدمة Groq ، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
63
57
  "InvalidAccessCode": "كلمة المرور غير صحيحة أو فارغة، يرجى إدخال كلمة مرور الوصول الصحيحة أو إضافة مفتاح API مخصص",
64
- "InvalidAnthropicAPIKey": "مفتاح Anthropic API غير صحيح أو فارغ، يرجى التحقق من مفتاح Anthropic API وإعادة المحاولة",
65
- "InvalidAzureAPIKey": "مفتاح Azure API غير صحيح أو فارغ، يرجى التحقق من مفتاح Azure API وإعادة المحاولة",
66
58
  "InvalidBedrockCredentials": "فشلت مصادقة Bedrock، يرجى التحقق من AccessKeyId/SecretAccessKey وإعادة المحاولة",
67
59
  "InvalidClerkUser": "عذرًا، لم تقم بتسجيل الدخول بعد، يرجى تسجيل الدخول أو التسجيل للمتابعة",
68
- "InvalidDeepSeekAPIKey": "مفتاح DeepSeek API غير صحيح أو فارغ، يرجى التحقق من مفتاح DeepSeek API وإعادة المحاولة",
69
- "InvalidGoogleAPIKey": "مفتاح Google API غير صحيح أو فارغ، يرجى التحقق من مفتاح Google API وإعادة المحاولة",
70
- "InvalidGroqAPIKey": "مفتاح Groq API غير صحيح أو فارغ، يرجى التحقق من مفتاح Groq API وإعادة المحاولة",
71
- "InvalidMinimaxAPIKey": "مفتاح Minimax API غير صحيح أو فارغ، يرجى التحقق من مفتاح Minimax API وإعادة المحاولة",
72
- "InvalidMistralAPIKey": "مفتاح Mistral AI API غير صحيح أو فارغ، يرجى التحقق من مفتاح Mistral API وإعادة المحاولة",
73
- "InvalidMoonshotAPIKey": "مفتاح API لـ Moonshot AI غير صحيح أو فارغ، يرجى التحقق من مفتاح API لـ Moonshot وإعادة المحاولة",
74
60
  "InvalidOllamaArgs": "تكوين Ollama غير صحيح، يرجى التحقق من تكوين Ollama وإعادة المحاولة",
75
- "InvalidOpenRouterAPIKey": "مفتاح OpenRouter API غير صحيح أو فارغ، يرجى التحقق من مفتاح OpenRouter API وإعادة المحاولة",
76
- "InvalidPerplexityAPIKey": "مفتاح Perplexity API غير صحيح أو فارغ، يرجى التحقق من مفتاح Perplexity API وإعادة المحاولة",
77
- "InvalidTogetherAIAPIKey": "مفتاح TogetherAI API غير صحيح أو فارغ، يرجى التحقق من مفتاح TogetherAI API وإعادة المحاولة",
78
- "InvalidZeroOneAPIKey": "مفتاح ZeroOne API غير صحيح أو فارغ، يرجى التحقق من مفتاح ZeroOne API وإعادة المحاولة",
79
- "InvalidZhipuAPIKey": "مفتاح Zhipu API غير صحيح أو فارغ، يرجى التحقق من مفتاح Zhipu API وإعادة المحاولة",
80
- "InvalidQwenAPIKey": "مفتاح Qwen API غير صحيح أو فارغ، يرجى التحقق من مفتاح Qwen API وإعادة المحاولة",
61
+ "InvalidProviderAPIKey": "{{provider}} مفتاح API غير صحيح أو فارغ، يرجى التحقق من مفتاح API {{provider}} الخاص بك وحاول مرة أخرى",
81
62
  "LocationNotSupportError": "عذرًا، لا يدعم موقعك الحالي خدمة هذا النموذج، قد يكون ذلك بسبب قيود المنطقة أو عدم توفر الخدمة. يرجى التحقق مما إذا كان الموقع الحالي يدعم استخدام هذه الخدمة، أو محاولة استخدام معلومات الموقع الأخرى.",
82
- "MinimaxBizError": "حدث خطأ في طلب خدمة Minimax، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
83
- "MistralBizError": "طلب خدمة Mistral AI خاطئ، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
84
- "MoonshotBizError": "حدث خطأ في خدمة جانب القمر، يرجى التحقق من المعلومات أدناه أو إعادة المحاولة",
85
63
  "NoOpenAIAPIKey": "مفتاح API الخاص بـ OpenAI فارغ، يرجى إضافة مفتاح API الخاص بـ OpenAI",
86
64
  "OllamaBizError": "خطأ في طلب خدمة Ollama، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
87
65
  "OllamaServiceUnavailable": "خدمة Ollama غير متوفرة، يرجى التحقق من تشغيل Ollama بشكل صحيح أو إعدادات الـ Ollama للاتصال عبر النطاقات",
88
- "OpenAIBizError": "حدث خطأ في طلب خدمة OpenAI، يرجى التحقق من المعلومات أدناه وإعادة المحاولة",
89
- "OpenRouterBizError": "خطأ في طلب خدمة OpenRouter AI، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
90
- "PerplexityBizError": "خطأ في طلب خدمة Perplexity AI، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
91
66
  "PluginApiNotFound": "عذرًا، لا يوجد API للإضافة في وصف الإضافة، يرجى التحقق من تطابق طريقة الطلب الخاصة بك مع API الوصف",
92
67
  "PluginApiParamsError": "عذرًا، فشلت التحقق من صحة معلمات الطلب للإضافة، يرجى التحقق من تطابق المعلمات مع معلومات الوصف",
93
68
  "PluginGatewayError": "عذرًا، حدث خطأ في بوابة الإضافة، يرجى التحقق من تكوين بوابة الإضافة",
@@ -100,10 +75,7 @@
100
75
  "PluginOpenApiInitError": "عذرًا، فشل تهيئة عميل OpenAPI، يرجى التحقق من معلومات تكوين OpenAPI",
101
76
  "PluginServerError": "خطأ في استجابة الخادم لطلب الإضافة، يرجى التحقق من ملف وصف الإضافة وتكوين الإضافة وتنفيذ الخادم وفقًا لمعلومات الخطأ أدناه",
102
77
  "PluginSettingsInvalid": "تحتاج هذه الإضافة إلى تكوين صحيح قبل الاستخدام، يرجى التحقق من صحة تكوينك",
103
- "TogetherAIBizError": "خطأ في طلب خدمة TogetherAI AI، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
104
- "ZeroOneBizError": "طلب خدمة ZeroOneBiz خطأ، يرجى التحقق من المعلومات أدناه أو إعادة المحاولة",
105
- "ZhipuBizError": "حدث خطأ في طلب خدمة Zhipu، يرجى التحقق من المعلومات التالية أو إعادة المحاولة",
106
- "QwenBizError": "حدث خطأ في طلب خدمة Qwen، يرجى التحقق من المعلومات التالية أو إعادة المحاولة"
78
+ "ProviderBizAPIKey": "حدث خطأ في طلب خدمة {{provider}}، يرجى التحقق من المعلومات التالية أو المحاولة مرة أخرى"
107
79
  },
108
80
  "stt": {
109
81
  "responseError": "فشل طلب الخدمة، يرجى التحقق من الإعدادات أو إعادة المحاولة"
@@ -113,6 +85,10 @@
113
85
  },
114
86
  "unlock": {
115
87
  "addProxyUrl": "إضافة عنوان وكيل OpenAI (اختياري)",
88
+ "apiKey": {
89
+ "description": "يمكنك بدء الجلسة عن طريق إدخال مفتاح API {{name}} الخاص بك",
90
+ "title": "استخدام مفتاح API {{name}} المخصص"
91
+ },
116
92
  "closeMessage": "إغلاق الرسالة",
117
93
  "confirm": "تأكيد وإعادة المحاولة",
118
94
  "oauth": {
@@ -121,14 +97,6 @@
121
97
  "title": "تسجيل الدخول إلى الحساب",
122
98
  "welcome": "مرحبا بك!"
123
99
  },
124
- "ollama": {
125
- "cancel": "إلغاء",
126
- "confirm": "تأكيد",
127
- "description": "أدخل علامة نموذج Ollama الخاصة بك لاستكمال الجلسة",
128
- "downloaded": "{{completed}} / {{total}}",
129
- "starting": "بدء التحميل...",
130
- "title": "تحميل نموذج Ollama المحدد"
131
- },
132
100
  "password": {
133
101
  "description": "قام المسؤول بتشفير التطبيق، قم بإدخال كلمة مرور التطبيق لفتح التطبيق. يتعين إدخال كلمة المرور مرة واحدة فقط",
134
102
  "placeholder": "الرجاء إدخال كلمة المرور",
@@ -143,4 +111,4 @@
143
111
  "desc": "التفاصيل: {{detail}}",
144
112
  "title": "فشل تحميل الملف، يرجى التحقق من الاتصال بالشبكة أو المحاولة لاحقًا"
145
113
  }
146
- }
114
+ }