diff --git a/llama-index-core/llama_index/core/chat_engine/types.py b/llama-index-core/llama_index/core/chat_engine/types.py index 62644e5cab414..24ccdb7bba473 100644 --- a/llama-index-core/llama_index/core/chat_engine/types.py +++ b/llama-index-core/llama_index/core/chat_engine/types.py @@ -246,7 +246,7 @@ async def awrite_response_to_history( # NOTE: this is to handle the special case where we consume some of the # chat stream, but not all of it (e.g. in react agent) chat.message.content = final_text.strip() # final message - memory.put(chat.message) + await memory.aput(chat.message) except Exception as e: dispatcher.event(StreamChatErrorEvent(exception=e)) self.exception = e