add docstring for in memory class (#7160)

This commit is contained in:
Harrison Chase 2023-07-04 14:59:17 -07:00 committed by GitHub
parent 898087d02c
commit b39017dc11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,11 @@ from langchain.schema.messages import BaseMessage
class ChatMessageHistory(BaseChatMessageHistory, BaseModel): class ChatMessageHistory(BaseChatMessageHistory, BaseModel):
"""In memory implementation of chat message history.
Stores messages in an in memory list.
"""
messages: List[BaseMessage] = [] messages: List[BaseMessage] = []
def add_message(self, message: BaseMessage) -> None: def add_message(self, message: BaseMessage) -> None: