refactor: streamline document and FAQ index removal methods and enhance knowledge base deletion logic

This commit is contained in:
mlogclub
2026-06-02 11:25:30 +08:00
parent 5c4d486df0
commit abedafe911
13 changed files with 215 additions and 58 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ func (s *index) runDocumentIndex(ctx context.Context, document models.KnowledgeD
return nil, 0, fmt.Errorf("failed to get embedding model: %w", err)
}
existingVectorIDs := collectExistingVectorIDs(existingChunks)
existingVectorIDs := s.collectExistingVectorIDs(existingChunks)
vectors, chunkModels, dimension, err := s.prepareDocumentVectors(ctx, knowledgeBase, document, chunks)
if err != nil {
return nil, 0, err