mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
@@ -194,7 +194,12 @@ export class SSEStreamer implements IServerSideEventStreamer {
|
||||
metadataJson['memoryType'] = apiResponse.memoryType
|
||||
}
|
||||
if (apiResponse.followUpPrompts) {
|
||||
metadataJson['followUpPrompts'] = JSON.parse(apiResponse.followUpPrompts)
|
||||
metadataJson['followUpPrompts'] =
|
||||
typeof apiResponse.followUpPrompts === 'string' ? JSON.parse(apiResponse.followUpPrompts) : apiResponse.followUpPrompts
|
||||
}
|
||||
if (apiResponse.flowVariables) {
|
||||
metadataJson['flowVariables'] =
|
||||
typeof apiResponse.flowVariables === 'string' ? JSON.parse(apiResponse.flowVariables) : apiResponse.flowVariables
|
||||
}
|
||||
if (Object.keys(metadataJson).length > 0) {
|
||||
this.streamCustomEvent(chatId, 'metadata', metadataJson)
|
||||
|
||||
Reference in New Issue
Block a user