extraction error logging

This commit is contained in:
Storme-bit
2026-04-21 00:35:48 -07:00
parent 781bf8a615
commit c81a1cb20e
2 changed files with 5 additions and 2 deletions

View File

@@ -93,7 +93,10 @@ async function extractAndStoreEntities(userMessage, aiResponse, projectId=null)
const parsed = JSON.parse(raw);
const entities = Array.isArray(parsed.entities) ? parsed.entities : [];
if (entities.length === 0) throw new Error('No entities in response');
if (entities.length === 0) {
console.log('[entities] No entities found in this exchange — skipping');
return; // not an error, just nothing to extract
}
if (!Array.isArray(entities)) throw new Error('Response was not a JSON array');

View File

@@ -26,7 +26,7 @@ const ORCHESTRATION = {
SEMANTIC_LIMIT: 5,
SCORE_THRESHOLD: 0.5,
ENTITIES_LIMIT: 5,
ENTITIES_THRESHOLD: 0.5,
ENTITIES_THRESHOLD: 0.6,
TEMPERATURE: 0.7,
CORS_ORIGIN: 'http://localhost:5173',
SYSTEM_PROMPT: `You are a helpful, context-aware AI assistant. You have access to memories of past conversations with the user. Use them to provide consistent, personalised responses.`