From 2dd1c71cf26d2cb627da2a97be32aa5c312df01b Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 21 Jan 2024 22:26:58 +0000 Subject: [PATCH] return response --- packages/server/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 3c5766fdf..b11653ee2 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1825,8 +1825,10 @@ export class App { flowGraph: getTelemetryFlowObj(nodes, edges) }) - // Only return ChatId when its Internal OR incoming input has ChatId, to avoid confusion when calling API - if (incomingInput.chatId || isInternal) result.chatId = chatId + // Prepare response + result.chatId = chatId + if (sessionId) result.sessionId = sessionId + if (memoryType) result.memoryType = memoryType return res.json(result) } catch (e: any) {