@lobehub/chat 1.11.8 → 1.12.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 (440) hide show
  1. package/.github/workflows/release.yml +2 -1
  2. package/.github/workflows/test.yml +2 -1
  3. package/CHANGELOG.md +50 -0
  4. package/Dockerfile.database +2 -0
  5. package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +65 -0
  6. package/locales/ar/chat.json +46 -3
  7. package/locales/ar/common.json +1 -0
  8. package/locales/ar/components.json +2 -0
  9. package/locales/ar/error.json +1 -0
  10. package/locales/ar/file.json +91 -0
  11. package/locales/ar/knowledgeBase.json +31 -0
  12. package/locales/ar/portal.json +1 -0
  13. package/locales/bg-BG/chat.json +46 -3
  14. package/locales/bg-BG/common.json +1 -0
  15. package/locales/bg-BG/components.json +2 -0
  16. package/locales/bg-BG/error.json +1 -0
  17. package/locales/bg-BG/file.json +91 -0
  18. package/locales/bg-BG/knowledgeBase.json +31 -0
  19. package/locales/bg-BG/portal.json +1 -0
  20. package/locales/de-DE/chat.json +46 -3
  21. package/locales/de-DE/common.json +1 -0
  22. package/locales/de-DE/components.json +2 -0
  23. package/locales/de-DE/error.json +1 -0
  24. package/locales/de-DE/file.json +91 -0
  25. package/locales/de-DE/knowledgeBase.json +31 -0
  26. package/locales/de-DE/portal.json +1 -0
  27. package/locales/en-US/chat.json +46 -3
  28. package/locales/en-US/common.json +1 -0
  29. package/locales/en-US/components.json +2 -0
  30. package/locales/en-US/error.json +1 -0
  31. package/locales/en-US/file.json +91 -0
  32. package/locales/en-US/knowledgeBase.json +31 -0
  33. package/locales/en-US/portal.json +1 -0
  34. package/locales/es-ES/chat.json +46 -3
  35. package/locales/es-ES/common.json +1 -0
  36. package/locales/es-ES/components.json +2 -0
  37. package/locales/es-ES/error.json +1 -0
  38. package/locales/es-ES/file.json +91 -0
  39. package/locales/es-ES/knowledgeBase.json +31 -0
  40. package/locales/es-ES/portal.json +1 -0
  41. package/locales/fr-FR/chat.json +46 -3
  42. package/locales/fr-FR/common.json +1 -0
  43. package/locales/fr-FR/components.json +2 -0
  44. package/locales/fr-FR/error.json +1 -0
  45. package/locales/fr-FR/file.json +91 -0
  46. package/locales/fr-FR/knowledgeBase.json +31 -0
  47. package/locales/fr-FR/portal.json +1 -0
  48. package/locales/it-IT/chat.json +46 -3
  49. package/locales/it-IT/common.json +1 -0
  50. package/locales/it-IT/components.json +2 -0
  51. package/locales/it-IT/error.json +1 -0
  52. package/locales/it-IT/file.json +91 -0
  53. package/locales/it-IT/knowledgeBase.json +31 -0
  54. package/locales/it-IT/portal.json +1 -0
  55. package/locales/ja-JP/chat.json +46 -3
  56. package/locales/ja-JP/common.json +1 -0
  57. package/locales/ja-JP/components.json +2 -0
  58. package/locales/ja-JP/error.json +1 -0
  59. package/locales/ja-JP/file.json +91 -0
  60. package/locales/ja-JP/knowledgeBase.json +31 -0
  61. package/locales/ja-JP/portal.json +1 -0
  62. package/locales/ko-KR/chat.json +46 -3
  63. package/locales/ko-KR/common.json +1 -0
  64. package/locales/ko-KR/components.json +2 -0
  65. package/locales/ko-KR/error.json +1 -0
  66. package/locales/ko-KR/file.json +91 -0
  67. package/locales/ko-KR/knowledgeBase.json +31 -0
  68. package/locales/ko-KR/portal.json +1 -0
  69. package/locales/nl-NL/chat.json +46 -3
  70. package/locales/nl-NL/common.json +1 -0
  71. package/locales/nl-NL/components.json +2 -0
  72. package/locales/nl-NL/error.json +1 -0
  73. package/locales/nl-NL/file.json +91 -0
  74. package/locales/nl-NL/knowledgeBase.json +31 -0
  75. package/locales/nl-NL/portal.json +1 -0
  76. package/locales/pl-PL/chat.json +46 -3
  77. package/locales/pl-PL/common.json +1 -0
  78. package/locales/pl-PL/components.json +2 -0
  79. package/locales/pl-PL/error.json +1 -0
  80. package/locales/pl-PL/file.json +91 -0
  81. package/locales/pl-PL/knowledgeBase.json +31 -0
  82. package/locales/pl-PL/portal.json +1 -0
  83. package/locales/pt-BR/chat.json +46 -3
  84. package/locales/pt-BR/common.json +1 -0
  85. package/locales/pt-BR/components.json +2 -0
  86. package/locales/pt-BR/error.json +1 -0
  87. package/locales/pt-BR/file.json +91 -0
  88. package/locales/pt-BR/knowledgeBase.json +31 -0
  89. package/locales/pt-BR/portal.json +1 -0
  90. package/locales/ru-RU/chat.json +46 -3
  91. package/locales/ru-RU/common.json +1 -0
  92. package/locales/ru-RU/components.json +2 -0
  93. package/locales/ru-RU/error.json +1 -0
  94. package/locales/ru-RU/file.json +91 -0
  95. package/locales/ru-RU/knowledgeBase.json +31 -0
  96. package/locales/ru-RU/portal.json +1 -0
  97. package/locales/tr-TR/chat.json +46 -3
  98. package/locales/tr-TR/common.json +1 -0
  99. package/locales/tr-TR/components.json +2 -0
  100. package/locales/tr-TR/error.json +1 -0
  101. package/locales/tr-TR/file.json +91 -0
  102. package/locales/tr-TR/knowledgeBase.json +31 -0
  103. package/locales/tr-TR/portal.json +1 -0
  104. package/locales/vi-VN/chat.json +46 -3
  105. package/locales/vi-VN/common.json +1 -0
  106. package/locales/vi-VN/components.json +2 -0
  107. package/locales/vi-VN/error.json +1 -0
  108. package/locales/vi-VN/file.json +91 -0
  109. package/locales/vi-VN/knowledgeBase.json +31 -0
  110. package/locales/vi-VN/portal.json +1 -0
  111. package/locales/zh-CN/chat.json +46 -3
  112. package/locales/zh-CN/common.json +1 -0
  113. package/locales/zh-CN/components.json +2 -0
  114. package/locales/zh-CN/error.json +1 -0
  115. package/locales/zh-CN/file.json +91 -0
  116. package/locales/zh-CN/knowledgeBase.json +31 -0
  117. package/locales/zh-CN/portal.json +1 -0
  118. package/locales/zh-TW/chat.json +46 -3
  119. package/locales/zh-TW/common.json +1 -0
  120. package/locales/zh-TW/components.json +2 -0
  121. package/locales/zh-TW/error.json +1 -0
  122. package/locales/zh-TW/file.json +91 -0
  123. package/locales/zh-TW/knowledgeBase.json +31 -0
  124. package/locales/zh-TW/portal.json +1 -0
  125. package/package.json +3 -2
  126. package/scripts/migrateServerDB/docker.cjs +6 -0
  127. package/scripts/migrateServerDB/errorHint.js +17 -0
  128. package/scripts/migrateServerDB/index.ts +6 -0
  129. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/FilePreview/FileItem/Content.tsx +37 -0
  130. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +87 -0
  131. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/FilePreview/FileItem/style.ts +4 -0
  132. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/FilePreview/FileItem/utils.ts +28 -0
  133. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/FilePreview/FileList.tsx +41 -0
  134. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/FilePreview/index.tsx +40 -0
  135. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx +1 -1
  136. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx +7 -22
  137. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/TextArea.tsx +1 -1
  138. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/index.tsx +2 -4
  139. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/File.tsx +72 -0
  140. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/Image.tsx +74 -0
  141. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/index.tsx +39 -0
  142. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/FileItem/style.ts +1 -0
  143. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/index.tsx +33 -0
  144. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/InputArea/Container.tsx +41 -0
  145. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/InputArea/index.tsx +154 -0
  146. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Send.tsx +34 -0
  147. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/index.tsx +24 -11
  148. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/components/UploadDetail/UploadStatus.tsx +71 -0
  149. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/components/UploadDetail/index.tsx +49 -0
  150. package/src/app/(main)/chat/(workspace)/@portal/FilePreview/index.tsx +26 -0
  151. package/src/app/(main)/chat/(workspace)/@portal/Home/Files/FileList/Item.tsx +53 -0
  152. package/src/app/(main)/chat/(workspace)/@portal/Home/Files/FileList/index.tsx +50 -0
  153. package/src/app/(main)/chat/(workspace)/@portal/Home/Files/index.tsx +21 -0
  154. package/src/app/(main)/chat/(workspace)/@portal/Home/index.tsx +2 -0
  155. package/src/app/(main)/chat/(workspace)/@portal/router.tsx +4 -0
  156. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/KnowledgeTag.tsx +41 -0
  157. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags.tsx +7 -2
  158. package/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx +1 -1
  159. package/src/app/(main)/files/(content)/@menu/default.tsx +27 -0
  160. package/src/app/(main)/files/(content)/@menu/features/FileMenu/index.tsx +97 -0
  161. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +53 -0
  162. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/Item/Content.tsx +175 -0
  163. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/Item/index.tsx +69 -0
  164. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/KnowledgeBaseList.tsx +30 -0
  165. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/SkeletonList.tsx +57 -0
  166. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/index.tsx +54 -0
  167. package/src/app/(main)/files/(content)/@modal/(.)[id]/FileDetail.tsx +16 -0
  168. package/src/app/(main)/files/(content)/@modal/(.)[id]/FilePreview.tsx +15 -0
  169. package/src/app/(main)/files/(content)/@modal/(.)[id]/FullscreenModal.tsx +85 -0
  170. package/src/app/(main)/files/(content)/@modal/(.)[id]/page.tsx +19 -0
  171. package/src/app/(main)/files/(content)/@modal/default.tsx +3 -0
  172. package/src/app/(main)/files/(content)/NotSupportClient.tsx +152 -0
  173. package/src/app/(main)/files/(content)/_layout/Desktop/index.tsx +28 -0
  174. package/src/app/(main)/files/(content)/_layout/Mobile.tsx +47 -0
  175. package/src/app/(main)/files/(content)/_layout/type.ts +7 -0
  176. package/src/app/(main)/files/(content)/layout.tsx +18 -0
  177. package/src/app/(main)/files/(content)/page.tsx +14 -0
  178. package/src/app/(main)/files/[id]/Header.tsx +63 -0
  179. package/src/app/(main)/files/[id]/page.tsx +44 -0
  180. package/src/app/(main)/files/features/FileDetail.tsx +93 -0
  181. package/src/app/(main)/files/hooks/useFileCategory.ts +9 -0
  182. package/src/app/(main)/files/layout.tsx +12 -0
  183. package/src/app/(main)/files/loading.tsx +21 -0
  184. package/src/app/(main)/repos/[id]/@menu/Head/index.tsx +33 -0
  185. package/src/app/(main)/repos/[id]/@menu/Menu/index.tsx +56 -0
  186. package/src/app/(main)/repos/[id]/@menu/default.tsx +25 -0
  187. package/src/app/(main)/repos/[id]/_layout/Desktop/index.tsx +25 -0
  188. package/src/app/(main)/repos/[id]/_layout/Mobile.tsx +47 -0
  189. package/src/app/(main)/repos/[id]/_layout/type.ts +6 -0
  190. package/src/app/(main)/repos/[id]/hooks/useKnowledgeItem.ts +7 -0
  191. package/src/app/(main)/repos/[id]/layout.tsx +13 -0
  192. package/src/app/(main)/repos/[id]/page.tsx +18 -0
  193. package/src/app/(main)/repos/layout.tsx +13 -0
  194. package/src/app/(main)/repos/page.tsx +5 -0
  195. package/src/app/trpc/async/[trpc]/route.ts +28 -0
  196. package/src/chains/abstractChunk.ts +19 -0
  197. package/src/chains/answerWithContext.ts +34 -0
  198. package/src/chains/rewriteQuery.ts +22 -0
  199. package/src/components/DragUpload/index.tsx +6 -99
  200. package/src/components/DragUpload/useDragUpload.tsx +146 -0
  201. package/src/components/FeatureList/index.tsx +64 -0
  202. package/src/components/FileParsingStatus/index.tsx +230 -0
  203. package/src/components/ImageItem/index.tsx +10 -2
  204. package/src/components/KnowledgeIcon/index.tsx +28 -0
  205. package/src/config/app.ts +6 -1
  206. package/src/config/featureFlags/schema.ts +1 -1
  207. package/src/config/modelProviders/bedrock.ts +5 -5
  208. package/src/const/file.ts +1 -0
  209. package/src/const/url.ts +1 -0
  210. package/src/database/client/models/file.ts +8 -2
  211. package/src/database/server/migrations/0005_pgvector.sql +2 -0
  212. package/src/database/server/migrations/0006_add_knowledge_base.sql +307 -0
  213. package/src/database/server/migrations/meta/0005_snapshot.json +2119 -0
  214. package/src/database/server/migrations/meta/0006_snapshot.json +3006 -0
  215. package/src/database/server/migrations/meta/_journal.json +14 -0
  216. package/src/database/server/models/__tests__/_test_template.ts +155 -0
  217. package/src/database/server/models/__tests__/agent.test.ts +226 -0
  218. package/src/database/server/models/__tests__/asyncTask.test.ts +176 -0
  219. package/src/database/server/models/__tests__/chunk.test.ts +336 -0
  220. package/src/database/server/models/__tests__/file.test.ts +317 -29
  221. package/src/database/server/models/__tests__/fixtures/embedding.ts +568 -0
  222. package/src/database/server/models/__tests__/knowledgeBase.test.ts +132 -0
  223. package/src/database/server/models/__tests__/message.test.ts +7 -4
  224. package/src/database/server/models/_template.ts +10 -1
  225. package/src/database/server/models/agent.ts +165 -0
  226. package/src/database/server/models/asyncTask.ts +96 -0
  227. package/src/database/server/models/chunk.ts +203 -0
  228. package/src/database/server/models/embedding.ts +47 -0
  229. package/src/database/server/models/file.ts +231 -12
  230. package/src/database/server/models/knowledgeBase.ts +94 -0
  231. package/src/database/server/models/message.ts +156 -30
  232. package/src/database/server/models/user.ts +12 -1
  233. package/src/database/server/schemas/lobechat/agent.ts +93 -0
  234. package/src/database/server/schemas/lobechat/discover.ts +1 -1
  235. package/src/database/server/schemas/lobechat/file.ts +118 -1
  236. package/src/database/server/schemas/lobechat/index.ts +5 -1
  237. package/src/database/server/schemas/lobechat/message.ts +169 -0
  238. package/src/database/server/schemas/lobechat/rag.ts +51 -0
  239. package/src/database/server/schemas/lobechat/relations.ts +68 -48
  240. package/src/database/server/schemas/lobechat/session.ts +77 -0
  241. package/src/database/server/schemas/lobechat/topic.ts +32 -0
  242. package/src/database/server/schemas/lobechat/user.ts +40 -25
  243. package/src/database/server/utils/idGenerator.ts +1 -0
  244. package/src/features/ChatInput/ActionBar/Clear.tsx +1 -1
  245. package/src/features/ChatInput/ActionBar/Knowledge/Dropdown.tsx +160 -0
  246. package/src/features/ChatInput/ActionBar/Knowledge/ListItem.tsx +52 -0
  247. package/src/features/ChatInput/ActionBar/Knowledge/index.tsx +54 -0
  248. package/src/features/ChatInput/ActionBar/Tools/index.tsx +1 -1
  249. package/src/features/ChatInput/ActionBar/Upload/ClientMode.tsx +52 -0
  250. package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +104 -0
  251. package/src/features/ChatInput/ActionBar/Upload/index.tsx +8 -0
  252. package/src/features/ChatInput/ActionBar/config.ts +14 -5
  253. package/src/features/ChatInput/useSend.ts +16 -7
  254. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/index.tsx +51 -0
  255. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/style.ts +38 -0
  256. package/src/features/Conversation/Messages/Assistant/FileChunks/index.tsx +76 -0
  257. package/src/features/Conversation/Messages/Assistant/index.tsx +13 -4
  258. package/src/features/Conversation/Messages/Default.tsx +4 -0
  259. package/src/features/Conversation/Messages/User/BelowMessage.tsx +78 -0
  260. package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +53 -0
  261. package/src/features/Conversation/Messages/User/FileListViewer/index.tsx +21 -0
  262. package/src/{components/FileList/FileListViewer.tsx → features/Conversation/Messages/User/ImageFileListViewer.tsx} +10 -2
  263. package/src/features/Conversation/Messages/{User.tsx → User/index.tsx} +11 -2
  264. package/src/features/Conversation/Messages/index.ts +8 -3
  265. package/src/features/Conversation/components/ChatItem/index.tsx +33 -10
  266. package/src/features/Conversation/components/InboxWelcome/QuestionSuggest.tsx +1 -1
  267. package/src/features/Conversation/types/index.tsx +1 -0
  268. package/src/features/FileManager/ChunkDrawer/ChunkList/ChunkItem.tsx +61 -0
  269. package/src/features/FileManager/ChunkDrawer/ChunkList/index.tsx +42 -0
  270. package/src/features/FileManager/ChunkDrawer/Content.tsx +38 -0
  271. package/src/features/FileManager/ChunkDrawer/Loading/index.tsx +16 -0
  272. package/src/features/FileManager/ChunkDrawer/SimilaritySearchList/Item.tsx +62 -0
  273. package/src/features/FileManager/ChunkDrawer/SimilaritySearchList/index.tsx +31 -0
  274. package/src/features/FileManager/ChunkDrawer/index.tsx +48 -0
  275. package/src/features/FileManager/FileList/EmptyStatus.tsx +153 -0
  276. package/src/features/FileManager/FileList/FileListItem/ChunkTag.tsx +35 -0
  277. package/src/features/FileManager/FileList/FileListItem/DropdownMenu.tsx +150 -0
  278. package/src/features/FileManager/FileList/FileListItem/index.tsx +211 -0
  279. package/src/features/FileManager/FileList/FileSkeleton.tsx +25 -0
  280. package/src/features/FileManager/FileList/ToolBar/Config.tsx +28 -0
  281. package/src/features/FileManager/FileList/ToolBar/MultiSelectActions.tsx +152 -0
  282. package/src/features/FileManager/FileList/ToolBar/index.tsx +114 -0
  283. package/src/features/FileManager/FileList/index.tsx +143 -0
  284. package/src/features/FileManager/FileList/useCheckTaskStatus.ts +27 -0
  285. package/src/features/FileManager/Header/FilesSearchBar.tsx +41 -0
  286. package/src/features/FileManager/Header/UploadFileButton.tsx +79 -0
  287. package/src/features/FileManager/Header/index.tsx +39 -0
  288. package/src/features/FileManager/UploadDock/Item.tsx +124 -0
  289. package/src/features/FileManager/UploadDock/index.tsx +183 -0
  290. package/src/features/FileManager/index.tsx +38 -0
  291. package/src/features/FileSidePanel/index.tsx +79 -0
  292. package/src/features/FileViewer/NotSupport/index.tsx +54 -0
  293. package/src/features/FileViewer/PDFViewer/HighlightLayer.tsx +81 -0
  294. package/src/features/FileViewer/PDFViewer/index.tsx +93 -0
  295. package/src/features/FileViewer/PDFViewer/style.ts +20 -0
  296. package/src/features/FileViewer/PDFViewer/useResizeObserver.ts +33 -0
  297. package/src/features/FileViewer/TXTViewer/index.tsx +41 -0
  298. package/src/features/FileViewer/index.tsx +45 -0
  299. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/SelectForm.tsx +115 -0
  300. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/index.tsx +43 -0
  301. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/Action.tsx +103 -0
  302. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/EditCustomPlugin.tsx +55 -0
  303. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/PluginTag.tsx +58 -0
  304. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/index.tsx +70 -0
  305. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/List.tsx +49 -0
  306. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Loading.tsx +13 -0
  307. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/index.tsx +39 -0
  308. package/src/features/KnowledgeBaseModal/CreateNew/CreateForm.tsx +73 -0
  309. package/src/features/KnowledgeBaseModal/CreateNew/index.tsx +35 -0
  310. package/src/features/KnowledgeBaseModal/index.ts +3 -0
  311. package/src/libs/langchain/loaders/pdf/index.ts +2 -2
  312. package/src/libs/trpc/async/asyncAuth.ts +24 -0
  313. package/src/libs/trpc/async/index.ts +10 -0
  314. package/src/libs/trpc/async/init.ts +11 -0
  315. package/src/libs/trpc/client/async.ts +14 -0
  316. package/src/libs/trpc/client/index.ts +1 -0
  317. package/src/libs/trpc/client/lambda.ts +9 -0
  318. package/src/libs/trpc/middleware/keyVaults.ts +18 -0
  319. package/src/libs/unstructured/__tests__/index.test.ts +0 -10
  320. package/src/libs/unstructured/index.ts +6 -11
  321. package/src/locales/default/chat.ts +47 -3
  322. package/src/locales/default/common.ts +1 -0
  323. package/src/locales/default/components.ts +2 -0
  324. package/src/locales/default/error.ts +6 -1
  325. package/src/locales/default/file.ts +92 -0
  326. package/src/locales/default/index.ts +4 -0
  327. package/src/locales/default/knowledgeBase.ts +31 -0
  328. package/src/locales/default/portal.ts +1 -0
  329. package/src/middleware.ts +3 -0
  330. package/src/server/asyncContext.ts +40 -0
  331. package/src/server/modules/ContentChunk/index.ts +135 -0
  332. package/src/server/modules/S3/index.ts +30 -5
  333. package/src/server/routers/async/caller.ts +27 -0
  334. package/src/server/routers/async/file.ts +247 -0
  335. package/src/server/routers/async/index.ts +12 -0
  336. package/src/server/routers/lambda/_template.ts +77 -0
  337. package/src/server/routers/lambda/agent.ts +159 -0
  338. package/src/server/routers/lambda/chunk.ts +189 -0
  339. package/src/server/routers/lambda/file.ts +129 -5
  340. package/src/server/routers/lambda/index.ts +6 -0
  341. package/src/server/routers/lambda/knowledgeBase.ts +79 -0
  342. package/src/server/routers/lambda/message.ts +6 -0
  343. package/src/server/routers/lambda/session.ts +0 -25
  344. package/src/server/routers/lambda/user.ts +5 -1
  345. package/src/server/services/chunk/index.ts +74 -0
  346. package/src/server/utils/files.ts +9 -0
  347. package/src/services/__tests__/chat.test.ts +18 -20
  348. package/src/services/__tests__/{upload.test.ts → upload_legacy.test.ts} +1 -1
  349. package/src/services/agent.ts +45 -0
  350. package/src/services/chat.ts +17 -15
  351. package/src/services/file/client.test.ts +1 -50
  352. package/src/services/file/client.ts +12 -25
  353. package/src/services/file/server.ts +25 -3
  354. package/src/services/file/type.ts +7 -4
  355. package/src/services/knowledgeBase.ts +34 -0
  356. package/src/services/message/client.test.ts +1 -1
  357. package/src/services/message/client.ts +29 -3
  358. package/src/services/message/index.ts +0 -2
  359. package/src/services/message/server.ts +9 -3
  360. package/src/services/message/type.ts +1 -13
  361. package/src/services/rag.ts +29 -0
  362. package/src/services/session/server.ts +1 -1
  363. package/src/services/upload.ts +89 -84
  364. package/src/services/upload_legacy.ts +104 -0
  365. package/src/services/user/client.ts +7 -2
  366. package/src/services/user/server.ts +6 -2
  367. package/src/services/user/type.ts +3 -2
  368. package/src/store/agent/slices/chat/action.ts +90 -18
  369. package/src/store/agent/slices/chat/initialState.ts +1 -0
  370. package/src/store/agent/slices/chat/selectors.ts +58 -0
  371. package/src/store/chat/slices/builtinTool/action.test.ts +2 -2
  372. package/src/store/chat/slices/builtinTool/action.ts +2 -2
  373. package/src/store/chat/slices/message/action.test.ts +2 -1
  374. package/src/store/chat/slices/message/action.ts +102 -26
  375. package/src/store/chat/slices/message/actions/rag.ts +148 -0
  376. package/src/store/chat/slices/message/initialState.ts +7 -0
  377. package/src/store/chat/slices/message/reducer.ts +6 -2
  378. package/src/store/chat/slices/message/selectors.ts +38 -3
  379. package/src/store/chat/slices/plugin/action.ts +8 -2
  380. package/src/store/chat/slices/portal/action.ts +8 -0
  381. package/src/store/chat/slices/portal/initialState.ts +3 -0
  382. package/src/store/chat/slices/portal/selectors.ts +8 -2
  383. package/src/store/file/initialState.ts +5 -1
  384. package/src/store/file/reducers/uploadFileList.ts +133 -0
  385. package/src/store/file/selectors.ts +3 -0
  386. package/src/store/file/slices/chat/action.test.ts +90 -90
  387. package/src/store/file/slices/chat/action.ts +164 -109
  388. package/src/store/file/slices/chat/initialState.ts +7 -2
  389. package/src/store/file/slices/chat/selectors.test.ts +84 -61
  390. package/src/store/file/slices/chat/selectors.ts +22 -32
  391. package/src/store/file/slices/chunk/action.ts +36 -0
  392. package/src/store/file/slices/chunk/index.ts +3 -0
  393. package/src/store/file/slices/chunk/initialState.ts +15 -0
  394. package/src/store/file/slices/chunk/selectors.ts +10 -0
  395. package/src/store/file/slices/fileManager/action.ts +187 -0
  396. package/src/store/file/slices/fileManager/index.ts +3 -0
  397. package/src/store/file/slices/fileManager/initialState.ts +18 -0
  398. package/src/store/file/slices/fileManager/selectors.ts +58 -0
  399. package/src/store/file/slices/tts/action.test.ts +1 -1
  400. package/src/store/file/slices/tts/action.ts +2 -2
  401. package/src/store/file/slices/upload/action.ts +164 -0
  402. package/src/store/file/store.ts +12 -1
  403. package/src/store/knowledgeBase/index.ts +2 -0
  404. package/src/store/knowledgeBase/initialState.ts +7 -0
  405. package/src/store/knowledgeBase/selectors.ts +1 -0
  406. package/src/store/knowledgeBase/slices/content/action.ts +27 -0
  407. package/src/store/knowledgeBase/slices/content/index.ts +1 -0
  408. package/src/store/knowledgeBase/slices/crud/action.ts +78 -0
  409. package/src/store/knowledgeBase/slices/crud/index.ts +3 -0
  410. package/src/store/knowledgeBase/slices/crud/initialState.ts +12 -0
  411. package/src/store/knowledgeBase/slices/crud/selectors.ts +7 -0
  412. package/src/store/knowledgeBase/store.ts +30 -0
  413. package/src/store/serverConfig/selectors.test.ts +1 -1
  414. package/src/store/user/slices/preference/selectors.ts +8 -0
  415. package/src/store/user/slices/settings/selectors/systemAgent.ts +2 -0
  416. package/src/tools/dalle/Render/Item/ImageFileItem.tsx +3 -23
  417. package/src/types/agent/index.ts +9 -0
  418. package/src/types/asyncTask.ts +31 -0
  419. package/src/types/chunk/document.ts +9 -0
  420. package/src/types/chunk/index.ts +52 -0
  421. package/src/types/files/index.ts +35 -0
  422. package/src/types/files/list.ts +44 -0
  423. package/src/types/files/upload.ts +91 -0
  424. package/src/types/knowledgeBase/index.ts +45 -0
  425. package/src/types/message/index.ts +54 -5
  426. package/src/types/rag.ts +16 -0
  427. package/src/utils/filter.test.ts +2 -0
  428. package/src/utils/server/auth.ts +23 -0
  429. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/LocalFiles.tsx +0 -46
  430. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files.tsx +0 -19
  431. package/src/components/FileList/EditableFileList.tsx +0 -47
  432. package/src/components/FileList/index.ts +0 -2
  433. package/src/components/FileList/type.tsx +0 -7
  434. package/src/database/server/schemas/lobechat/chat.ts +0 -331
  435. package/src/features/ChatInput/ActionBar/FileUpload.tsx +0 -69
  436. package/src/features/ChatInput/useChatInput.ts +0 -45
  437. package/src/features/FileList/EditableFileList.tsx +0 -31
  438. package/src/features/FileList/FileListPreviewer.tsx +0 -17
  439. package/src/features/FileList/index.tsx +0 -2
  440. package/src/types/files.ts +0 -42
