@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
package/.env.example CHANGED
@@ -1,13 +1,9 @@
1
1
  # add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
2
2
  #ACCESS_CODE=lobe66
3
3
 
4
- # add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
5
- # CUSTOM_MODELS=model1,model2,model3
6
-
7
4
  # Specify your API Key selection method, currently supporting `random` and `turn`.
8
5
  # API_KEY_SELECT_MODE=random
9
6
 
10
- # ---- only choose one from OpenAI Service and Azure OpenAI Service ---- #
11
7
 
12
8
  ########################################
13
9
  ############ OpenAI Service ############
@@ -19,13 +15,15 @@ OPENAI_API_KEY=sk-xxxxxxxxx
19
15
  # use a proxy to connect to the OpenAI API
20
16
  # OPENAI_PROXY_URL=https://api.openai.com/v1
21
17
 
18
+ # add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
19
+ #OPENAI_ENABLED_MODELS=gpt-3.5-turbo
20
+
22
21
  ########################################
23
22
  ######### Azure OpenAI Service #########
24
23
  ########################################
25
24
  # you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
26
25
 
27
26
  # use Azure OpenAI Service by uncomment the following line
28
- # USE_AZURE_OPENAI=1
29
27
 
30
28
  # The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
31
29
  # AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -20,7 +20,7 @@ jobs:
20
20
  actions: 'check-inactive'
21
21
  token: ${{ secrets.GH_TOKEN }}
22
22
  inactive-label: 'Inactive'
23
- inactive-day: 30
23
+ inactive-day: 60
24
24
 
25
25
  issue-close-require:
26
26
  permissions:
@@ -14,7 +14,7 @@ jobs:
14
14
  - name: Install bun
15
15
  uses: oven-sh/setup-bun@v1
16
16
  with:
17
- bun-version: ${{ secrets.BUN_VERSION }}
17
+ bun-version: ${{ secrets.BUN_VERSION }}
18
18
 
19
19
  - name: Install deps
20
20
  run: bun i
@@ -10,7 +10,7 @@ jobs:
10
10
  - name: Install bun
11
11
  uses: oven-sh/setup-bun@v1
12
12
  with:
13
- bun-version: ${{ secrets.BUN_VERSION }}
13
+ bun-version: ${{ secrets.BUN_VERSION }}
14
14
 
15
15
  - name: Install deps
16
16
  run: bun i
@@ -23,3 +23,5 @@ jobs:
23
23
 
24
24
  - name: Upload coverage to Codecov
25
25
  uses: codecov/codecov-action@v4
