return response

This commit is contained in:
Henry 2024-01-21 22:26:58 +00:00
parent f748d4751f
commit 2dd1c71cf2
1 changed files with 4 additions and 2 deletions

View File

@ -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) {