@@ -36,6 +36,24 @@
36
36
  "stop": "Dur",
37
37
  "warp": "Satır atla"
38
38
  },
39
+ "knowledgeBase": {
40
+ "all": "Tüm İçerik",
41
+ "allFiles": "Tüm Dosyalar",
42
+ "allKnowledgeBases": "Tüm Bilgi Tabanları",
43
+ "disabled": "Mevcut dağıtım modu bilgi tabanı sohbetini desteklemiyor, kullanmak için lütfen sunucu veritabanı dağıtımına geçin veya LobeChat Cloud hizmetini kullanın.",
44
+ "library": {
45
+ "action": {
46
+ "add": "Ekle",
47
+ "detail": "Detay",
48
+ "remove": "Kaldır"
49
+ },
50
+ "title": "Dosya/Bilgi Tabanı"
51
+ },
52
+ "relativeFilesOrKnowledgeBases": "İlişkili Dosyalar/Bilgi Tabanları",
53
+ "title": "Bilgi Tabanı",
54
+ "uploadGuide": "Yüklenen dosyaları 'Bilgi Tabanı' içinde görebilirsiniz.",
55
+ "viewMore": "Daha Fazla Gör"
56
+ },
39
57
  "messageAction": {
40
58
  "delAndRegenerate": "Sil ve Yeniden Oluştur",
41
59
  "regenerate": "Yeniden Oluştur"
@@ -43,6 +61,15 @@
43
61
  "newAgent": "Yeni Asistan",
44
62
  "pin": "Pin",
45
63
  "pinOff": "Unpin",
64
+ "rag": {
65
+ "referenceChunks": "Referans Parçaları",
66
+ "userQuery": {
67
+ "actions": {
68
+ "delete": "Sorguyu Sil",
69
+ "regenerate": "Sorguyu Yeniden Oluştur"
70
+ }
71
+ }
72
+ },
46
73
  "regenerate": "Tekrarla",
47
74
  "roleAndArchive": "Rol ve Arşiv",
48
75
  "searchAgentPlaceholder": "Arama yardımcıları ve konuşmalar...",
@@ -129,8 +156,24 @@
129
156
  },
130
157
  "updateAgent": "Asistan Bilgilerini Güncelle",
131
158
  "upload": {
132
- "actionFiletip": "Dosyayı Yükle",
133
- "actionTooltip": "Resim Yükle",
134
- "disabled": "Geçerli model görüntü tanıma desteğini desteklemiyor, lütfen modeli değiştirerek kullanın"
159
+ "action": {
160
+ "fileUpload": "Dosya Yükle",
161
+ "folderUpload": "Klasör Yükle",
162
+ "imageDisabled": "Mevcut model görsel tanımayı desteklemiyor, lütfen modeli değiştirin ve tekrar deneyin",
163
+ "imageUpload": "Görüntü Yükle",
164
+ "tooltip": "Yükle"
165
+ },
166
+ "clientMode": {
167
+ "actionFiletip": "Dosya Yükle",
168
+ "actionTooltip": "Yükle",
169
+ "disabled": "Mevcut model görsel tanımayı ve dosya analizini desteklemiyor, lütfen modeli değiştirin ve tekrar deneyin"
170
+ },
171
+ "preview": {
172
+ "prepareTasks": "Parçaları Hazırlıyor...",
173
+ "status": {
174
+ "pending": "Yüklemeye Hazırlanıyor...",
175
+ "processing": "Dosya İşleniyor..."
176
+ }
177
+ }
135
178
  }
