Fix memoryOutputData

This commit is contained in:
Oleg Ivaniv 2024-11-08 08:48:30 +01:00
parent fdb41fcdbc
commit 67caac5aec
No known key found for this signature in database

View file

@ -277,7 +277,7 @@ export function useChatMessaging({
const memoryOutputData = (nodeResultData ?? []) const memoryOutputData = (nodeResultData ?? [])
.map((data) => get(data, ['data', NodeConnectionType.AiMemory, 0, 0, 'json']) as MemoryOutput) .map((data) => get(data, ['data', NodeConnectionType.AiMemory, 0, 0, 'json']) as MemoryOutput)
.find((data) => data.action === 'saveContext'); .find((data) => data && data.action === 'saveContext');
return (memoryOutputData?.chatHistory ?? []).map((message, index) => { return (memoryOutputData?.chatHistory ?? []).map((message, index) => {
return { return {