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

Function parseRAGStats

api/controller/message.go:35–41  ·  view source on GitHub ↗

parseRAGStats 解析RAG统计数据JSON字符串

(ragStatsStr string)

Source from the content-addressed store, hash-verified

33
34// parseRAGStats 解析RAG统计数据JSON字符串
35func parseRAGStats(ragStatsStr string) (map[string]interface{}, error) {
36 var ragStats map[string]interface{}
37 if err := json.Unmarshal([]byte(ragStatsStr), &ragStats); err != nil {
38 return nil, err
39 }
40 return ragStats, nil
41}
42
43// EnhancedMessage 增强的消息结构,包含解析后的内容
44// @Description EnhancedMessage 扩展了基础消息结构,提供解析后的内容和RAG统计信息

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected