The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
[docs] Update doc-string for buffer_as_messages method in ConversationBufferWindowMemory (#18136)
Luan Fernandese86755793681
diff --git a/libs/langchain/langchain/memory/buffer_window.py b/libs/langchain/langchain/memory/buffer_window.pyindex d1be93974a..b71b9d23ba 100644--- a/libs/langchain/langchain/memory/buffer_window.py+++ b/libs/langchain/langchain/memory/buffer_window.py@@ -31,7 +31,7 @@ class ConversationBufferWindowMemory(BaseChatMemory):@propertydef buffer_as_messages(self) -> List[BaseMessage]:- """Exposes the buffer as a list of messages in case return_messages is False."""+ """Exposes the buffer as a list of messages in case return_messages is True."""return self.chat_memory.messages[-self.k * 2 :] if self.k > 0 else []@property