136
179
  }
@@ -13,6 +13,7 @@
13
13
  "autoGenerate": "Otomatik Oluştur",
14
14
  "autoGenerateTooltip": "Auto-generate agent description based on prompts",
15
15
  "autoGenerateTooltipDisabled": "Otomatik tamamlama işlevini kullanmadan önce ipucu kelimesini girin",
16
+ "back": "Geri",
16
17
  "batchDelete": "Toplu Sil",
17
18
  "blog": "Ürün Blogu",
18
19
  "cancel": "İptal",
@@ -50,6 +50,8 @@
50
50
  "chunks": {
51
51
  "embeddingStatus": {
52
52
  "empty": "Metin parçaları henüz tamamen vektörleştirilmedi, bu durum anlamsal arama işlevinin kullanılamamasına neden olabilir, arama kalitesini artırmak için lütfen metin parçalarını vektörleştirin",
53
+ "error": "Vektörleştirme başarısız oldu",
54
+ "errorResult": "Vektörleştirme başarısız oldu, lütfen kontrol edip tekrar deneyin. Başarısız olma nedeni:",
53
55
  "processing": "Metin parçaları vektörleştiriliyor, lütfen bekleyin",
54
56
  "success": "Mevcut metin parçaları tamamen vektörleştirildi"
55
57
  },
@@ -115,6 +115,7 @@
115
115
  },
