feat(repository): add TagID and IsRecommended fields to vector embeddings
- Introduced `TagID` and `IsRecommended` fields across various repository implementations (Elasticsearch, Milvus, Postgres, Qdrant, SQLite) to enhance document categorization and recommendation capabilities. - Updated the logic for handling `IsEnabled` to ensure it reflects the actual state from the source data. - Adjusted the knowledge service to incorporate the new `IsRecommended` field, improving the indexing process for knowledge chunks. These changes enhance the flexibility and functionality of document retrieval and indexing across the application.
This commit is contained in:
@@ -6224,6 +6224,7 @@ func (s *knowledgeService) buildFAQIndexInfoList(
|
||||
KnowledgeType: types.KnowledgeTypeFAQ,
|
||||
TagID: chunk.TagID,
|
||||
IsEnabled: chunk.IsEnabled,
|
||||
IsRecommended: chunk.Flags.HasFlag(types.ChunkFlagRecommended),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
@@ -6252,6 +6253,7 @@ func (s *knowledgeService) buildFAQIndexInfoList(
|
||||
KnowledgeType: types.KnowledgeTypeFAQ,
|
||||
TagID: chunk.TagID,
|
||||
IsEnabled: chunk.IsEnabled,
|
||||
IsRecommended: chunk.Flags.HasFlag(types.ChunkFlagRecommended),
|
||||
})
|
||||
|
||||
// 每个相似问创建一个索引项
|
||||
@@ -6277,6 +6279,7 @@ func (s *knowledgeService) buildFAQIndexInfoList(
|
||||
KnowledgeType: types.KnowledgeTypeFAQ,
|
||||
TagID: chunk.TagID,
|
||||
IsEnabled: chunk.IsEnabled,
|
||||
IsRecommended: chunk.Flags.HasFlag(types.ChunkFlagRecommended),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user