Merge pull request #1586 from FlowiseAI/feature/Return-chatId-from-response

Feature/Update Return Response
This commit is contained in:
Henry Heng 2024-01-22 00:46:23 +00:00 committed by GitHub
commit 2a8ac5ac39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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) {