MCPcopy Create free account
hub / github.com/53AI/53AIHub / updateEmbeddingStatusWithError

Method updateEmbeddingStatusWithError

api/service/rag/embedding.go:951–957  ·  view source on GitHub ↗

updateEmbeddingStatusWithError 更新向量化状态为失败

(eid int64, chunkID int64, errorMsg string)

Source from the content-addressed store, hash-verified

949
950// updateEmbeddingStatusWithError 更新向量化状态为失败
951func (s *EmbeddingService) updateEmbeddingStatusWithError(eid int64, chunkID int64, errorMsg string) {
952 err := model.UpdateChunkEmbeddingStatus(eid, chunkID, model.DocumentChunkEmbeddingStatusFailed, "")
953 if err != nil {
954 fmt.Printf("更新向量化失败状态失败: %v\n", err)
955 }
956 fmt.Printf("分块 %d 向量化失败: %s\n", chunkID, errorMsg)
957}
958
959// GetQueryEmbedding 获取查询文本的向量(使用 singleflight 防止并发重复请求)
960func (s *EmbeddingService) GetQueryEmbedding(eid int64, query string, channelID int64, config *ChunkConfig) ([]float64, error) {

Callers 1

ProcessChunkEmbeddingMethod · 0.95

Calls 1

PrintfMethod · 0.80

Tested by

no test coverage detected