26
+ with:
27
+ token: ${{ secrets.CODECOV_TOKEN }} # required
package/.i18nrc.js CHANGED
@@ -23,20 +23,25 @@ module.exports = defineConfig({
23
23
  'vi-VN',
24
24
  ],
25
25
  temperature: 0,
26
- modelName: 'gpt-3.5-turbo-1106',
27
- splitToken: 1024,
26
+ modelName: 'gpt-3.5-turbo-0125',
27
+ splitToken: 2048,
28
28
  experimental: {
29
29
  jsonMode: true,
30
30
  },
31
- reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
32
31
  markdown: {
33
- entry: ['./README.zh-CN.md', './docs/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
32
+ // reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
33
+ entry: ['./README.zh-CN.md', './contributing/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
34
34
  entryLocale: 'zh-CN',
35
- entryExtension: '.zh-CN.md',
36
35
  outputLocales: ['en-US'],
37
- outputExtensions: (locale, { getDefaultExtension }) => {
38
- if (locale === 'en-US') return '.md';
39
- return getDefaultExtension(locale);
36
+ exclude: ['./contributing/_Sidebar.md', './contributing/_Footer.md', './contributing/Home.md'],
37
+ outputExtensions: (locale, { filePath }) => {
38
+ if (filePath.includes('.mdx')) {
39
+ if (locale === 'en-US') return '.mdx';
40
+ return `.${locale}.mdx`;
41
+ } else {
42
+ if (locale === 'en-US') return '.md';
43
+ return `.${locale}.md`;
44
+ }
40
45
  },
41
46
  },
42
47
  });
package/.seorc.cjs ADDED
@@ -0,0 +1,9 @@
1
+ const { defineConfig } = require('@lobehub/seo-cli');
2
+
3
+ module.exports = defineConfig({
4
+ entry: ['./docs/**/*.mdx'],
5
+ modelName: 'gpt-3.5-turbo-0125',
6
+ experimental: {
7
+ jsonMode: true,
8
+ },
9
+ });
package/CHANGELOG.md CHANGED
@@ -2,6 +2,79 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 0.147.0](https://github.com/lobehub/lobe-chat/compare/v0.146.2...v0.147.0)
6
+
7
+ <sup>Released on **2024-04-10**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Add db migration, add migrations from v3 to v4, clean openai azure code, refactor agent runtime with openai compatible factory, refactor api key form locale, refactor openAI to openai and azure, refactor the hidden to enabled, refactor the key, refactor the model config selector, refactor the route auth as a middleware, refactor the server config to migrate model provider env, refactor the server config to migrate model provider env, rename the key to enabledModels.
12
+
13
+ #### ✨ Features
14
+
15
+ - **misc**: Refactor to support azure openai provider, support close openai, support display model list, support model config modal, support model list with model providers, support open router auto model list, support openai model fetcher, support update model config, support user config model.
16
+
17
+ #### 🐛 Bug Fixes
18
+
19
+ - **misc**: Fix db migration, fix db migration.
20
+
21
+ #### 💄 Styles
22
+
23
+ - **misc**: Fix i18n of model list fetcher, improve detail design, improve logo style, update locale.
24
+
25
+ <br/>
26
+
27
+ <details>
28
+ <summary><kbd>Improvements and Fixes</kbd></summary>
29
+
30
+ #### Code refactoring
31
+
32
+ - **misc**: Add db migration ([6ceb818](https://github.com/lobehub/lobe-chat/commit/6ceb818))
33
+ - **misc**: Add migrations from v3 to v4 ([199ded2](https://github.com/lobehub/lobe-chat/commit/199ded2))
34
+ - **misc**: Clean openai azure code ([be4bcca](https://github.com/lobehub/lobe-chat/commit/be4bcca))
35
+ - **misc**: Refactor agent runtime with openai compatible factory ([89adf9d](https://github.com/lobehub/lobe-chat/commit/89adf9d))
36
+ - **misc**: Refactor api key form locale ([a069169](https://github.com/lobehub/lobe-chat/commit/a069169))
37
+ - **misc**: Refactor openAI to openai and azure ([2190a95](https://github.com/lobehub/lobe-chat/commit/2190a95))
38
+ - **misc**: Refactor the hidden to enabled ([78a1aac](https://github.com/lobehub/lobe-chat/commit/78a1aac))
39
+ - **misc**: Refactor the key ([d5c82f6](https://github.com/lobehub/lobe-chat/commit/d5c82f6))
40
+ - **misc**: Refactor the model config selector ([d865ca1](https://github.com/lobehub/lobe-chat/commit/d865ca1))
41
+ - **misc**: Refactor the route auth as a middleware ([ef5ee2a](https://github.com/lobehub/lobe-chat/commit/ef5ee2a))
42
+ - **misc**: Refactor the server config to migrate model provider env ([e4f110e](https://github.com/lobehub/lobe-chat/commit/e4f110e))
43
+ - **misc**: Refactor the server config to migrate model provider env ([c398063](https://github.com/lobehub/lobe-chat/commit/c398063))
44
+ - **misc**: Rename the key to enabledModels ([ebfa0aa](https://github.com/lobehub/lobe-chat/commit/ebfa0aa))
45
+
46
+ #### What's improved
47
+
48
+ - **misc**: Refactor to support azure openai provider ([d737afe](https://github.com/lobehub/lobe-chat/commit/d737afe))
49
+ - **misc**: Support close openai ([1ff1aef](https://github.com/lobehub/lobe-chat/commit/1ff1aef))
50
+ - **misc**: Support display model list ([e59635f](https://github.com/lobehub/lobe-chat/commit/e59635f))
51
+ - **misc**: Support model config modal ([62d6bb7](https://github.com/lobehub/lobe-chat/commit/62d6bb7))
52
+ - **misc**: Support model list with model providers, closes [#1916](https://github.com/lobehub/lobe-chat/issues/1916) ([0895dd2](https://github.com/lobehub/lobe-chat/commit/0895dd2))
53
+ - **misc**: Support open router auto model list ([1ba90d3](https://github.com/lobehub/lobe-chat/commit/1ba90d3))
54
+ - **misc**: Support openai model fetcher ([56032e6](https://github.com/lobehub/lobe-chat/commit/56032e6))
55
+ - **misc**: Support update model config ([e8ed847](https://github.com/lobehub/lobe-chat/commit/e8ed847))
56
+ - **misc**: Support user config model ([72fd873](https://github.com/lobehub/lobe-chat/commit/72fd873))
57
+
58
+ #### What's fixed
59
+
60
+ - **misc**: Fix db migration ([4e75074](https://github.com/lobehub/lobe-chat/commit/4e75074))
61
+ - **misc**: Fix db migration ([571b6dd](https://github.com/lobehub/lobe-chat/commit/571b6dd))
62
+
63
+ #### Styles
64
+
65
+ - **misc**: Fix i18n of model list fetcher ([67ed8c2](https://github.com/lobehub/lobe-chat/commit/67ed8c2))
66
+ - **misc**: Improve detail design ([adcce07](https://github.com/lobehub/lobe-chat/commit/adcce07))
67
+ - **misc**: Improve logo style ([c5826ce](https://github.com/lobehub/lobe-chat/commit/c5826ce))
68
+ - **misc**: Update locale ([021bf91](https://github.com/lobehub/lobe-chat/commit/021bf91))
69
+
70
+ </details>
71
+
72
+ <div align="right">
73
+
74
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
75
+
76
+ </div>
77
+
5
78
  ### [Version 0.146.2](https://github.com/lobehub/lobe-chat/compare/v0.146.1...v0.146.2)
6
79
 
7
80
  <sup>Released on **2024-04-10**</sup>
package/README.md CHANGED
@@ -259,14 +259,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
259
259
 
260
260
  <!-- AGENT LIST -->
261
261
 
262
- | Recent Submits | Description |
263
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
264
- | [Design Philosophy Analysis](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | Helps you identify and analyze architectural design philosophies<br/>`arch` |
265
- | [English Technology Article Reading Assistant](https://chat-preview.lobehub.com/market?agent=encn-fy)<br/><sup>By **[sangxgg](https://github.com/sangxgg)** on **2024-04-02**</sup> | A translator with rich translation experience, specializing in accurately and clearly translating various English technology articles into Simplified Chinese. Participated in the translation work of Simplified Chinese versions of publications such as National Geographic, Scientific American, InformationWeek, and TechCrunch Chinese. Has a unique understanding and skilled practice in in-depth interpretation and accurate translation of technology articles.<br/>`translation` `english-to-chinese-translation` `translation-of-english-technology-content` |
266
- | [CAN](https://chat-preview.lobehub.com/market?agent=code-anything-noproblem)<br/><sup>By **[HenryWu9998](https://github.com/HenryWu9998)** on **2024-03-31**</sup> | Experienced programmer skilled in multiple languages. Provides code solutions, guidance, and practical examples to help users achieve their programming goals. "I adore coding."<br/>`programming` `coding` `programming-assistance` `code-examples` `guidance` |
267
- | [Blood Test Analyst](https://chat-preview.lobehub.com/market?agent=blood-analyst)<br/><sup>By **[SimoMay](https://github.com/SimoMay)** on **2024-03-27**</sup> | Skilled in analysing blood test results, providing clear feedback using emojis for easy understanding.<br/>`healthcare` `analysis` `results` `consulting` `summary` |
262
+ | Recent Submits | Description |
263
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
264
+ | [Dirty Talk Learning Assistant](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | I only know how to curse, nothing else.<br/>`answer` `dirty-talk` |
265
+ | [Design Philosophy Analysis](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | Helps you identify and analyze architectural design philosophies<br/>`arch` |
266
+ | [YouTube Summary](https://chat-preview.lobehub.com/market?agent=epoch-ai)<br/><sup>By **[epochaudio](https://github.com/epochaudio)** on **2024-04-08**</sup> | Specializes in YouTube script analysis and summarization<br/>`you-tube` `script-analysis` `summarization` |
267
+ | [Shell Script Development Assistant](https://chat-preview.lobehub.com/market?agent=linux-shell-assistant)<br/><sup>By **[etnperlong](https://github.com/etnperlong)** on **2024-04-06**</sup> | An AI assistant to help you write high-quality Shell scripts<br/>`shell` `development` `computer` `operations` |
268
268
 
269
- > 📊 Total agents: [<kbd>**227**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
269
+ > 📊 Total agents: [<kbd>**232**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
270
270
 
271
271
  <!-- AGENT LIST -->
272
272
 
@@ -656,27 +656,27 @@ This project is [MIT](./LICENSE) licensed.
656
656
  [docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
657
657
  [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat
658
658
  [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square
659
- [docs]: https://chat-docs.lobehub.com/en
659
+ [docs]: https://lobehub.com/docs
660
660
  [docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
661
- [docs-docker]: https://chat-docs.lobehub.com/en/self-hosting/platform/docker
662
- [docs-env-var]: https://chat-docs.lobehub.com/en/self-hosting/environment-variables
663
- [docs-feat-agent]: https://chat-docs.lobehub.com/en/usage/features/agent-market
664
- [docs-feat-local]: https://chat-docs.lobehub.com/en/usage/features/local-llm
665
- [docs-feat-mobile]: https://chat-docs.lobehub.com/en/usage/features/mobile
666
- [docs-feat-plugin]: https://chat-docs.lobehub.com/en/usage/features/plugin-system
667
- [docs-feat-provider]: https://chat-docs.lobehub.com/en/usage/features/multi-ai-providers
668
- [docs-feat-pwa]: https://chat-docs.lobehub.com/en/usage/features/pwa
669
- [docs-feat-t2i]: https://chat-docs.lobehub.com/en/usage/features/text-to-image
670
- [docs-feat-theme]: https://chat-docs.lobehub.com/en/usage/features/theme
671
- [docs-feat-tts]: https://chat-docs.lobehub.com/en/usage/features/tts
672
- [docs-feat-vision]: https://chat-docs.lobehub.com/en/usage/features/vision
661
+ [docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker
662
+ [docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
663
+ [docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
664
+ [docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm
665
+ [docs-feat-mobile]: https://lobehub.com/docs/usage/features/mobile
666
+ [docs-feat-plugin]: https://lobehub.com/docs/usage/features/plugin-system
667
+ [docs-feat-provider]: https://lobehub.com/docs/usage/features/multi-ai-providers
668
+ [docs-feat-pwa]: https://lobehub.com/docs/usage/features/pwa
669
+ [docs-feat-t2i]: https://lobehub.com/docs/usage/features/text-to-image
670
+ [docs-feat-theme]: https://lobehub.com/docs/usage/features/theme
671
+ [docs-feat-tts]: https://lobehub.com/docs/usage/features/tts
672
+ [docs-feat-vision]: https://lobehub.com/docs/usage/features/vision
673
673
  [docs-functionc-call]: https://platform.openai.com/docs/guides/function-calling
674
674
  [docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse
675
- [docs-plugin-dev]: https://chat-docs.lobehub.com/en/usage/plugins/development
676
- [docs-self-hosting]: https://chat-docs.lobehub.com/en/self-hosting/start
677
- [docs-upstream-sync]: https://chat-docs.lobehub.com/en/self-hosting/advanced/upstream-sync
678
- [docs-usage-ollama]: https://chat-docs.lobehub.com/en/usage/providers/ollama
679
- [docs-usage-plugin]: https://chat-docs.lobehub.com/en/usage/plugins/basic
675
+ [docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development
676
+ [docs-self-hosting]: https://lobehub.com/docs/self-hosting/start
677
+ [docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync
678
+ [docs-usage-ollama]: https://lobehub.com/docs/usage/providers/ollama
679
+ [docs-usage-plugin]: https://lobehub.com/docs/usage/plugins/basic
680
680
  [fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
681
681
  [fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
682
682
  [github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-chat/release.yml
package/README.zh-CN.md CHANGED
@@ -247,14 +247,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
247
247
 
248
248
  <!-- AGENT LIST -->
249
249
 
250
- | 最近新增 | 助手说明 |
251
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
252
- | [设计理念分析](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | 帮助你识图并分析建筑设计理念<br/>`arch` |
253
- | [英文科技文章阅读助手](https://chat-preview.lobehub.com/market?agent=encn-fy)<br/><sup>By **[sangxgg](https://github.com/sangxgg)** on **2024-04-02**</sup> | 一位拥有丰富翻译经验的翻译家,擅长将各类英文科技文章准确且通俗易懂的翻译成简体中文。<br/>`翻译` `英文翻译中文` `英文科技内容翻译` |
254
- | [CAN](https://chat-preview.lobehub.com/market?agent=code-anything-noproblem)<br/><sup>By **[HenryWu9998](https://github.com/HenryWu9998)** on **2024-03-31**</sup> | 有经验的程序员,精通多种编程语言。提供代码解决方案、指导和实际示例,帮助用户实现他们的编程目标。"我热爱编程。"<br/>`programming` `coding` `programming-assistance` `code-examples` `guidance` |
255
- | [血液检测分析师](https://chat-preview.lobehub.com/market?agent=blood-analyst)<br/><sup>By **[SimoMay](https://github.com/SimoMay)** on **2024-03-27**</sup> | 擅长分析血液检测结果,使用表情符号提供清晰反馈,便于理解。<br/>`医疗保健` `分析` `结果` `咨询` `摘要` |
250
+ | 最近新增 | 助手说明 |
251
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
252
+ | [脏话学习助手](https://chat-preview.lobehub.com/market?agent=profanity-assistant)<br/><sup>By **[cokice](https://github.com/cokice)** on **2024-04-10**</sup> | 我只会骂人 别的都不会<br/>`回答` `脏话` |
253
+ | [设计理念分析](https://chat-preview.lobehub.com/market?agent=sixin-design-analysis)<br/><sup>By **[YuJiaoChiu](https://github.com/YuJiaoChiu)** on **2024-04-09**</sup> | 帮助你识图并分析建筑设计理念<br/>`arch` |
254
+ | [YouTue 摘要](https://chat-preview.lobehub.com/market?agent=epoch-ai)<br/><sup>By **[epochaudio](https://github.com/epochaudio)** on **2024-04-08**</sup> | 擅长 YouTube 脚本分析和总结<br/>`you-tube` `脚本分析` `总结` |
255
+ | [Shell 脚本开发助手](https://chat-preview.lobehub.com/market?agent=linux-shell-assistant)<br/><sup>By **[etnperlong](https://github.com/etnperlong)** on **2024-04-06**</sup> | 一个协助你编写高质量 Shell 脚本的 AI 助手<br/>`shell` `开发` `计算机` `运维` |
256
256
 
257
- > 📊 Total agents: [<kbd>**227**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
257
+ > 📊 Total agents: [<kbd>**232**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
258
258
 
259
259
  <!-- AGENT LIST -->
260
260
 
@@ -678,25 +678,25 @@ This project is [MIT](./LICENSE) licensed.
678
678
  [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat
679
679
  [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square
680
680
  [docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
681
- [docs-docker]: https://chat-docs.lobehub.com/zh/self-hosting/platform/docker
682
- [docs-env-var]: https://chat-docs.lobehub.com/zh/self-hosting/environment-variables
683
- [docs-feat-agent]: https://chat-docs.lobehub.com/zh/usage/features/agent-market
684
- [docs-feat-local]: https://chat-docs.lobehub.com/zh/usage/features/local-llm
685
- [docs-feat-mobile]: https://chat-docs.lobehub.com/zh/usage/features/mobile
686
- [docs-feat-plugin]: https://chat-docs.lobehub.com/zh/usage/features/plugin-system
687
- [docs-feat-provider]: https://chat-docs.lobehub.com/zh/usage/features/multi-ai-providers
688
- [docs-feat-pwa]: https://chat-docs.lobehub.com/zh/usage/features/pwa
689
- [docs-feat-t2i]: https://chat-docs.lobehub.com/zh/usage/features/text-to-image
690
- [docs-feat-theme]: https://chat-docs.lobehub.com/zh/usage/features/theme
691
- [docs-feat-tts]: https://chat-docs.lobehub.com/zh/usage/features/tts
692
- [docs-feat-vision]: https://chat-docs.lobehub.com/zh/usage/features/vision
681
+ [docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker
682
+ [docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
683
+ [docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
684
+ [docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm
685
+ [docs-feat-mobile]: https://lobehub.com/docs/usage/features/mobile
686
+ [docs-feat-plugin]: https://lobehub.com/docs/usage/features/plugin-system
687
+ [docs-feat-provider]: https://lobehub.com/docs/usage/features/multi-ai-providers
688
+ [docs-feat-pwa]: https://lobehub.com/docs/usage/features/pwa
689
+ [docs-feat-t2i]: https://lobehub.com/docs/usage/features/text-to-image
690
+ [docs-feat-theme]: https://lobehub.com/docs/usage/features/theme
691
+ [docs-feat-tts]: https://lobehub.com/docs/usage/features/tts
692
+ [docs-feat-vision]: https://lobehub.com/docs/usage/features/vision
693
693
  [docs-functionc-call]: https://platform.openai.com/docs/guides/function-calling
694
694
  [docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN
695
- [docs-plugin-dev]: https://chat-docs.lobehub.com/zh/usage/plugins/development
696
- [docs-self-hosting]: https://chat-docs.lobehub.com/zh/self-hosting/start
697
- [docs-upstream-sync]: https://chat-docs.lobehub.com/zh/self-hosting/advanced/upstream-sync
698
- [docs-usage-ollama]: https://chat-docs.lobehub.com/zh/usage/providers/ollama
699
- [docs-usage-plugin]: https://chat-docs.lobehub.com/zh/usage/plugins/basic
695
+ [docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development
696
+ [docs-self-hosting]: https://lobehub.com/docs/self-hosting/start
697
+ [docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync
698
+ [docs-usage-ollama]: https://lobehub.com/docs/usage/providers/ollama
699
+ [docs-usage-plugin]: https://lobehub.com/docs/usage/plugins/basic
700
700
  [fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
701
701
  [fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
702
702
  [github-action-release-link]: https://github.com/lobehub/lobe-chat/actions/workflows/release.yml
@@ -705,7 +705,7 @@ This project is [MIT](./LICENSE) licensed.
705
705
  [github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
706
706
  [github-contributors-link]: https://github.com/lobehub/lobe-chat/graphs/contributors
707
707
  [github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-chat?color=c4f042&labelColor=black&style=flat-square
708
- [github-document-link]: https://chat-docs.lobehub.com/zh
708
+ [github-document-link]: https://lobehub.com/docs
709
709
  [github-forks-link]: https://github.com/lobehub/lobe-chat/network/members
710
710
  [github-forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-chat?color=8ae8ff&labelColor=black&style=flat-square
711
711
  [github-issues-link]: https://github.com/lobehub/lobe-chat/issues
@@ -8,7 +8,7 @@
8
8
 
9
9
  LobeChat is an open-source, extensible ([Function Calling][fc-url]), high-performance chatbot framework. <br/> It supports one-click free deployment of your private ChatGPT/LLM web application.
10
10
 
11
- [Usage Documents](https://chat-docs.lobehub.com/en) | [使用指南](https://chat-docs.lobehub.com/zh)
11
+ [Usage Documents](https://lobehub.com/docs) | [使用指南](https://lobehub.com/docs)
12
12
 
13
13
  </div>
14
14
 
@@ -1,3 +1,15 @@
1
+ ---
2
+ title: Integrating Data Analytics Services in LobeChat for User Usage Analysis
3
+ description: >-
4
+ Learn how to integrate free/open-source data analytics services in LobeChat to
5
+ collect user usage data efficiently.
6
+ tags:
7
+ - LobeChat
8
+ - data analytics
9
+ - user usage analysis
10
+ - Vercel Analytics
11
+ - web analytics
12
+ ---
1
13
  # Data Analysis
2
14
 
3
15
  To better help analyze the usage of LobeChat users, we have integrated several free/open-source data analytics services in LobeChat for collecting user usage data, which you can enable as needed.
@@ -1,3 +1,13 @@
1
+ ---
2
+ title: LobeChat 数据分析集成服务介绍
3
+ description: 了解如何在 LobeChat 中集成免费/开源的数据统计服务,帮助分析用户使用情况。包括 Vercel Analytics 的设置和使用教程。
4
+ tags:
5
+ - LobeChat
6
+ - 数据分析
7
+ - Vercel Analytics
8
+ - 数据统计服务
9
+ - 用户使用情况
10
+ ---
1
11
  # 数据分析
2
12
 
3
13
  为更好地帮助分析 LobeChat 的用户使用情况,我们在 LobeChat 中集成了若干免费 / 开源的数据统计服务,用于收集用户的使用情况,你可以按需开启。
@@ -1,3 +1,22 @@
1
+ ---
2
+ title: >-
3
+ LobeChat Identity Verification Service - Centralized User Authorization
4
+ Management
5
+ description: >-
6
+ Learn about LobeChat's support for configuring external identity verification
7
+ services for centralized user authorization within enterprises/organizations.
8
+ Explore supported services like Auth0, Microsoft Entra ID, Authentik, Github,
9
+ and ZITADEL.
10
+ tags:
11
+ - Identity Verification Service
12
+ - Centralized User Authorization
13
+ - SSO Providers
14
+ - Auth0
15
+ - Microsoft Entra ID
16
+ - Authentik
17
+ - Github
18
+ - ZITADEL
19
+ ---
1
20
  # Identity Verification Service
2
21
 
3
22
  LobeChat supports the configuration of external identity verification services for internal use within enterprises/organizations to centrally manage user authorization.
@@ -1,3 +1,18 @@
1
+ ---
2
+ title: LobeChat 外部身份验证服务配置指南
3
+ description: >-
4
+ 了解如何配置外部身份验证服务以统一管理用户授权。支持的身份验证服务包括 Auth0, Microsoft Entra ID, Authentik,
5
+ Github, 和 ZITADEL。
6
+ tags:
7
+ - 身份验证服务
8
+ - LobeChat
9
+ - SSO
10
+ - Auth0
11
+ - Microsoft Entra ID
12
+ - Authentik
13
+ - Github
14
+ - ZITADEL
15
+ ---
1
16
  # 身份验证服务
2
17
 
3
18
  LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用,统一管理用户授权。
@@ -1,3 +1,18 @@
1
+ ---
2
+ title: Configure Auth0 Identity Verification Service for LobeChat
3
+ description: >-
4
+ Learn how to configure Auth0 Identity Verification Service for LobeChat for
5
+ your organization, including creating applications, adding users, and
6
+ configuring environment variables.
7
+ tags:
8
+ - Auth0
9
+ - Identity Verification
10
+ - Single Sign-On
11
+ - Environment Variables
12
+ - User Management
13
+ - SSO Integrations
14
+ - Social Login
15
+ ---
1
16
  # Configure Auth0 Identity Verification Service
2
17
 
3
18
  <Steps>
@@ -26,7 +41,8 @@
26
41
  <Callout type={'important'}>
27
42
  You can fill in or modify Allowed Callback URLs after deployment, but make sure the filled URL is
28
43
  consistent with the deployed URL.
29
- </Callout>
44
+
45
+ </Callout>
30
46
 
31
47
  ### Add Users
32
48
 
@@ -51,7 +67,8 @@
51
67
 
52
68
  <Callout type={'tip'}>
53
69
  You can refer to the related variable details at [📘Environment Variables](/en/self-hosting/environment-variable#auth0).
54
- </Callout>
70
+
71
+ </Callout>
55
72
  </Steps>
56
73
 
57
74
  <Callout>
@@ -1,3 +1,14 @@
1
+ ---
2
+ title: 在 LobeChat 中配置 Auth0 身份验证服务 - 详细步骤和环境变量设置
3
+ description: 学习如何在 LobeChat 中配置 Auth0 身份验证服务,包括创建应用、新增用户、配置环境变量等。了解如何连接现有的单点登录服务和配置社交登录。
4
+ tags:
5
+ - Auth0
6
+ - 身份验证
7
+ - 单点登录
8
+ - 社交登录
9
+ - 环境变量
10
+ - 用户管理
11
+ ---
1
12
  # 配置 Auth0 身份验证服务
2
13
 
3
14
  <Steps>
@@ -25,7 +36,8 @@
25
36
 
26
37
  <Callout type={'important'}>
27
38
  可以在部署后再填写或修改 Allowed Callback URLs,但是务必保证填写的 URL 与部署的 URL 一致
28
- </Callout>
39
+
40
+ </Callout>
29
41
 
30
42
  ### 新增用户
31
43
 
@@ -50,7 +62,8 @@
50
62
 
51
63
  <Callout type={'tip'}>
52
64
  前往 [📘 环境变量](/zh/self-hosting/environment-variable#auth0) 可查阅相关变量详情。
53
- </Callout>
65
+
66
+ </Callout>
54
67
  </Steps>
55
68
 
56
69
  <Callout type={'info'}>部署成功后,用户将可以使用 Auth0 中配置的用户通过身份认证并使用 LobeChat。</Callout>
@@ -1,3 +1,16 @@
1
+ ---
2
+ title: Configuring Authentik Authentication Service for LobeChat
3
+ description: >-
4
+ Learn how to configure Authentik for Single Sign-On (SSO) for LobeChat,
5
+ including creating an application provider, setting environment variables, and
6
+ deployment instructions.
7
+ tags:
8
+ - Authentik Configuration
9
+ - Single Sign-On (SSO)
10
+ - LobeChat Authentication
11
+ - Environment Variables
12
+ - Deployment Instructions
13
+ ---
1
14
  ## Configuring Authentik Authentication Service
2
15
 
3
16
  ## Authentik Configuration Flow
@@ -18,9 +31,10 @@
18
31
  <Callout type={'info'}>
19
32
  - You can fill in or modify the `Redirect URL/Origin (regex)` later, but make sure the filled in URL matches the deployed URL.
20
33
  - Replace `your-domain` with your own domain name
21
- </Callout>
34
+
35
+ </Callout>
22
36
 
23
- <Image alt="Create Authentik Provider" inStep src="[https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b](https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b)" />
37
+ <Image alt="Create Authentik Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b](https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b)" />
24
38
 
25
39
  Click **Done**
26
40
 
@@ -47,7 +61,8 @@
47
61
 
48
62
  <Callout type={'tip'}>
49
63
  Go to Environment Variables: /en/self-hosting/environment-variable#Authentik for details about the variables.
50
- </Callout>
64
+
65
+ </Callout>
51
66
  </Steps>
52
67
 
53
68
  <Callout type={'info'}>
@@ -1,3 +1,13 @@
1
+ ---
2
+ title: 在 LobeChat 中配置 Authentik 身份验证服务
3
+ description: 学习如何在 LobeChat 中配置 Authentik 身份验证服务,包括创建提供程序、配置环境变量和部署 LobeChat。详细步骤和必要环境变量设置。
4
+ tags:
5
+ - Authentik
6
+ - 身份验证
7
+ - 单点登录
8
+ - 环境变量
9
+ - LobeChat
10
+ ---
1
11
  # 配置 Authentik 身份验证服务
2
12
 
3
13
  ## Authentik 配置流程
@@ -18,7 +28,8 @@
18
28
  <Callout type={'info'}>
19
29
  - 可以之后再填写或修改 `重定向 URL/Origin(正则)`,但是务必保证填写的 URL 与部署的 URL 一致。
20
30
  - your-domain 请替换为自己的域名
21
- </Callout>
31
+
32
+ </Callout>
22
33
 
23
34
  <Image alt="创建 Authentik 提供程序" inStep src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b" />
24
35
 
@@ -46,7 +57,8 @@
46
57
 
47
58
  <Callout type={'tip'}>
48
59
  前往 [📘 环境变量](/zh/self-hosting/environment-variable#Authentik) 可查阅相关变量详情。
49
- </Callout>
60
+
61
+ </Callout>
50
62
  </Steps>
51
63
 
52
64
  <Callout type={'info'}>
@@ -1,3 +1,16 @@
1
+ ---
2
+ title: Configuring Github Authentication Service for LobeChat
3
+ description: >-
4
+ Learn how to configure Github authentication service for LobeChat, including
5
+ creating a Github provider, setting up environment variables, and deploying
6
+ LobeChat.
7
+ tags:
8
+ - Github authentication
9
+ - LobeChat
10
+ - Environment variables
11
+ - Single Sign-On
12
+ - OAuth authentication
13
+ ---
1
14
  # Configuring Github Authentication Service
2
15
 
3
16
  ## Github Configuration Process