mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Fix of issue: (#10421)
DOC: Inversion of 'True' and 'False' in ConversationTokenBufferMemory Property Comments #10420
This commit is contained in:
parent
b50d724114
commit
55196742be
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user