diff --git a/server/services/chat/olly_chat_service.ts b/server/services/chat/olly_chat_service.ts index 49d8cf60..ef52e191 100644 --- a/server/services/chat/olly_chat_service.ts +++ b/server/services/chat/olly_chat_service.ts @@ -19,7 +19,7 @@ interface AgentRunPayload { } const MEMORY_ID_FIELD = 'memory_id'; -const INTERACTION_ID_FIELD = 'parent_interaction_id'; +const INTERACTION_ID_FIELDS = ['parent_message_id', 'parent_interaction_id']; export class OllyChatService implements ChatService { static abortControllers: Map = new Map(); @@ -67,7 +67,9 @@ export class OllyChatService implements ChatService { }>; const outputBody = agentFrameworkResponse.body.inference_results?.[0]?.output; const conversationIdItem = outputBody?.find((item) => item.name === MEMORY_ID_FIELD); - const interactionIdItem = outputBody?.find((item) => item.name === INTERACTION_ID_FIELD); + const interactionIdItem = outputBody?.find((item) => + INTERACTION_ID_FIELDS.includes(item.name) + ); return { /** * Interactions will be stored in Agent framework,