Enhance knowledge base functionality and integrate S3 storage support

- Add new models for `KnowledgeDocument` and `KnowledgeChunk` to manage document ingestion and chunking.
- Implement S3-compatible storage integration for knowledge documents, allowing for file uploads and retrieval.
- Introduce API endpoints for managing knowledge bases and documents, including creation, deletion, and searching.
- Update frontend components to support knowledge base configuration and document management, improving user interaction.
- Enhance backend services for knowledge processing and retrieval, ensuring robust handling of document statuses and errors.
This commit is contained in:
Xin Wang
2026-07-12 13:58:47 +08:00
parent 01c563a3e7
commit de58f30014
21 changed files with 995 additions and 34 deletions

View File

@@ -664,7 +664,7 @@ export function AssistantPage(props: AssistantPageProps) {
...(form.voice ? { TTS: form.voice } : {}),
...(form.realtimeModel ? { Realtime: form.realtimeModel } : {}),
},
knowledgeBaseId: form.knowledgeBase || null,
knowledgeBaseId: form.runtimeMode === "pipeline" ? form.knowledgeBase || null : null,
toolIds: form.toolIds,
prompt: form.prompt,
}),
@@ -1900,18 +1900,20 @@ export function AssistantPage(props: AssistantPageProps) {
/>
</SectionCard>
<SectionCard
icon={<Database size={18} />}
title="知识库配置"
description="选择助手回答时可检索的业务知识来源"
>
<ResourceSelectField
value={form.knowledgeBase}
onChange={(value) => updateForm("knowledgeBase", value)}
options={kbOptions}
noneLabel="无"
/>
</SectionCard>
{form.runtimeMode === "pipeline" && (
<SectionCard
icon={<Database size={18} />}
title="知识库配置"
description="选择助手回答时可检索的业务知识来源"
>
<ResourceSelectField
value={form.knowledgeBase}
onChange={(value) => updateForm("knowledgeBase", value)}
options={kbOptions}
noneLabel="无"
/>
</SectionCard>
)}
<SectionCard
icon={<Wrench size={18} />}