M7-06 P0 | loadContext 根据 ChatScope 决定检索范围 #74
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
loadContext 不再只按 knowledgeBaseId 检索,而是根据 scopeType 决定检索哪些内容。
检索规则
系统提示
不同 scopeType 使用不同 system prompt,限制 AI 回答范围。
完成情况
交付物
Service 层 —
loadContextByScope方法:检索策略
knowledgeBaseId = kbId AND deletedAt IS NULLknowledgeBaseId = kbId AND sourceRef = scopeId AND deletedAt IS NULLid = scopeId AND deletedAt IS NULL保留旧方法
旧的
loadContext(kbId, itemIds?)已被替换为loadContextByScope(session),不再依赖knowledgeItemIdsJSON 字段。涉及文件