@lobehub/chat 0.146.2 → 0.147.0

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 (358) hide show
  1. package/.env.example +3 -5
  2. package/.github/workflows/issue-close-require.yml +1 -1
  3. package/.github/workflows/release.yml +1 -1
  4. package/.github/workflows/test.yml +3 -1
  5. package/.i18nrc.js +13 -8
  6. package/.seorc.cjs +9 -0
  7. package/CHANGELOG.md +73 -0
  8. package/README.md +25 -25
  9. package/README.zh-CN.md +25 -25
  10. package/contributing/Home.md +1 -1
  11. package/docs/self-hosting/advanced/analytics.mdx +12 -0
  12. package/docs/self-hosting/advanced/analytics.zh-CN.mdx +10 -0
  13. package/docs/self-hosting/advanced/authentication.mdx +19 -0
  14. package/docs/self-hosting/advanced/authentication.zh-CN.mdx +15 -0
  15. package/docs/self-hosting/advanced/sso-providers/auth0.mdx +19 -2
  16. package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +15 -2
  17. package/docs/self-hosting/advanced/sso-providers/authentik.mdx +18 -3
  18. package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +14 -2
  19. package/docs/self-hosting/advanced/sso-providers/github.mdx +13 -0
  20. package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +13 -3
  21. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +18 -2
  22. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +15 -2
  23. package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +17 -2
  24. package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +14 -2
  25. package/docs/self-hosting/advanced/upstream-sync.mdx +13 -0
  26. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +10 -0
  27. package/docs/self-hosting/environment-variables/analytics.mdx +15 -0
  28. package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +13 -0
  29. package/docs/self-hosting/environment-variables/auth.mdx +14 -0
  30. package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +15 -1
  31. package/docs/self-hosting/environment-variables/basic.mdx +15 -0
  32. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +11 -0
  33. package/docs/self-hosting/environment-variables/model-provider.mdx +26 -0
  34. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +10 -0
  35. package/docs/self-hosting/environment-variables.mdx +13 -2
  36. package/docs/self-hosting/environment-variables.zh-CN.mdx +9 -0
  37. package/docs/self-hosting/examples/azure-openai.mdx +12 -0
  38. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +12 -0
  39. package/docs/self-hosting/examples/ollama.mdx +13 -0
  40. package/docs/self-hosting/examples/ollama.zh-CN.mdx +11 -0
  41. package/docs/self-hosting/faq/no-v1-suffix.mdx +12 -0
  42. package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +9 -0
  43. package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx +14 -0
  44. package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx +11 -0
  45. package/docs/self-hosting/platform/docker-compose.mdx +21 -5
  46. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +18 -5
  47. package/docs/self-hosting/platform/docker.mdx +26 -8
  48. package/docs/self-hosting/platform/docker.zh-CN.mdx +27 -9
  49. package/docs/self-hosting/platform/netlify.mdx +18 -2
  50. package/docs/self-hosting/platform/netlify.zh-CN.mdx +14 -1
  51. package/docs/self-hosting/platform/railway.mdx +12 -0
  52. package/docs/self-hosting/platform/railway.zh-CN.mdx +11 -0
  53. package/docs/self-hosting/platform/repocloud.mdx +12 -0
  54. package/docs/self-hosting/platform/repocloud.zh-CN.mdx +10 -0
  55. package/docs/self-hosting/platform/sealos.mdx +11 -0
  56. package/docs/self-hosting/platform/sealos.zh-CN.mdx +10 -0
  57. package/docs/self-hosting/platform/vercel.mdx +12 -0
  58. package/docs/self-hosting/platform/vercel.zh-CN.mdx +11 -0
  59. package/docs/self-hosting/platform/zeabur.mdx +11 -0
  60. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +10 -0
  61. package/docs/self-hosting/start.mdx +12 -0
  62. package/docs/self-hosting/start.zh-CN.mdx +13 -0
  63. package/docs/usage/agents/concepts.mdx +13 -0
  64. package/docs/usage/agents/concepts.zh-CN.mdx +10 -0
  65. package/docs/usage/agents/custom-agent.mdx +16 -2
  66. package/docs/usage/agents/custom-agent.zh-CN.mdx +14 -2
  67. package/docs/usage/agents/model.mdx +11 -2
  68. package/docs/usage/agents/model.zh-CN.mdx +12 -0
  69. package/docs/usage/agents/prompt.mdx +15 -0
  70. package/docs/usage/agents/prompt.zh-CN.mdx +10 -0
  71. package/docs/usage/agents/topics.mdx +13 -0
  72. package/docs/usage/agents/topics.zh-CN.mdx +11 -0
  73. package/docs/usage/features/agent-market.mdx +11 -1
  74. package/docs/usage/features/agent-market.zh-CN.mdx +13 -0
  75. package/docs/usage/features/local-llm.mdx +12 -2
  76. package/docs/usage/features/local-llm.zh-CN.mdx +3 -3
  77. package/docs/usage/features/mobile.mdx +10 -1
  78. package/docs/usage/features/mobile.zh-CN.mdx +11 -0
  79. package/docs/usage/features/more.mdx +13 -0
  80. package/docs/usage/features/more.zh-CN.mdx +10 -0
  81. package/docs/usage/features/multi-ai-providers.mdx +14 -1
  82. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +16 -0
  83. package/docs/usage/features/plugin-system.mdx +12 -1
  84. package/docs/usage/features/plugin-system.zh-CN.mdx +9 -0
  85. package/docs/usage/features/pwa.mdx +11 -1
  86. package/docs/usage/features/pwa.zh-CN.mdx +13 -0
  87. package/docs/usage/features/text-to-image.mdx +11 -1
  88. package/docs/usage/features/text-to-image.zh-CN.mdx +13 -0
  89. package/docs/usage/features/theme.mdx +12 -1
  90. package/docs/usage/features/theme.zh-CN.mdx +11 -0
  91. package/docs/usage/features/tts.mdx +14 -1
  92. package/docs/usage/features/tts.zh-CN.mdx +12 -0
  93. package/docs/usage/features/vision.mdx +11 -1
  94. package/docs/usage/features/vision.zh-CN.mdx +10 -0
  95. package/docs/usage/plugins/basic-usage.mdx +12 -0
  96. package/docs/usage/plugins/basic-usage.zh-CN.mdx +10 -0
  97. package/docs/usage/plugins/custom-plugin.mdx +12 -0
  98. package/docs/usage/plugins/custom-plugin.zh-CN.mdx +10 -0
  99. package/docs/usage/plugins/development.mdx +18 -0
  100. package/docs/usage/plugins/development.zh-CN.mdx +12 -0
  101. package/docs/usage/plugins/store.mdx +12 -0
  102. package/docs/usage/plugins/store.zh-CN.mdx +9 -0
  103. package/docs/usage/providers/groq.mdx +14 -2
  104. package/docs/usage/providers/groq.zh-CN.mdx +12 -2
  105. package/docs/usage/providers/ollama/gemma.mdx +13 -3
  106. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -3
  107. package/docs/usage/providers/ollama/qwen.mdx +12 -4
  108. package/docs/usage/providers/ollama/qwen.zh-CN.mdx +10 -3
  109. package/docs/usage/providers/ollama.mdx +19 -9
  110. package/docs/usage/providers/ollama.zh-CN.mdx +20 -9
  111. package/docs/usage/start.mdx +13 -2
  112. package/docs/usage/start.zh-CN.mdx +11 -2
  113. package/locales/ar/common.json +0 -26
  114. package/locales/ar/components.json +15 -0
  115. package/locales/ar/error.json +1 -52
  116. package/locales/ar/modelProvider.json +226 -0
  117. package/locales/ar/setting.json +48 -199
  118. package/locales/bg-BG/common.json +0 -26
  119. package/locales/bg-BG/components.json +15 -0
  120. package/locales/bg-BG/error.json +1 -52
  121. package/locales/bg-BG/modelProvider.json +226 -0
  122. package/locales/bg-BG/setting.json +48 -199
  123. package/locales/de-DE/common.json +0 -26
  124. package/locales/de-DE/components.json +15 -0
  125. package/locales/de-DE/error.json +1 -52
  126. package/locales/de-DE/modelProvider.json +226 -0
  127. package/locales/de-DE/setting.json +48 -199
  128. package/locales/en-US/common.json +0 -26
  129. package/locales/en-US/components.json +15 -0
  130. package/locales/en-US/error.json +1 -52
  131. package/locales/en-US/modelProvider.json +226 -0
  132. package/locales/en-US/setting.json +48 -199
  133. package/locales/es-ES/common.json +0 -26
  134. package/locales/es-ES/components.json +15 -0
  135. package/locales/es-ES/error.json +1 -52
  136. package/locales/es-ES/modelProvider.json +226 -0
  137. package/locales/es-ES/setting.json +48 -199
  138. package/locales/fr-FR/common.json +0 -26
  139. package/locales/fr-FR/components.json +15 -0
  140. package/locales/fr-FR/error.json +1 -52
  141. package/locales/fr-FR/modelProvider.json +226 -0
  142. package/locales/fr-FR/setting.json +48 -199
  143. package/locales/it-IT/common.json +0 -26
  144. package/locales/it-IT/components.json +15 -0
  145. package/locales/it-IT/error.json +1 -52
  146. package/locales/it-IT/modelProvider.json +226 -0
  147. package/locales/it-IT/setting.json +59 -210
  148. package/locales/ja-JP/common.json +0 -26
  149. package/locales/ja-JP/components.json +15 -0
  150. package/locales/ja-JP/error.json +1 -52
  151. package/locales/ja-JP/modelProvider.json +226 -0
  152. package/locales/ja-JP/setting.json +59 -210
  153. package/locales/ko-KR/common.json +0 -26
  154. package/locales/ko-KR/components.json +15 -0
  155. package/locales/ko-KR/error.json +1 -52
  156. package/locales/ko-KR/modelProvider.json +226 -0
  157. package/locales/ko-KR/setting.json +48 -199
  158. package/locales/nl-NL/common.json +0 -26
  159. package/locales/nl-NL/components.json +15 -0
  160. package/locales/nl-NL/error.json +4 -55
  161. package/locales/nl-NL/modelProvider.json +226 -0
  162. package/locales/nl-NL/setting.json +49 -200
  163. package/locales/pl-PL/common.json +0 -26
  164. package/locales/pl-PL/components.json +15 -0
  165. package/locales/pl-PL/error.json +1 -52
  166. package/locales/pl-PL/modelProvider.json +226 -0
  167. package/locales/pl-PL/setting.json +48 -199
  168. package/locales/pt-BR/common.json +0 -26
  169. package/locales/pt-BR/components.json +15 -0
  170. package/locales/pt-BR/error.json +1 -52
  171. package/locales/pt-BR/modelProvider.json +226 -0
  172. package/locales/pt-BR/setting.json +48 -199
  173. package/locales/ru-RU/common.json +0 -26
  174. package/locales/ru-RU/components.json +15 -0
  175. package/locales/ru-RU/error.json +1 -52
  176. package/locales/ru-RU/modelProvider.json +226 -0
  177. package/locales/ru-RU/setting.json +48 -199
  178. package/locales/tr-TR/common.json +0 -26
  179. package/locales/tr-TR/components.json +15 -0
  180. package/locales/tr-TR/error.json +1 -52
  181. package/locales/tr-TR/modelProvider.json +226 -0
  182. package/locales/tr-TR/setting.json +48 -199
  183. package/locales/vi-VN/common.json +0 -26
  184. package/locales/vi-VN/components.json +15 -0
  185. package/locales/vi-VN/error.json +1 -52
  186. package/locales/vi-VN/modelProvider.json +226 -0
  187. package/locales/vi-VN/setting.json +48 -199
  188. package/locales/zh-CN/common.json +0 -26
  189. package/locales/zh-CN/components.json +15 -0
  190. package/locales/zh-CN/error.json +2 -53
  191. package/locales/zh-CN/modelProvider.json +226 -0
  192. package/locales/zh-CN/setting.json +48 -199
  193. package/locales/zh-TW/common.json +0 -26
  194. package/locales/zh-TW/components.json +15 -0
  195. package/locales/zh-TW/error.json +1 -52
  196. package/locales/zh-TW/modelProvider.json +226 -0
  197. package/locales/zh-TW/setting.json +48 -199
  198. package/package.json +120 -116
  199. package/scripts/mdxWorkflow/index.ts +48 -0
  200. package/src/app/api/chat/[provider]/route.test.ts +4 -9
  201. package/src/app/api/chat/[provider]/route.ts +6 -23
  202. package/src/app/api/chat/{[provider]/agentRuntime.test.ts → agentRuntime.test.ts} +12 -12
  203. package/src/app/api/chat/{[provider]/agentRuntime.ts → agentRuntime.ts} +11 -30
  204. package/src/app/api/chat/auth/index.ts +42 -0
  205. package/src/app/api/chat/models/[provider]/route.ts +45 -0
  206. package/src/app/api/config/__snapshots__/route.test.ts.snap +127 -0
  207. package/src/app/api/config/route.test.ts +170 -0
  208. package/src/app/api/config/route.ts +46 -11
  209. package/src/app/api/plugin/gateway/route.ts +1 -1
  210. package/src/app/settings/llm/Azure/index.tsx +36 -43
  211. package/src/app/settings/llm/Bedrock/index.tsx +12 -20
  212. package/src/app/settings/llm/Ollama/index.tsx +2 -2
  213. package/src/app/settings/llm/OpenAI/index.tsx +9 -121
  214. package/src/app/settings/llm/OpenRouter/index.tsx +1 -1
  215. package/src/app/settings/llm/TogetherAI/index.tsx +0 -1
  216. package/src/app/settings/llm/components/ProviderConfig/index.tsx +48 -32
  217. package/src/app/settings/llm/components/ProviderModelList/CustomModelOption.tsx +94 -0
  218. package/src/app/settings/llm/components/ProviderModelList/MaxTokenSlider.tsx +88 -0
  219. package/src/app/settings/llm/components/ProviderModelList/ModelConfigModal.tsx +128 -0
  220. package/src/app/settings/llm/components/ProviderModelList/ModelFetcher.tsx +81 -0
  221. package/src/app/settings/llm/components/ProviderModelList/Option.tsx +38 -0
  222. package/src/app/settings/llm/components/ProviderModelList/index.tsx +142 -0
  223. package/src/app/settings/llm/const.ts +1 -1
  224. package/src/app/settings/llm/index.tsx +7 -6
  225. package/src/app/settings/tts/TTS/index.tsx +1 -1
  226. package/src/components/AntdStaticMethods/index.test.tsx +43 -0
  227. package/src/components/ModelIcon/index.tsx +25 -7
  228. package/src/components/ModelSelect/index.tsx +67 -56
  229. package/src/config/modelProviders/anthropic.ts +6 -1
  230. package/src/config/modelProviders/azure.ts +42 -0
  231. package/src/config/modelProviders/bedrock.ts +4 -1
  232. package/src/config/modelProviders/google.ts +2 -14
  233. package/src/config/modelProviders/groq.ts +3 -0
  234. package/src/config/modelProviders/index.ts +19 -14
  235. package/src/config/modelProviders/mistral.ts +5 -0
  236. package/src/config/modelProviders/moonshot.ts +3 -1
  237. package/src/config/modelProviders/ollama.ts +6 -17
  238. package/src/config/modelProviders/openai.ts +9 -13
  239. package/src/config/modelProviders/openrouter.ts +6 -1
  240. package/src/config/modelProviders/perplexity.ts +2 -0
  241. package/src/config/modelProviders/togetherai.ts +11 -0
  242. package/src/config/modelProviders/zeroone.ts +3 -0
  243. package/src/config/modelProviders/zhipu.ts +3 -0
  244. package/src/config/server/provider.ts +52 -7
  245. package/src/const/auth.ts +0 -1
  246. package/src/const/{settings.ts → settings/index.ts} +31 -4
  247. package/src/const/url.ts +1 -1
  248. package/src/database/core/db.ts +14 -0
  249. package/src/database/schemas/user.ts +1 -25
  250. package/src/features/AgentSetting/AgentConfig/ModelSelect.tsx +7 -11
  251. package/src/features/ChatInput/STT/common.tsx +80 -78
  252. package/src/features/ChatInput/STT/index.tsx +8 -6
  253. package/src/features/Conversation/Error/APIKeyForm/Bedrock.tsx +8 -8
  254. package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +73 -0
  255. package/src/features/Conversation/Error/APIKeyForm/ProviderAvatar.tsx +74 -0
  256. package/src/features/Conversation/Error/APIKeyForm/index.tsx +25 -49
  257. package/src/features/ModelSwitchPanel/index.tsx +40 -13
  258. package/src/hooks/_header.ts +5 -20
  259. package/src/libs/agent-runtime/BaseAI.ts +17 -1
  260. package/src/libs/agent-runtime/anthropic/index.ts +3 -7
  261. package/src/libs/agent-runtime/azureOpenai/index.test.ts +166 -0
  262. package/src/libs/agent-runtime/azureOpenai/index.ts +16 -8
  263. package/src/libs/agent-runtime/bedrock/index.test.ts +199 -22
  264. package/src/libs/agent-runtime/bedrock/index.ts +11 -18
  265. package/src/libs/agent-runtime/groq/index.test.ts +350 -0
  266. package/src/libs/agent-runtime/groq/index.ts +14 -77
  267. package/src/libs/agent-runtime/mistral/index.test.ts +25 -19
  268. package/src/libs/agent-runtime/mistral/index.ts +24 -86
  269. package/src/libs/agent-runtime/moonshot/index.test.ts +2 -2
  270. package/src/libs/agent-runtime/moonshot/index.ts +14 -77
  271. package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +99 -0
  272. package/src/libs/agent-runtime/openai/fixtures/openai-models.json +170 -0
  273. package/src/libs/agent-runtime/openai/index.test.ts +15 -50
  274. package/src/libs/agent-runtime/openai/index.ts +15 -107
  275. package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +82 -0
  276. package/src/libs/agent-runtime/openrouter/fixtures/models.json +62 -0
  277. package/src/libs/agent-runtime/openrouter/index.test.ts +25 -9
  278. package/src/libs/agent-runtime/openrouter/index.ts +42 -84
  279. package/src/libs/agent-runtime/openrouter/type.ts +28 -0
  280. package/src/libs/agent-runtime/togetherai/index.test.ts +12 -9
  281. package/src/libs/agent-runtime/togetherai/index.ts +20 -85
  282. package/src/libs/agent-runtime/utils/anthropicHelpers.test.ts +14 -22
  283. package/src/libs/agent-runtime/utils/anthropicHelpers.ts +4 -10
  284. package/src/libs/agent-runtime/utils/openaiCompatibleFactory/index.ts +147 -0
  285. package/src/libs/agent-runtime/zeroone/index.test.ts +350 -0
  286. package/src/libs/agent-runtime/zeroone/index.ts +14 -77
  287. package/src/locales/default/common.ts +0 -28
  288. package/src/locales/default/components.ts +15 -0
  289. package/src/locales/default/error.ts +2 -54
  290. package/src/locales/default/index.ts +4 -0
  291. package/src/locales/default/modelProvider.ts +229 -0
  292. package/src/locales/default/setting.ts +51 -202
  293. package/src/migrations/FromV3ToV4/fixtures/azure-input-v3.json +79 -0
  294. package/src/migrations/FromV3ToV4/fixtures/azure-output-v4.json +75 -0
  295. package/src/migrations/FromV3ToV4/fixtures/ollama-input-v3.json +85 -0
  296. package/src/migrations/FromV3ToV4/fixtures/ollama-output-v4.json +86 -0
  297. package/src/migrations/FromV3ToV4/fixtures/openai-input-v3.json +77 -0
  298. package/src/migrations/FromV3ToV4/fixtures/openai-output-v4.json +79 -0
  299. package/src/migrations/FromV3ToV4/fixtures/openrouter-input-v3.json +82 -0
  300. package/src/migrations/FromV3ToV4/fixtures/openrouter-output-v4.json +89 -0
  301. package/src/migrations/FromV3ToV4/fixtures/output-v4-from-v1.json +203 -0
  302. package/src/migrations/FromV3ToV4/index.ts +96 -0
  303. package/src/migrations/FromV3ToV4/migrations.test.ts +195 -0
  304. package/src/migrations/FromV3ToV4/types/v3.ts +59 -0
  305. package/src/migrations/FromV3ToV4/types/v4.ts +37 -0
  306. package/src/migrations/index.ts +11 -3
  307. package/src/services/_auth.test.ts +4 -6
  308. package/src/services/_auth.ts +8 -60
  309. package/src/services/_header.ts +5 -22
  310. package/src/services/_url.ts +1 -0
  311. package/src/services/chat.ts +16 -6
  312. package/src/services/global.ts +1 -1
  313. package/src/services/models.ts +23 -0
  314. package/src/services/ollama.ts +2 -2
  315. package/src/store/chat/slices/share/action.test.ts +113 -0
  316. package/src/store/chat/slices/share/action.ts +1 -1
  317. package/src/store/global/slices/common/action.test.ts +166 -1
  318. package/src/store/global/slices/common/action.ts +2 -1
  319. package/src/store/global/slices/settings/{action.test.ts → actions/general.test.ts} +1 -19
  320. package/src/store/global/slices/settings/{action.ts → actions/general.ts} +4 -19
  321. package/src/store/global/slices/settings/actions/index.ts +18 -0
  322. package/src/store/global/slices/settings/actions/llm.test.ts +60 -0
  323. package/src/store/global/slices/settings/actions/llm.ts +88 -0
  324. package/src/store/global/slices/settings/initialState.ts +3 -1
  325. package/src/store/global/slices/settings/reducers/customModelCard.test.ts +204 -0
  326. package/src/store/global/slices/settings/reducers/customModelCard.ts +64 -0
  327. package/src/store/global/slices/settings/selectors/index.ts +1 -0
  328. package/src/store/global/slices/settings/selectors/modelConfig.test.ts +189 -0
  329. package/src/store/global/slices/settings/selectors/modelConfig.ts +179 -0
  330. package/src/store/global/slices/settings/selectors/modelProvider.test.ts +47 -138
  331. package/src/store/global/slices/settings/selectors/modelProvider.ts +102 -243
  332. package/src/store/global/store.ts +1 -1
  333. package/src/types/llm.ts +12 -1
  334. package/src/types/serverConfig.ts +22 -0
  335. package/src/types/settings/index.ts +0 -12
  336. package/src/types/settings/modelProvider.ts +34 -90
  337. package/src/utils/client/switchLang.test.ts +34 -0
  338. package/src/utils/difference.test.ts +46 -0
  339. package/src/utils/difference.ts +15 -2
  340. package/src/utils/fetch.ts +1 -3
  341. package/src/utils/parseModels.ts +62 -0
  342. package/vercel.json +1 -1
  343. package/docs/package.json +0 -5
  344. package/src/features/Conversation/Error/APIKeyForm/Anthropic.tsx +0 -40
  345. package/src/features/Conversation/Error/APIKeyForm/Google.tsx +0 -61
  346. package/src/features/Conversation/Error/APIKeyForm/Groq.tsx +0 -60
  347. package/src/features/Conversation/Error/APIKeyForm/Mistral.tsx +0 -60
  348. package/src/features/Conversation/Error/APIKeyForm/Moonshot.tsx +0 -60
  349. package/src/features/Conversation/Error/APIKeyForm/OpenAI.tsx +0 -63
  350. package/src/features/Conversation/Error/APIKeyForm/OpenRouter.tsx +0 -40
  351. package/src/features/Conversation/Error/APIKeyForm/Perplexity.tsx +0 -60
  352. package/src/features/Conversation/Error/APIKeyForm/TogetherAI.tsx +0 -40
  353. package/src/features/Conversation/Error/APIKeyForm/ZeroOne.tsx +0 -60
  354. package/src/features/Conversation/Error/APIKeyForm/Zhipu.tsx +0 -62
  355. package/src/libs/agent-runtime/utils/env.ts +0 -1
  356. package/src/store/global/slices/settings/selectors/__snapshots__/modelProvider.test.ts.snap +0 -230
  357. /package/src/app/api/chat/{auth.ts → auth/utils.ts} +0 -0
  358. /package/src/components/{AntdStaticMethods.tsx → AntdStaticMethods/index.tsx} +0 -0
