adding in entity extraction layer with semantic search enabled
This commit is contained in:
@@ -88,6 +88,7 @@ async function extractAndStoreEntities(userMessage, aiResponse) {
|
|||||||
if (!name || !type || !ENTITY_TYPES.includes(type)) continue;
|
if (!name || !type || !ENTITY_TYPES.includes(type)) continue;
|
||||||
|
|
||||||
const entity = upsertEntity(name, type, notes ?? null);
|
const entity = upsertEntity(name, type, notes ?? null);
|
||||||
|
console.log('[entities] Upserted entity:', entity);
|
||||||
|
|
||||||
// Embed and upsert to Qdrant fire-and-forget
|
// Embed and upsert to Qdrant fire-and-forget
|
||||||
embedEntity(entity)
|
embedEntity(entity)
|
||||||
@@ -96,7 +97,10 @@ async function extractAndStoreEntities(userMessage, aiResponse) {
|
|||||||
type: entity.type,
|
type: entity.type,
|
||||||
notes: entity.notes,
|
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++;
|
saved++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user