116
116
  "upload": {
117
117
  "desc": "Detay: {{detail}}",
118
+ "fileOnlySupportInServerMode": "Mevcut dağıtım modu, yalnızca resim dosyalarının yüklenmesini desteklemektedir. {{ext}} formatında bir dosya yüklemek istiyorsanız, lütfen sunucu veritabanı dağıtımına geçin veya LobeChat Cloud hizmetini kullanın.",
118
119
  "title": "Dosya yükleme başarısız, lütfen ağ bağlantınızı kontrol edin veya daha sonra tekrar deneyin"
119
120
  }
120
121
  }
@@ -0,0 +1,91 @@
1
+ {
2
+ "desc": "Dosyalarınızı ve bilgi tabanınızı yönetin",
3
+ "detail": {
4
+ "basic": {
5
+ "createdAt": "Oluşturulma Zamanı",
6
+ "filename": "Dosya Adı",
7
+ "size": "Dosya Boyutu",
8
+ "title": "Temel Bilgiler",
9
+ "type": "Format",
10
+ "updatedAt": "Güncellenme Zamanı"
11
+ },
12
+ "data": {
13
+ "chunkCount": "Parça Sayısı",
14
+ "embedding": {
15
+ "default": "Henüz vektörleştirilmedi",
16
+ "error": "Başarısız",
17
+ "pending": "Başlatılmayı Bekliyor",
18
+ "processing": "İşleniyor",
19
+ "success": "Tamamlandı"
20
+ },
21
+ "embeddingStatus": "Vektörleştirme"
22
+ }
23
+ },
24
+ "header": {
25
+ "actions": {
26
+ "newFolder": "Yeni Klasör",
27
+ "uploadFile": "Dosya Yükle",
28
+ "uploadFolder": "Klasör Yükle"
29
+ },
30
+ "uploadButton": "Yükle"
31
+ },
32
+ "knowledgeBase": {
33
+ "list": {
34
+ "confirmRemoveKnowledgeBase": "Bu bilgi tabanı silinecek, içindeki dosyalar silinmeyecek, tüm dosyalar içine taşınacaktır. Bilgi tabanı silindikten sonra geri alınamaz, lütfen dikkatli olun.",
35
+ "empty": "Bilgi tabanı oluşturmak için <1>+</1> tıklayın"
36
+ },
37
+ "new": "Yeni Bilgi Tabanı",
38
+ "title": "Bilgi Tabanı"
39
+ },
40
+ "notSupportGuide": {
41
+ "desc": "Mevcut dağıtım örneği istemci veritabanı modunda, dosya yönetim işlevini kullanamazsınız. Lütfen <1>sunucu veritabanı dağıtım moduna</1> geçin veya doğrudan <3>LobeChat Cloud</3> kullanın.",
42
+ "features": {
43
+ "allKind": {
44
+ "desc": "Word, PPT, Excel, PDF, TXT gibi yaygın belge formatları ve JS, Python gibi popüler kod dosyalarını destekler.",
45
+ "title": "Çeşitli Dosya Türleri Analizi"
46
+ },
47
+ "embeddings": {
48
+ "desc": "Yüksek performanslı vektör modelleri kullanarak, metin parçalarını vektörleştirir ve dosya içeriğinin anlamsal olarak aranmasını sağlar.",
49
+ "title": "Vektör Anlamlandırma"
50
+ },
51
+ "repos": {
52
+ "desc": "Bilgi tabanı oluşturmayı destekler ve farklı türde dosyalar eklemeye izin verir, kendi alan bilginizi oluşturun.",
53
+ "title": "Bilgi Tabanı"
54
+ }
55
+ },
56
+ "title": "Mevcut dağıtım modu dosya yönetimini desteklemiyor"
57
+ },
58
+ "preview": {
59
+ "unsupportedFile": "Bu dosya formatı çevrimiçi önizleme desteklenmiyor"
60
+ },
61
+ "searchFilePlaceholder": "Dosya Ara",
62
+ "tab": {
63
+ "all": "Tüm Dosyalar",
64
+ "audios": "Sesler",
65
+ "documents": "Belgeler",
66
+ "images": "Görseller",
67
+ "videos": "Videolar",
68
+ "websites": "Web Siteleri"
69
+ },
70
+ "title": "Dosya",
71
+ "uploadDock": {
72
+ "body": {
73
+ "collapse": "Kapat",
74
+ "item": {
75
+ "done": "Yüklendi",
76
+ "error": "Yükleme başarısız, lütfen tekrar deneyin",
77
+ "pending": "Yüklenmek için hazırlanıyor...",
78
+ "processing": "Dosya işleniyor...",
79
+ "restTime": "Kalan {{time}}"
80
+ }
81
+ },
82
+ "totalCount": "Toplam {{count}} öğe",
83
+ "uploadStatus": {
84
+ "error": "Yükleme hatası",
85
+ "pending": "Yükleme bekleniyor",
86
+ "processing": "Yükleniyor",
87
+ "success": "Yükleme tamamlandı",
88
+ "uploading": "Yükleniyor"
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "addToKnowledgeBase": {
3
+ "addSuccess": "Dosya başarıyla eklendi, <1>hemen görüntüle</1>",
4
+ "confirm": "Ekle",
5
+ "id": {
6
+ "placeholder": "Eklenecek bilgi havuzunu seçin",
7
+ "required": "Lütfen bilgi havuzunu seçin",
8
+ "title": "Hedef bilgi havuzu"
9
+ },
10
+ "title": "Bilgi Havuzuna Ekle",
11
+ "totalFiles": "Seçilen {{count}} dosya"
12
+ },
13
+ "createNew": {
14
+ "confirm": "Yeni Oluştur",
15
+ "description": {
16
+ "placeholder": "Bilgi havuzu tanımı (isteğe bağlı)"
17
+ },
18
+ "formTitle": "Temel Bilgiler",
19
+ "name": {
20
+ "placeholder": "Bilgi havuzu adı",
21
+ "required": "Lütfen bilgi havuzu adını girin"
22
+ },
23
+ "title": "Yeni Bilgi Havuzu"
24
+ },
25
+ "tab": {
26
+ "files": "Belgeler",
27
+ "settings": "Ayarlar",
28
+ "testing": "Geri Çağırma Testi"
29
+ },
30
+ "title": "Bilgi Havuzu"
31
+ }
@@ -6,5 +6,6 @@
6
6
  "summaryTooltip": "Mevcut içeriği özetle"
7
7
  },
8
8
  "emptyArtifactList": "Mevcut Artefakt listesi boş, lütfen eklentileri kullanarak oturumda gerektiğinde göz atın",
9
+ "files": "Dosyalar",
9
10
  "title": "Genişletme Penceresi"
10
11
  }
