extraction error logging
This commit is contained in:
@@ -215,11 +215,16 @@ async function chat(externalId, userMessage, options = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function chatStream(externalId, userMessage, onChunk, options = {}) {
|
async function chatStream(externalId, userMessage, onChunk, options = {}) {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { recentEpisodeLimit, semanticLimit, scoreThreshold, temperature, repeatPenalty, topP, topK, systemPrompt } = appSettings.load();
|
const { recentEpisodeLimit, semanticLimit, scoreThreshold, temperature, repeatPenalty, topP, topK, systemPrompt } = appSettings.load();
|
||||||
let session = await memory.getSessionByExternalId(externalId);
|
let session = await memory.getSessionByExternalId(externalId);
|
||||||
if (!session) session = await memory.createSession(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 projectSessionIds = null;
|
||||||
let activeSystemPrompt = systemPrompt ?? ORCHESTRATION.SYSTEM_PROMPT;
|
let activeSystemPrompt = systemPrompt ?? ORCHESTRATION.SYSTEM_PROMPT;
|
||||||
if (session.project_id) {
|
if (session.project_id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user