@@ -98,7 +98,7 @@ export default {
98
98
  OllamaBizError: '请求 Ollama 服务出错,请根据以下信息排查或重试',
99
99
  OllamaServiceUnavailable: '未检测到 Ollama 服务,请检查是否正常启动',
100
100
 
101
- AgentRuntimeError: 'Lobe 语言模型运行时执行出错,请根据以下信息排查或重试',
101
+ AgentRuntimeError: 'Lobe AI Runtime 执行出错,请根据以下信息排查或重试',
102
102
  /* eslint-enable */
103
103
  },
104
104
  stt: {
@@ -108,59 +108,7 @@ export default {
108
108
  responseError: '服务请求失败,请检查配置或重试',
109
109
  },
110
110
  unlock: {
111
- apikey: {
112
- Anthropic: {
113
- description: '输入你的 Anthropic API Key 即可开始会话。应用不会记录你的 API Key',
114
- title: '使用自定义 Anthropic API Key',
115
- },
116
- Bedrock: {
117
- customRegion: '自定义服务区域',
118
- description:
119
- '输入你的 AWS AccessKeyId / SecretAccessKey 即可开始会话。应用不会记录你的鉴权配置',
120
- title: '使用自定义 Bedrock 鉴权信息',
121
- },
122
- Google: {
123
- description: '输入你的 Google API Key 即可开始会话。应用不会记录你的 API Key',
124
- title: '使用自定义 Google API Key',
125
- },
126
- Groq: {
127
- description: '输入你的 Groq API Key 即可开始会话。应用不会记录你的 API Key',
128
- title: '使用自定义 Groq API Key',
129
- },
130
- Mistral: {
131
- description: '输入你的 Mistral AI API Key 即可开始会话。应用不会记录你的 API Key',
132
- title: '使用自定义 Mistral AI API Key',
133
- },
134
- Moonshot: {
135
- description: '输入你的 Moonshot AI API Key 即可开始会话。应用不会记录你的 API Key',
136
- title: '使用自定义 Moonshot AI API Key',
137
- },
138
- OpenAI: {
139
- addProxyUrl: '添加 OpenAI 代理地址(可选)',
140
- description: '输入你的 OpenAI API Key 即可开始会话。应用不会记录你的 API Key',
141
- title: '使用自定义 OpenAI API Key',
142
- },
143
- OpenRouter: {
144
- description: '输入你的 OpenRouter API Key 即可开始会话。应用不会记录你的 API Key',
145
- title: '使用自定义 OpenRouter API Key',
146
- },
147
- Perplexity: {
148
- description: '输入你的 Perplexity API Key 即可开始会话。应用不会记录你的 API Key',
149
- title: '使用自定义 Perplexity API Key',
150
- },
151
- TogetherAI: {
152
- description: '输入你的 TogetherAI API Key 即可开始会话。应用不会记录你的 API Key',
153
- title: '使用自定义 TogetherAI API Key',
154
- },
155
- ZeroOne: {
156
- description: '输入你的零一万物 API Key 即可开始会话。应用不会记录你的 API Key',
157
- title: '使用自定义零一万物 API Key',
158
- },
159
- Zhipu: {
160
- description: '输入你的 Zhipu API Key 即可开始会话。应用不会记录你的 API Key',
161
- title: '使用自定义 Zhipu API Key',
162
- },
163
- },
111
+ addProxyUrl: '添加 OpenAI 代理地址(可选)',
164
112
  closeMessage: '关闭提示',
165
113
  confirm: '确认并重试',
166
114
  model: {
@@ -1,9 +1,11 @@
1
1
  import tool from '../default/tool';
2
2
  import chat from './chat';
3
3
  import common from './common';
4
+ import components from './components';
4
5
  import error from './error';
5
6
  import market from './market';
6
7
  import migration from './migration';
8
+ import modelProvider from './modelProvider';
7
9
  import plugin from './plugin';
8
10
  import setting from './setting';
9
11
  import welcome from './welcome';
@@ -11,9 +13,11 @@ import welcome from './welcome';
11
13
  const resources = {
12
14
  chat,
13
15
  common,
16
+ components,
14
17
  error,
15
18
  market,
16
19
  migration,
20
+ modelProvider,
17
21
  plugin,
18
22
  setting,
19
23
  tool,
@@ -0,0 +1,229 @@
1
+ export default {
2
+ anthropic: {
3
+ endpoint: {
4
+ desc: '除默认地址外,必须包含 http(s)://',
5
+ placeholder: 'https://api.anthropic.com',
6
+ title: 'API 代理地址',
7
+ },
8
+ title: 'Anthropic',
9
+ token: {
10
+ desc: '填入来自 Anthropic 的 API Key',
11
+ placeholder: 'Anthropic API Key',
12
+ title: 'API Key',
13
+ },
14
+
15
+ unlock: {
16
+ description: '输入你的 Anthropic API Key 即可开始会话。应用不会记录你的 API Key',
17
+ title: '使用自定义 Anthropic API Key',
18
+ },
19
+ },
20
+ azure: {
21
+ azureApiVersion: {
22
+ desc: 'Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)',
23
+ fetch: '获取列表',
24
+ title: 'Azure Api Version',
25
+ },
26
+ empty: '请输入模型 ID 添加第一个模型',
27
+ endpoint: {
28
+ desc: '从 Azure 门户检查资源时,可在“密钥和终结点”部分中找到此值',
29
+ placeholder: 'https://docs-test-001.openai.azure.com',
30
+ title: 'Azure API 地址',
31
+ },
32
+ modelListPlaceholder: '请选择或添加你部署的 OpenAI 模型',
33
+ title: 'Azure OpenAI',
34
+ token: {
35
+ desc: '从 Azure 门户检查资源时,可在“密钥和终结点”部分中找到此值。 可以使用 KEY1 或 KEY2',
36
+ placeholder: 'Azure API Key',
37
+ title: 'API Key',
38
+ },
39
+ unlock: {
40
+ description: '输入你的 Azure OpenAI API Key 即可开始会话',
41
+ title: '使用自定义 Azure OpenAI API Key',
42
+ },
43
+ },
44
+ bedrock: {
45
+ accessKeyId: {
46
+ desc: '填入AWS Access Key Id',
47
+ placeholder: 'AWS Access Key Id',
48
+ title: 'AWS Access Key Id',
49
+ },
50
+ checker: {
51
+ desc: '测试 AccessKeyId / SecretAccessKey 是否填写正确',
52
+ },
53
+ region: {
54
+ desc: '填入 AWS Region',
55
+ placeholder: 'AWS Region',
56
+ title: 'AWS Region',
57
+ },
58
+ secretAccessKey: {
59
+ desc: '填入 AWS Secret Access Key',
60
+ placeholder: 'AWS Secret Access Key',
61
+ title: 'AWS Secret Access Key',
62
+ },
63
+ title: 'Bedrock',
64
+ unlock: {
65
+ customRegion: '自定义服务区域',
66
+ description:
67
+ '输入你的 AWS AccessKeyId / SecretAccessKey 即可开始会话。应用不会记录你的鉴权配置',
68
+ title: '使用自定义 Bedrock 鉴权信息',
69
+ },
70
+ },
71
+ google: {
72
+ title: 'Google',
73
+ token: {
74
+ desc: '填入来自 Google 的 API Key',
75
+ placeholder: 'Google API Key',
76
+ title: 'API Key',
77
+ },
78
+ unlock: {
79
+ description: '输入你的 Google API Key 即可开始会话。应用不会记录你的 API Key',
80
+ title: '使用自定义 Google API Key',
81
+ },
82
+ },
83
+ groq: {
84
+ title: 'Groq',
85
+ token: {
86
+ desc: '填入来自 Groq 的 API Key',
87
+ placeholder: 'Groq API Key',
88
+ title: 'API Key',
89
+ },
90
+ unlock: {
91
+ description: '输入你的 Groq API Key 即可开始会话。应用不会记录你的 API Key',
92
+ title: '使用自定义 Groq API Key',
93
+ },
94
+ },
95
+ mistral: {
96
+ title: 'Mistral AI',
97
+ token: {
98
+ desc: '填入来自 Mistral AI 的 API Key',
99
+ placeholder: 'Mistral AI API Key',
100
+ title: 'API Key',
101
+ },
102
+ unlock: {
103
+ description: '输入你的 Mistral AI API Key 即可开始会话。应用不会记录你的 API Key',
104
+ title: '使用自定义 Mistral AI API Key',
105
+ },
106
+ },
107
+ moonshot: {
108
+ title: 'Moonshot AI',
109
+ token: {
110
+ desc: '填入来自 Moonshot AI 的 API Key',
111
+ placeholder: 'Moonshot AI API Key',
112
+ title: 'API Key',
113
+ },
114
+ unlock: {
115
+ description: '输入你的 Moonshot AI API Key 即可开始会话。应用不会记录你的 API Key',
116
+ title: '使用自定义 Moonshot AI API Key',
117
+ },
118
+ },
119
+ ollama: {
120
+ checker: {
121
+ desc: '测试代理地址是否正确填写',
122
+ },
123
+ customModelName: {
124
+ desc: '增加自定义模型,多个模型使用逗号(,)隔开',
125
+ placeholder: 'vicuna,llava,codellama,llama2:13b-text',
126
+ title: '自定义模型名称',
127
+ },
128
+ endpoint: {
129
+ desc: '填入 Ollama 接口代理地址,本地未额外指定可留空',
130
+ placeholder: 'http://127.0.0.1:11434/v1',
131
+ title: '接口代理地址',
132
+ },
133
+ title: 'Ollama',
134
+ },
135
+ openai: {
136
+ endpoint: {
137
+ desc: '除默认地址外,必须包含 http(s)://',
138
+ placeholder: 'https://api.openai.com/v1',
139
+ title: '接口代理地址',
140
+ },
141
+ title: 'OpenAI',
142
+ token: {
143
+ desc: '使用自己的 OpenAI Key',
144
+ placeholder: 'OpenAI API Key',
145
+ title: 'OpenAI API Key',
146
+ },
147
+ unlock: {
148
+ description: '输入你的 OpenAI API Key 即可开始会话。应用不会记录你的 API Key',
149
+ title: '使用自定义 OpenAI API Key',
150
+ },
151
+ },
152
+ openrouter: {
153
+ checker: {
154
+ desc: '测试代理地址是否正确填写',
155
+ },
156
+ customModelName: {
157
+ desc: '增加自定义模型,多个模型使用逗号(,)隔开',
158
+ placeholder: 'mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free',
159
+ title: '自定义模型名称',
160
+ },
161
+ title: 'OpenRouter',
162
+ token: {
163
+ desc: '填入来自 OpenRouter AI 的 API Key',
164
+ placeholder: 'OpenRouter AI API Key',
165
+ title: 'API Key',
166
+ },
167
+
168
+ unlock: {
169
+ description: '输入你的 OpenRouter API Key 即可开始会话。应用不会记录你的 API Key',
170
+ title: '使用自定义 OpenRouter API Key',
171
+ },
172
+ },
173
+ perplexity: {
174
+ title: 'Perplexity',
175
+ token: {
176
+ desc: '填入来自 Perplexity AI 的 API Key',
177
+ placeholder: 'Perplexity AI API Key',
178
+ title: 'API Key',
179
+ },
180
+ unlock: {
181
+ description: '输入你的 Perplexity API Key 即可开始会话。应用不会记录你的 API Key',
182
+ title: '使用自定义 Perplexity API Key',
183
+ },
184
+ },
185
+ togetherai: {
186
+ checker: {
187
+ desc: '测试代理地址是否正确填写',
188
+ },
189
+ customModelName: {
190
+ desc: '增加自定义模型,多个模型使用逗号(,)隔开',
191
+ placeholder: 'togethercomputer/Llama-2-7B-32K-Instruct,teknium/OpenHermes-2-Mistral-7B',
192
+ title: '自定义模型名称',
193
+ },
194
+ title: 'TogetherAI',
195
+ token: {
196
+ desc: '填入来自 TogetherAI AI 的 API Key',
197
+ placeholder: 'TogetherAI AI API Key',
198
+ title: 'API Key',
199
+ },
200
+ unlock: {
201
+ description: '输入你的 TogetherAI API Key 即可开始会话。应用不会记录你的 API Key',
202
+ title: '使用自定义 TogetherAI API Key',
203
+ },
204
+ },
205
+ zeroone: {
206
+ title: '01.AI 零一万物',
207
+ token: {
208
+ desc: '填入来自 01.AI 零一万物的 API Key',
209
+ placeholder: '01.AI 零一万物 API Key',
210
+ title: 'API Key',
211
+ },
212
+ unlock: {
213
+ description: '输入你的零一万物 API Key 即可开始会话。应用不会记录你的 API Key',
214
+ title: '使用自定义零一万物 API Key',
215
+ },
216
+ },
217
+ zhipu: {
218
+ title: '智谱',
219
+ token: {
220
+ desc: '填入来自智谱的 API Key',
221
+ placeholder: 'Zhipu API Key',
222
+ title: 'API Key',
223
+ },
224
+ unlock: {
225
+ description: '输入你的 Zhipu API Key 即可开始会话。应用不会记录你的 API Key',
226
+ title: '使用自定义 Zhipu API Key',
227
+ },
228
+ },
229
+ };
@@ -31,216 +31,64 @@ export default {
31
31
  sessionWithName: '会话设置 · {{name}}',
32
32
  },
33
33
  llm: {
34
- anthropic: {
35
- endpoint: {
36
- desc: '除默认地址外,必须包含 http(s)://',
37
- placeholder: 'https://api.anthropic.com',
38
- title: 'API 代理地址',
39
- },
40
- title: 'Anthropic',
41
- token: {
42
- desc: '填入来自 Anthropic 的 API Key',
43
- placeholder: 'Anthropic API Key',
44
- title: 'API Key',
45
- },
46
- },
47
- azure: {
48
- azureApiVersion: {
49
- desc: 'Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)',
50
- fetch: '获取列表',
51
- title: 'Azure Api Version',
52
- },
53
- deployments: {
54
- desc: '使用 id=name 的语法填写你的部署模型(如部署名和模型同名,可以只填写模型名称),多个模型使用逗号(,) 隔开',
55
- title: 'Azure 部署模型列表',
56
- },
57
-
58
- endpoint: {
59
- desc: '从 Azure 门户检查资源时,可在“密钥和终结点”部分中找到此值',
60
- placeholder: 'https://docs-test-001.openai.azure.com',
61
- title: 'Azure API 地址',
62
- },
63
- models: {
64
- desc: '支持的模型',
65
- title: '模型列表',
66
- },
67
- title: 'Azure OpenAI',
68
- token: {
69
- desc: '从 Azure 门户检查资源时,可在“密钥和终结点”部分中找到此值。 可以使用 KEY1 或 KEY2',
70
- placeholder: 'Azure API Key',
71
- title: 'API Key',
72
- },
73
- },
74
- bedrock: {
75
- accessKeyId: {
76
- desc: '填入AWS Access Key Id',
77
- placeholder: 'AWS Access Key Id',
78
- title: 'AWS Access Key Id',
79
- },
80
- checker: {
81
- desc: '测试 AccessKeyId / SecretAccessKey 是否填写正确',
82
- },
83
- region: {
84
- desc: '填入 AWS Region',
85
- placeholder: 'AWS Region',
86
- title: 'AWS Region',
87
- },
88
- secretAccessKey: {
89
- desc: '填入 AWS Secret Access Key',
90
- placeholder: 'AWS Secret Access Key',
91
- title: 'AWS Secret Access Key',
92
- },
93
- title: 'Bedrock',
94
- },
95
34
  checker: {
96
35
  button: '检查',
97
36
  desc: '测试 Api Key 与代理地址是否正确填写',
37
+ ollamaDesc: '测试代理地址是否正确填写',
98
38
  pass: '检查通过',
99
39
  title: '连通性检查',
100
40
  },
101
- google: {
102
- title: 'Google',
103
- token: {
104
- desc: '填入来自 Google 的 API Key',
105
- placeholder: 'Google API Key',
106
- title: 'API Key',
107
- },
108
- },
109
- groq: {
110
- title: 'Groq',
111
- token: {
112
- desc: '填入来自 Groq 的 API Key',
113
- placeholder: 'Groq API Key',
114
- title: 'API Key',
115
- },
116
- },
117
- mistral: {
118
- title: 'Mistral AI',
119
- token: {
120
- desc: '填入来自 Mistral AI 的 API Key',
121
- placeholder: 'Mistral AI API Key',
122
- title: 'API Key',
123
- },
124
- },
125
- moonshot: {
126
- title: '月之暗面',
127
- token: {
128
- desc: '填入来自 Moonshot AI 的 API Key',
129
- placeholder: 'Moonshot AI API Key',
130
- title: 'API Key',
131
- },
132
- },
133
- ollama: {
134
- checker: {
135
- desc: '测试代理地址是否正确填写',
136
- },
137
- customModelName: {
138
- desc: '增加自定义模型,多个模型使用逗号(,)隔开',
139
- placeholder: 'vicuna,llava,codellama,llama2:13b-text',
140
- title: '自定义模型名称',
141
- },
142
- endpoint: {
143
- desc: '填入 Ollama 接口代理地址,本地未额外指定可留空',
144
- placeholder: 'http://127.0.0.1:11434/v1',
145
- title: '接口代理地址',
146
- },
147
- title: 'Ollama',
148
- },
149
- openai: {
150
- azureApiVersion: {
151
- desc: 'Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions)',
152
- fetch: '获取列表',
153
- title: 'Azure Api Version',
154
- },
155
- customModelName: {
156
- desc: '增加自定义模型,多个模型使用逗号(,) 隔开',
157
- placeholder: 'model1,model2,model3',
158
- title: '自定义模型名称',
159
- },
160
- endpoint: {
161
- desc: '除默认地址外,必须包含 http(s)://',
162
- placeholder: 'https://api.openai.com/v1',
163
- title: '接口代理地址',
164
- },
165
- models: {
166
- count: '共支持 {{count}} 个模型',
167
- desc: '支持的模型',
168
- fetch: '获取模型列表',
169
- notSupport: 'Azure OpenAI 暂不支持查看模型列表',
170
- notSupportTip: '你需要自行确保部署名称与模型名称一致',
171
- refetch: '重新获取模型列表',
172
- title: '模型列表',
173
- },
174
- title: 'OpenAI',
175
- token: {
176
- desc: '使用自己的 OpenAI Key',
177
- placeholder: 'OpenAI API Key',
178
- title: 'OpenAI API Key',
179
- },
180
- useAzure: {
181
- desc: '使用 Azure 提供的 OpenAI 服务',
182
- fetch: '获取列表',
183
- serverConfig: '管理员在服务端配置开启了 Azure OpenAI,禁止切换',
184
- title: 'Azure OpenAI',
185
- },
186
- },
187
- openrouter: {
188
- checker: {
189
- desc: '测试代理地址是否正确填写',
190
- },
191
- customModelName: {
192
- desc: '增加自定义模型,多个模型使用逗号(,)隔开',
193
- placeholder: 'mistralai/mistral-7b-instruct:free,openchat/openchat-7b:free',
194
- title: '自定义模型名称',
195
- },
196
- title: 'OpenRouter',
197
- token: {
198
- desc: '填入来自 OpenRouter AI 的 API Key',
199
- placeholder: 'OpenRouter AI API Key',
200
- title: 'API Key',
201
- },
202
- },
203
- perplexity: {
204
- title: 'Perplexity',
205
- token: {
206
- desc: '填入来自 Perplexity AI 的 API Key',
207
- placeholder: 'Perplexity AI API Key',
208
- title: 'API Key',
209
- },
210
- },
211
- togetherai: {
212
- checker: {
213
- desc: '测试代理地址是否正确填写',
214
- },
215
- customModelName: {
216
- desc: '增加自定义模型,多个模型使用逗号(,)隔开',
217
- placeholder: 'togethercomputer/Llama-2-7B-32K-Instruct,teknium/OpenHermes-2-Mistral-7B',
218
- title: '自定义模型名称',
219
- },
220
- title: 'TogetherAI',
221
- token: {
222
- desc: '填入来自 TogetherAI AI 的 API Key',
223
- placeholder: 'TogetherAI AI API Key',
224
- title: 'API Key',
225
- },
41
+ customModelCards: {
42
+ addNew: '创建并添加 {{id}} 模型',
43
+ config: '配置模型',
44
+ confirmDelete: '即将删除该自定义模型,删除后将不可恢复,请谨慎操作。',
45
+ modelConfig: {
46
+ azureDeployName: {
47
+ extra: '在 Azure OpenAI 中实际请求的字段',
48
+ placeholder: '请输入 Azure 中的模型部署名称',
49
+ title: '模型部署名称',
50
+ },
51
+ displayName: {
52
+ placeholder: '请输入模型的展示名称,例如 ChatGPT、GPT-4 ',
53
+ title: '模型展示名称',
54
+ },
55
+ files: {
56
+ extra:
57
+ '当前 LobeChat 的文件上传实现仅为一种 Hack 方案,仅限自行尝试。完整文件上传能力请等待后续实现',
58
+ title: '支持文件上传',
59
+ },
60
+ functionCall: {
61
+ extra:
62
+ '此配置将仅开启 LobeChat 中的函数调用能力,是否支持函数调用完全取决于模型本身,请自行测试该模型的函数调用能力可用性',
63
+ title: '支持函数调用',
64
+ },
65
+ id: {
66
+ extra: '将作为模型标签进行展示',
67
+ placeholder: '请输入模型id,例如 gpt-4-turbo-preview 或 claude-2.1',
68
+ title: '模型 ID',
69
+ },
70
+ modalTitle: '自定义模型配置',
71
+ tokens: { title: '最大 token 数' },
72
+ vision: {
73
+ extra:
74
+ '此配置将仅开启 LobeChat 中的图片上传配置,是否支持识别完全取决于模型本身,请自行测试该模型的视觉识别能力可用性',
75
+ title: '支持视觉识别',
76
+ },
77
+ },
78
+ },
79
+ fetcher: {
80
+ fetch: '获取模型列表',
81
+ fetching: '正在获取模型列表...',
82
+ latestTime: '上次更新时间:{{time}}',
83
+ noLatestTime: '暂未获取列表',
84
+ },
85
+ modelList: {
86
+ desc: '选择在会话中展示的模型,选择的模型会在模型列表中展示',
87
+ placeholder: '请从列表中选择模型',
88
+ title: '模型列表',
89
+ total: '共 {{count}} 个模型可用',
226
90
  },
227
91
  waitingForMore: '更多模型正在 <1>计划接入</1> 中,敬请期待 ✨',
228
- zeroone: {
229
- title: '01.AI 零一万物',
230
- token: {
231
- desc: '填入来自 01.AI 零一万物的 API Key',
232
- placeholder: '01.AI 零一万物 API Key',
233
- title: 'API Key',
234
- },
235
- },
236
- zhipu: {
237
- title: '智谱',
238
- token: {
239
- desc: '填入来自智谱的 API Key',
240
- placeholder: 'Zhipu API Key',
241
- title: 'API Key',
242
- },
243
- },
244
92
  },
245
93
  ollama: {
246
94
  download: {
@@ -396,6 +244,7 @@ export default {
396
244
  settingTTS: {
397
245
  openai: {
398
246
  sttModel: 'OpenAI 语音识别模型',
247
+ title: 'OpenAI',
399
248
  ttsModel: 'OpenAI 语音合成模型',
400
249
  },
401
250
  showAllLocaleVoice: {
@@ -0,0 +1,79 @@
1
+ {
2
+ "exportType": "settings",
3
+ "state": {
4
+ "settings": {
5
+ "defaultAgent": {
6
+ "config": {
7
+ "autoCreateTopicThreshold": 2,
8
+ "displayMode": "chat",
9
+ "enableAutoCreateTopic": true,
10
+ "historyCount": 1,
11
+ "model": "gpt-4-vision-preview",
12
+ "params": {
13
+ "frequency_penalty": 0,
14
+ "presence_penalty": 0,
15
+ "temperature": 0.6,
16
+ "top_p": 1
17
+ },
18
+ "plugins": ["realtime-weather", "steam"],
19
+ "provider": "openai",
20
+ "systemRole": "",
21
+ "tts": {
22
+ "showAllLocaleVoice": false,
23
+ "sttLocale": "auto",
24
+ "ttsService": "openai",
25
+ "voice": { "openai": "alloy" }
26
+ }
27
+ },
28
+ "meta": {}
29
+ },
30
+ "languageModel": {
31
+ "anthropic": { "apiKey": "", "enabled": false },
32
+ "azure": { "apiKey": "", "deployments": "", "enabled": false, "endpoint": "" },
33
+ "bedrock": {
34
+ "accessKeyId": "",
35
+ "enabled": false,
36
+ "region": "us-east-1",
37
+ "secretAccessKey": ""
38
+ },
39
+ "google": { "apiKey": "", "enabled": false },
40
+ "groq": { "apiKey": "", "enabled": false },
41
+ "mistral": { "apiKey": "", "enabled": false },
42
+ "moonshot": { "apiKey": "", "enabled": false },
43
+ "ollama": { "enabled": false, "endpoint": "" },
44
+ "openAI": {
45
+ "OPENAI_API_KEY": "asbdasd",
46
+ "enabled": true,
47
+ "models": [],
48
+ "endpoint": "https://api.chatanywhere.com.cn",
49
+ "customModelName": "deerercsds",
50
+ "useAzure": true,
51
+ "azureApiVersion": "2024-02-15-preview"
52
+ },
53
+ "openrouter": { "apiKey": "", "enabled": false },
54
+ "perplexity": { "apiKey": "", "enabled": false },
55
+ "togetherai": { "apiKey": "", "enabled": false },
56
+ "zeroone": { "apiKey": "", "enabled": false },
57
+ "zhipu": { "apiKey": "", "enabled": false },
58
+ "openai": {
59
+ "OPENAI_API_KEY": "",
60
+ "models": ["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4"],
61
+ "endpoint": ""
62
+ }
63
+ },
64
+ "sync": { "webrtc": { "enabled": false } },
65
+ "tool": { "dalle": { "autoGenerate": false } },
66
+ "tts": {
67
+ "openAI": { "sttModel": "whisper-1", "ttsModel": "tts-1" },
68
+ "sttAutoStop": true,
69
+ "sttServer": "openai"
70
+ },
71
+ "fontSize": 14,
72
+ "language": "auto",
73
+ "themeMode": "auto",
74
+ "primaryColor": "",
75
+ "neutralColor": ""
76
+ }
77
+ },
78
+ "version": 3
79
+ }