extraction error logging

This commit is contained in:
Storme-bit
2026-04-21 00:27:28 -07:00
parent 22686fca3c
commit b44d35e7cb

View File

@@ -215,11 +215,16 @@ async function chat(externalId, userMessage, options = {}) {
}
async function chatStream(externalId, userMessage, onChunk, options = {}) {
try {
const { recentEpisodeLimit, semanticLimit, scoreThreshold, temperature, repeatPenalty, topP, topK, systemPrompt } = appSettings.load();
let session = await memory.getSessionByExternalId(externalId);
if (!session) session = await memory.createSession(externalId);
const entities = await getRelevantEntities(userMessage, session.project_id ?? null);
console.log('[orchestration] entity search projectId:', session.project_id ?? null);
let projectSessionIds = null;
let activeSystemPrompt = systemPrompt ?? ORCHESTRATION.SYSTEM_PROMPT;
if (session.project_id) {