AlloyDBChatMessageHistory(
key: object,
engine: langchain_google_alloydb_pg.alloydb_engine.AlloyDBEngine,
session_id: str,
table_name: str,
messages: typing.List[langchain_core.messages.base.BaseMessage],
)
Chat message history stored in an AlloyDB.
Methods
aadd_message
aadd_message(message: langchain_core.messages.base.BaseMessage) -> None
Append the message to the record in AlloyDB
aadd_messages
aadd_messages(
messages: typing.Sequence[langchain_core.messages.base.BaseMessage],
) -> None
Add a list of messages.
aclear
aclear() -> None
Clear session memory from AlloyDB
add_message
add_message(message: langchain_core.messages.base.BaseMessage) -> None
Add a Message object to the store.
add_messages
add_messages(
messages: typing.Sequence[langchain_core.messages.base.BaseMessage],
) -> None
Add a list of messages.
Implementations should over-ride this method to handle bulk addition of messages in an efficient manner to avoid unnecessary round-trips to the underlying store.
clear
clear() -> None
Remove all messages from the store