diff --git a/langchain/memory/motorhead_memory.py b/langchain/memory/motorhead_memory.py index 37fb3cbff8..4113265e13 100644 --- a/langchain/memory/motorhead_memory.py +++ b/langchain/memory/motorhead_memory.py @@ -48,6 +48,8 @@ class MotorheadMemory(BaseChatMemory): headers=self.__get_headers(), ) res_data = res.json() + res_data = res_data.get("data", res_data) # Handle Managed Version + messages = res_data.get("messages", []) context = res_data.get("context", "NONE")