adding in entity extraction layer with semantic search enabled

This commit is contained in:
Storme-bit
2026-04-17 06:08:12 -07:00
parent cf7f387add
commit 902725b7f7

View File

@@ -88,6 +88,7 @@ async function extractAndStoreEntities(userMessage, aiResponse) {
if (!name || !type || !ENTITY_TYPES.includes(type)) continue;
const entity = upsertEntity(name, type, notes ?? null);
console.log('[entities] Upserted entity:', entity);
// Embed and upsert to Qdrant fire-and-forget
embedEntity(entity)
@@ -96,7 +97,10 @@ async function extractAndStoreEntities(userMessage, aiResponse) {
type: entity.type,
notes: entity.notes,
}))
.catch(err => console.warn(`[entities] Failed to embed entity "${entity.name}":`, err.message));
.catch(err => {
console.warn(`[entities] Failed to embed entity "${entity.name}":`, err.message);
console.warn(`[entities] Embed error stack:`, err.stack); // add this
});
saved++;
}