Module chat_message_history (0.4.0)

API documentation for chat_message_history module.

Classes

PostgresChatMessageHistory

PostgresChatMessageHistory(
    key,
    engine: langchain_google_cloud_sql_pg.engine.PostgresEngine,
    session_id: str,
    table_name: str,
    messages: typing.List[langchain_core.messages.base.BaseMessage],
)

Chat message history stored in an Cloud SQL for PostgreSQL database.

Modules Functions

_aget_messages

_aget_messages(
    engine: langchain_google_cloud_sql_pg.engine.PostgresEngine,
    session_id: str,
    table_name: str,
) -> typing.List[langchain_core.messages.base.BaseMessage]

Retrieve the messages from PostgreSQL