fix(v3): migration crashes + entity linking on OSS (#4836)
Co-authored-by: Soumil Rathi <soumilrathi@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Soumil Rathi
Claude Opus 4.6
parent
a5a688295e
commit
d8d776636f
@@ -993,12 +993,9 @@ export class Memory {
|
||||
createdAt: payload.createdAt,
|
||||
updatedAt: payload.updatedAt,
|
||||
score: scored.score,
|
||||
metadata: {
|
||||
...Object.entries(payload)
|
||||
.filter(([key]) => !excludedKeys.has(key))
|
||||
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
|
||||
scoreBreakdown: scored.scoreBreakdown,
|
||||
},
|
||||
metadata: Object.entries(payload)
|
||||
.filter(([key]) => !excludedKeys.has(key))
|
||||
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
|
||||
...(payload.user_id && { user_id: payload.user_id }),
|
||||
...(payload.agent_id && { agent_id: payload.agent_id }),
|
||||
...(payload.run_id && { run_id: payload.run_id }),
|
||||
|
||||
@@ -59,11 +59,6 @@ export function normalizeBm25(
|
||||
export interface ScoredResult {
|
||||
id: string;
|
||||
score: number;
|
||||
scoreBreakdown: {
|
||||
semantic: number;
|
||||
bm25: number;
|
||||
entityBoost: number;
|
||||
};
|
||||
payload: Record<string, any>;
|
||||
}
|
||||
|
||||
@@ -134,11 +129,6 @@ export function scoreAndRank(
|
||||
scored.push({
|
||||
id: memIdStr,
|
||||
score: combined,
|
||||
scoreBreakdown: {
|
||||
semantic: semanticScore,
|
||||
bm25: bm25Score,
|
||||
entityBoost: entityBoost,
|
||||
},
|
||||
payload: result.payload,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user