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;
|
||||
|
||||
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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user