extraction error logging
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
@@ -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.`
|
||||
|
||||
Reference in New Issue
Block a user