@@ -36,6 +36,24 @@
36
36
  "stop": "Dừng",
37
37
  "warp": "Xuống dòng"
38
38
  },
39
+ "knowledgeBase": {
40
+ "all": "Tất cả nội dung",
41
+ "allFiles": "Tất cả tệp",
42
+ "allKnowledgeBases": "Tất cả kho kiến thức",
43
+ "disabled": "Chế độ triển khai hiện tại không hỗ trợ đối thoại kho kiến thức, nếu muốn sử dụng, vui lòng chuyển sang triển khai cơ sở dữ liệu máy chủ hoặc sử dụng dịch vụ LobeChat Cloud",
44
+ "library": {
45
+ "action": {
46
+ "add": "Thêm",
47
+ "detail": "Chi tiết",
48
+ "remove": "Xóa"
49
+ },
50
+ "title": "Tệp/Kho kiến thức"
51
+ },
52
+ "relativeFilesOrKnowledgeBases": "Tệp/Kho kiến thức liên quan",
53
+ "title": "Kho kiến thức",
54
+ "uploadGuide": "Các tệp đã tải lên có thể được xem trong 'Kho kiến thức'",
55
+ "viewMore": "Xem thêm"
56
+ },
39
57
  "messageAction": {
40
58
  "delAndRegenerate": "Xóa và tạo lại",
41
59
  "regenerate": "Tạo lại"
@@ -43,6 +61,15 @@
43
61
  "newAgent": "Tạo trợ lý mới",
44
62
  "pin": "Ghim",
45
63
  "pinOff": "Bỏ ghim",
64
+ "rag": {
65
+ "referenceChunks": "Trích dẫn nguồn",
66
+ "userQuery": {
67
+ "actions": {
68
+ "delete": "Xóa truy vấn",
69
+ "regenerate": "Tạo lại truy vấn"
70
+ }
71
+ }
72
+ },
46
73
  "regenerate": "Tạo lại",
47
74
  "roleAndArchive": "Vai trò và lưu trữ",
48
75
  "searchAgentPlaceholder": "Tìm kiếm trợ lý và cuộc trò chuyện...",
@@ -129,8 +156,24 @@
129
156
  },
130
157
  "updateAgent": "Cập nhật thông tin trợ lý",
131
158
  "upload": {
132
- "actionFiletip": "Tải lên tập tin",
133
- "actionTooltip": "Tải lên hình ảnh",
134
- "disabled": " hình hiện tại không hỗ trợ nhận diện hình ảnh, vui lòng chuyển đổi mô hình trước khi sử dụng"
159
+ "action": {
160
+ "fileUpload": "Tải lên tệp",
161
+ "folderUpload": "Tải lên thư mục",
162
+ "imageDisabled": "Mô hình hiện tại không hỗ trợ nhận diện hình ảnh, vui lòng chuyển đổi mô hình để sử dụng",
163
+ "imageUpload": "Tải lên hình ảnh",
164
+ "tooltip": "Tải lên"
165
+ },
166
+ "clientMode": {
167
+ "actionFiletip": "Tải lên tệp",
168
+ "actionTooltip": "Tải lên",
169
+ "disabled": "Mô hình hiện tại không hỗ trợ nhận diện hình ảnh và phân tích tệp, vui lòng chuyển đổi mô hình để sử dụng"
170
+ },
171
+ "preview": {
172
+ "prepareTasks": "Chuẩn bị phân đoạn...",
173
+ "status": {
174
+ "pending": "Đang chuẩn bị tải lên...",
175
+ "processing": "Đang xử lý tệp..."
176
+ }
177
+ }
135
178
  }
136
179
  }
@@ -13,6 +13,7 @@
13
13
  "autoGenerate": "Tự động tạo",
14
14
  "autoGenerateTooltip": "Tự động hoàn thành mô tả trợ lý dựa trên từ gợi ý",
15
15
  "autoGenerateTooltipDisabled": "Vui lòng nhập từ gợi ý trước khi sử dụng tính năng tự động hoàn thành",
16
+ "back": "Quay lại",
16
17
  "batchDelete": "Xóa hàng loạt",
17
18
  "blog": "Blog sản phẩm",
18
19
  "cancel": "Hủy",
