Fix lint warnings and update retrieval modules
This commit is contained in:
@@ -14,7 +14,7 @@ import { getContext } from "../../../../../../extensions.js";
|
||||
import { xbLog } from "../../../core/debug-core.js";
|
||||
import { getSummaryStore, getFacts, isRelationFact } from "../data/store.js";
|
||||
import { getVectorConfig, getSummaryPanelConfig, getSettings } from "../data/config.js";
|
||||
import { recallMemory, buildQueryText } from "../vector/retrieval/recall.js";
|
||||
import { recallMemory } from "../vector/retrieval/recall.js";
|
||||
import { getChunksByFloors, getAllChunkVectors, getAllEventVectors, getMeta } from "../vector/storage/chunk-store.js";
|
||||
|
||||
// Metrics
|
||||
@@ -1031,7 +1031,13 @@ async function buildVectorPrompt(store, recallResult, causalById, focusEntities
|
||||
metrics.quality.evidenceDensity = totalSelected > 0
|
||||
? Math.round(attached / totalSelected * 100)
|
||||
: 0;
|
||||
|
||||
|
||||
const selectedReal = metrics.evidence.selectedByType?.chunkReal || 0;
|
||||
const selectedTotal = metrics.evidence.selected || 0;
|
||||
metrics.quality.chunkRealRatio = selectedTotal > 0
|
||||
? Math.round(selectedReal / selectedTotal * 100)
|
||||
: 0;
|
||||
|
||||
metrics.quality.potentialIssues = detectIssues(metrics);
|
||||
}
|
||||
|
||||
@@ -1136,8 +1142,7 @@ export async function buildVectorPromptText(excludeLastAi = false, hooks = {}) {
|
||||
let causalById = new Map();
|
||||
|
||||
try {
|
||||
const queryText = buildQueryText(chat, 2, excludeLastAi);
|
||||
recallResult = await recallMemory(queryText, allEvents, vectorCfg, {
|
||||
recallResult = await recallMemory(allEvents, vectorCfg, {
|
||||
excludeLastAi,
|
||||
pendingUserMessage,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user