fix(brain): map score and source fields from API response
DirectSubsystem now includes Qdrant similarity score as confidence and source field as a tag in recall results. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
b0cbd21741
commit
53a4902505
1 changed files with 6 additions and 0 deletions
|
|
@ -172,6 +172,12 @@ func (s *DirectSubsystem) recall(ctx context.Context, _ *mcp.CallToolRequest, in
|
|||
if id, ok := mm["id"].(string); ok {
|
||||
mem.ID = id
|
||||
}
|
||||
if score, ok := mm["score"].(float64); ok {
|
||||
mem.Confidence = score
|
||||
}
|
||||
if source, ok := mm["source"].(string); ok {
|
||||
mem.Tags = append(mem.Tags, "source:"+source)
|
||||
}
|
||||
memories = append(memories, mem)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue