Class QuickReplyVectorService
java.lang.Object
com.bytedesk.kbase.quick_reply.vector.QuickReplyVectorService
快捷回复-向量检索服务
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.data.elasticsearch.core.ElasticsearchOperations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate QuickReplyVectorSearchResult
convertToSearchResult
(org.springframework.data.elasticsearch.core.SearchHit<QuickReplyVector> searchHit) 转换为搜索结果deleteVectorIndex
(String uid) 从Elasticsearch中删除向量索引org.springframework.data.domain.Page<QuickReplyVectorSearchResult>
search
(float[] queryVector, String orgUid, String agentUid, org.springframework.data.domain.Pageable pageable) 向量检索void
updateVectorIndex
(QuickReplyEntity quickReply) 新增重载方法,自动向量化(mock 示例)void
updateVectorIndex
(QuickReplyEntity quickReply, float[] embedding) 更新向量索引
-
Field Details
-
elasticsearchOperations
private final org.springframework.data.elasticsearch.core.ElasticsearchOperations elasticsearchOperations
-
-
Constructor Details
-
QuickReplyVectorService
public QuickReplyVectorService()
-
-
Method Details
-
updateVectorIndex
更新向量索引 -
updateVectorIndex
新增重载方法,自动向量化(mock 示例) -
deleteVectorIndex
从Elasticsearch中删除向量索引 -
search
public org.springframework.data.domain.Page<QuickReplyVectorSearchResult> search(float[] queryVector, String orgUid, String agentUid, org.springframework.data.domain.Pageable pageable) 向量检索 -
convertToSearchResult
private QuickReplyVectorSearchResult convertToSearchResult(org.springframework.data.elasticsearch.core.SearchHit<QuickReplyVector> searchHit) 转换为搜索结果
-