@@ -50,6 +50,8 @@
50
50
  "chunks": {
51
51
  "embeddingStatus": {
52
52
  "empty": "Các khối văn bản chưa được vector hóa hoàn toàn, sẽ dẫn đến chức năng tìm kiếm ngữ nghĩa không khả dụng, để nâng cao chất lượng tìm kiếm, vui lòng vector hóa các khối văn bản",
53
+ "error": "Lỗi vector hóa",
54
+ "errorResult": "Lỗi vector hóa, vui lòng kiểm tra và thử lại. Nguyên nhân thất bại:",
53
55
  "processing": "Các khối văn bản đang được vector hóa, vui lòng chờ",
54
56
  "success": "Hiện tại tất cả các khối văn bản đã được vector hóa"
55
57
  },
@@ -115,6 +115,7 @@
115
115
  },
116
116
  "upload": {
117
117
  "desc": "Chi tiết: {{detail}}",
118
+ "fileOnlySupportInServerMode": "Chế độ triển khai hiện tại không hỗ trợ tải lên các tệp không phải hình ảnh. Nếu bạn cần tải lên định dạng {{ext}}, vui lòng chuyển sang triển khai cơ sở dữ liệu trên máy chủ hoặc sử dụng dịch vụ LobeChat Cloud.",
118
119
  "title": "Tải lên tệp thất bại, vui lòng kiểm tra kết nối mạng hoặc thử lại sau"
119
120
  }
120
121
  }
@@ -0,0 +1,91 @@
1
+ {
2
+ "desc": "Quản lý tệp và kho tri thức của bạn",
3
+ "detail": {
4
+ "basic": {
5
+ "createdAt": "Thời gian tạo",
6
+ "filename": "Tên tệp",
7
+ "size": "Kích thước tệp",
8
+ "title": "Thông tin cơ bản",
9
+ "type": "Định dạng",
10
+ "updatedAt": "Thời gian cập nhật"
11
+ },
12
+ "data": {
13
+ "chunkCount": "Số lượng phân đoạn",
14
+ "embedding": {
15
+ "default": "Chưa được vector hóa",
16
+ "error": "Thất bại",
17
+ "pending": "Đang chờ khởi động",
18
+ "processing": "Đang xử lý",
19
+ "success": "Đã hoàn thành"
20
+ },
21
+ "embeddingStatus": "Trạng thái vector hóa"
22
+ }
23
+ },
24
+ "header": {
25
+ "actions": {
26
+ "newFolder": "Tạo thư mục mới",
27
+ "uploadFile": "Tải tệp lên",
28
+ "uploadFolder": "Tải thư mục lên"
29
+ },
30
+ "uploadButton": "Tải lên"
31
+ },
32
+ "knowledgeBase": {
33
+ "list": {
34
+ "confirmRemoveKnowledgeBase": "Bạn sắp xóa kho tri thức này, các tệp trong đó sẽ không bị xóa mà sẽ được chuyển vào tất cả tệp. Kho tri thức sau khi xóa sẽ không thể khôi phục, vui lòng cẩn thận khi thực hiện.",
35
+ "empty": "Nhấp vào <1>+</1> để bắt đầu tạo kho tri thức"
36
+ },
37
+ "new": "Tạo kho tri thức mới",
38
+ "title": "Kho tri thức"
39
+ },
40
+ "notSupportGuide": {
41
+ "desc": "Phiên bản triển khai hiện tại là chế độ cơ sở dữ liệu khách hàng, không thể sử dụng chức năng quản lý tệp. Vui lòng chuyển sang <1>chế độ triển khai cơ sở dữ liệu máy chủ</1>, hoặc sử dụng trực tiếp <3>LobeChat Cloud</3>",
42
+ "features": {
43
+ "allKind": {
44
+ "desc": "Hỗ trợ các loại tệp phổ biến, bao gồm các định dạng tài liệu như Word, PPT, Excel, PDF, TXT, cũng như các tệp mã nguồn phổ biến như JS, Python",
45
+ "title": "Phân tích nhiều loại tệp"
46
+ },
47
+ "embeddings": {
48
+ "desc": "Sử dụng mô hình vector hiệu suất cao để vector hóa các phân đoạn văn bản, thực hiện tìm kiếm ngữ nghĩa nội dung tệp",
49
+ "title": "Ngữ nghĩa hóa vector"
50
+ },
51
+ "repos": {
52
+ "desc": "Hỗ trợ tạo kho tri thức và cho phép thêm các loại tệp khác nhau, xây dựng kiến thức thuộc lĩnh vực của bạn",
53
+ "title": "Kho tri thức"
54
+ }
55
+ },
56
+ "title": "Chế độ triển khai hiện tại không hỗ trợ quản lý tệp"
57
+ },
58
+ "preview": {
59
+ "unsupportedFile": "Định dạng tệp này không hỗ trợ xem trước trực tuyến"
60
+ },
61
+ "searchFilePlaceholder": "Tìm kiếm tệp",
62
+ "tab": {
63
+ "all": "Tất cả tệp",
64
+ "audios": "Âm thanh",
65
+ "documents": "Tài liệu",
66
+ "images": "Hình ảnh",
67
+ "videos": "Video",
68
+ "websites": "Trang web"
69
+ },
70
+ "title": "Tệp",
71
+ "uploadDock": {
72
+ "body": {
73
+ "collapse": "Thu gọn",
74
+ "item": {
75
+ "done": "Đã tải lên",
76
+ "error": "Tải lên thất bại, vui lòng thử lại",
77
+ "pending": "Chuẩn bị tải lên...",
78
+ "processing": "Đang xử lý tệp...",
79
+ "restTime": "Thời gian còn lại {{time}}"
80
+ }
81
+ },
82
+ "totalCount": "Tổng cộng {{count}} mục",
83
+ "uploadStatus": {
84
+ "error": "Lỗi tải lên",
85
+ "pending": "Đang chờ tải lên",
86
+ "processing": "Đang tải lên",
87
+ "success": "Tải lên hoàn tất",
88
+ "uploading": "Đang tải lên"
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "addToKnowledgeBase": {
3
+ "addSuccess": "Tài liệu đã được thêm thành công, <1>xem ngay</1>",
4
+ "confirm": "Thêm",
5
+ "id": {
6
+ "placeholder": "Vui lòng chọn kho kiến thức để thêm",
7
+ "required": "Vui lòng chọn kho kiến thức",
8
+ "title": "Kho kiến thức mục tiêu"
9
+ },
10
+ "title": "Thêm vào kho kiến thức",
11
+ "totalFiles": "Đã chọn {{count}} tệp"
12
+ },
13
+ "createNew": {
14
+ "confirm": "Tạo mới",
15
+ "description": {
16
+ "placeholder": "Mô tả kho kiến thức (tùy chọn)"
17
+ },
18
+ "formTitle": "Thông tin cơ bản",
19
+ "name": {
20
+ "placeholder": "Tên kho kiến thức",
21
+ "required": "Vui lòng điền tên kho kiến thức"
22
+ },
23
+ "title": "Tạo kho kiến thức mới"
24
+ },
25
+ "tab": {
26
+ "files": "Tài liệu",
27
+ "settings": "Cài đặt",
28
+ "testing": "Kiểm tra hồi phục"
29
+ },
30
+ "title": "Kho kiến thức"
31
+ }
@@ -6,5 +6,6 @@
6
6
  "summaryTooltip": "Tóm tắt nội dung hiện tại"
7
7
  },
8
8
  "emptyArtifactList": "Danh sách Tác Phẩm hiện tại đang trống, vui lòng sử dụng các plugin trong cuộc trò chuyện trước khi xem lại",
9
+ "files": "Tập tin",
9
10
  "title": "Cửa sổ mở rộng"
10
11
  }
@@ -36,6 +36,24 @@
36
36
  "stop": "停止",
37
37
  "warp": "换行"
38
38
  },
39
+ "knowledgeBase": {
40
+ "all": "所有内容",
41
+ "allFiles": "所有文件",
42
+ "allKnowledgeBases": "所有知识库",
43
+ "disabled": "当前部署模式不支持知识库对话,如需使用,请切换到服务端数据库部署或使用 LobeChat Cloud 服务",
44
+ "library": {
45
+ "action": {
46
+ "add": "添加",
47
+ "detail": "详情",
48
+ "remove": "移除"
49
+ },
50
+ "title": "文件/知识库"
51
+ },
52
+ "relativeFilesOrKnowledgeBases": "关联文件/知识库",
53
+ "title": "知识库",
54
+ "uploadGuide": "上传过的文件可以在「知识库」中查看哦",
55
+ "viewMore": "查看更多"
56
+ },
39
57
  "messageAction": {
40
58
  "delAndRegenerate": "删除并重新生成",
41
59
  "regenerate": "重新生成"
@@ -43,6 +61,15 @@
43
61
  "newAgent": "新建助手",
44
62
  "pin": "置顶",
45
63
  "pinOff": "取消置顶",
64
+ "rag": {
65
+ "referenceChunks": "引用源",
66
+ "userQuery": {
67
+ "actions": {
68
+ "delete": "删除 Query 重写",
69
+ "regenerate": "重新生成 Query"
70
+ }
71
+ }
72
+ },
46
73
  "regenerate": "重新生成",
47
74
  "roleAndArchive": "角色与记录",
48
75
  "searchAgentPlaceholder": "搜索助手和对话...",
@@ -129,8 +156,24 @@
129
156
  },
130
157
  "updateAgent": "更新助理信息",
131
158
  "upload": {
132
- "actionFiletip": "上传文件",
133
- "actionTooltip": "上传图片",
134
- "disabled": "当前模型不支持视觉识别和文件分析,请切换模型后使用"
159
+ "action": {
160
+ "fileUpload": "上传文件",
161
+ "folderUpload": "上传文件夹",
162
+ "imageDisabled": "当前模型不支持视觉识别,请切换模型后使用",
163
+ "imageUpload": "上传图片",
164
+ "tooltip": "上传"
165
+ },
166
+ "clientMode": {
167
+ "actionFiletip": "上传文件",
168
+ "actionTooltip": "上传",
169
+ "disabled": "当前模型不支持视觉识别和文件分析,请切换模型后使用"
170
+ },
171
+ "preview": {
172
+ "prepareTasks": "准备分块...",
173
+ "status": {
174
+ "pending": "准备上传...",
175
+ "processing": "文件处理中..."
176
+ }
177
+ }
135
178
  }
136
179
  }
@@ -13,6 +13,7 @@
13
13
  "autoGenerate": "自动补全",
14
14
  "autoGenerateTooltip": "基于提示词自动补全助手描述",
15
15
  "autoGenerateTooltipDisabled": "请填写提示词后使用自动补全功能",
16
+ "back": "返回",
16
17
  "batchDelete": "批量删除",
17
18
  "blog": "产品博客",
18
19
  "cancel": "取消",
@@ -50,6 +50,8 @@
50
50
  "chunks": {
51
51
  "embeddingStatus": {
52
52
  "empty": "文本块尚未完全向量化,将导致语义检索功能不可用,为提升检索质量,请对文本块向量化",
53
+ "error": "向量化失败",
54
+ "errorResult": "向量化失败,请检查后重试。失败原因:",
53
55
  "processing": "文本块正在向量化,请耐心等待",
54
56
  "success": "当前文本块均已向量化"
55
57
  },
@@ -115,6 +115,7 @@
115
115
  },
116
116
  "upload": {
117
117
  "desc": "详情: {{detail}}",
118
+ "fileOnlySupportInServerMode": "当前部署模式不支持上传非图片文件,如需上传 {{ext}} 格式,请切换到服务端数据库部署或使用 LobeChat Cloud 服务",
118
119
  "title": "文件上传失败,请检查网络连接或稍后再试"
119
120
  }
120
121
  }
@@ -0,0 +1,91 @@
1
+ {
2
+ "desc": "管理你的文件与知识库",
3
+ "detail": {
4
+ "basic": {
5
+ "createdAt": "创建时间",
6
+ "filename": "文件名",
7
+ "size": "文件大小",
8
+ "title": "基本信息",
9
+ "type": "格式",
10
+ "updatedAt": "更新时间"
11
+ },
12
+ "data": {
13
+ "chunkCount": "分块数",
14
+ "embedding": {
15
+ "default": "暂未向量化",
16
+ "error": "失败",
17
+ "pending": "待启动",
18
+ "processing": "进行中",
19
+ "success": "已完成"
20
+ },
21
+ "embeddingStatus": "向量化"
22
+ }
23
+ },
24
+ "header": {
25
+ "actions": {
26
+ "newFolder": "新建文件夹",
27
+ "uploadFile": "上传文件",
28
+ "uploadFolder": "上传文件夹"
29
+ },
30
+ "uploadButton": "上传"
31
+ },
32
+ "knowledgeBase": {
33
+ "list": {
34
+ "confirmRemoveKnowledgeBase": "即将删除该知识库,其中的文件不会删除,将移入全部文件中。知识库删除后将不可恢复,请谨慎操作。",
35
+ "empty": "点击 <1>+</1> 开始创建知识库"
36
+ },
37
+ "new": "新建知识库",
38
+ "title": "知识库"
39
+ },
40
+ "notSupportGuide": {
41
+ "desc": "当前部署实例为客户端数据库模式,无法使用文件管理功能。请切换到<1>服务端数据库部署模式</1>,或直接使用 <3>LobeChat Cloud</3>",
42
+ "features": {
43
+ "allKind": {
44
+ "desc": "支持主流文件类型,包括 Word、PPT、Excel、PDF、TXT 等常见文档格式,以及JS、Python 等主流代码文件",
45
+ "title": "多种文件类型解析"
46
+ },
47
+ "embeddings": {
48
+ "desc": "使用高性能向量模型,对文本分块进行向量化,实现文件内容的语义化检索",
49
+ "title": "向量语义化"
50
+ },
51
+ "repos": {
52
+ "desc": "支持创建知识库,并允许添加不同类型的文件,构建属于你的领域知识",
53
+ "title": "知识库"
54
+ }
55
+ },
56
+ "title": "当前部署模式不支持文件管理"
57
+ },
58
+ "preview": {
59
+ "unsupportedFile": "此文件格式不支持在线预览"
60
+ },
61
+ "searchFilePlaceholder": "搜索文件",
62
+ "tab": {
63
+ "all": "全部文件",
64
+ "audios": "语音",
65
+ "documents": "文档",
66
+ "images": "图片",
67
+ "videos": "视频",
68
+ "websites": "网页"
69
+ },
70
+ "title": "文件",
71
+ "uploadDock": {
72
+ "body": {
73
+ "collapse": "收起",
74
+ "item": {
75
+ "done": "已上传",
76
+ "error": "上传失败,请重试",
77
+ "pending": "准备上传...",
78
+ "processing": "文件处理中...",
79
+ "restTime": "剩余 {{time}}"
80
+ }
81
+ },
82
+ "totalCount": "共 {{count}} 项",
83
+ "uploadStatus": {
84
+ "error": "上传出错",
85
+ "pending": "等待上传",
86
+ "processing": "正在上传",
87
+ "success": "上传完成",
88
+ "uploading": "正在上传"
89
+ }
90
+ }
91
+ }