Fix of issue: (#10421)

DOC: Inversion of 'True' and 'False' in ConversationTokenBufferMemory
Property Comments #10420
This commit is contained in:
fyasla 2023-09-12 00:51:37 +02:00 committed by GitHub
parent b50d724114
commit 55196742be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ class ConversationTokenBufferMemory(BaseChatMemory):
@property @property
def buffer_as_str(self) -> str: def buffer_as_str(self) -> str:
"""Exposes the buffer as a string in case return_messages is True.""" """Exposes the buffer as a string in case return_messages is False."""
return get_buffer_string( return get_buffer_string(
self.chat_memory.messages, self.chat_memory.messages,
human_prefix=self.human_prefix, human_prefix=self.human_prefix,
@ -30,7 +30,7 @@ class ConversationTokenBufferMemory(BaseChatMemory):
@property @property
def buffer_as_messages(self) -> List[BaseMessage]: def 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 return self.chat_memory.messages
@property @property