BaseMessageConverter#

class langchain_community.chat_message_histories.sql.BaseMessageConverter[source]#

Convert BaseMessage to the SQLAlchemy model.

Methods

__init__()

from_sql_model(sql_message)

Convert a SQLAlchemy model to a BaseMessage instance.

get_sql_model_class()

Get the SQLAlchemy model class.

to_sql_model(message,Β session_id)

Convert a BaseMessage instance to a SQLAlchemy model.

__init__()#
abstract from_sql_model(sql_message: Any) β†’ BaseMessage[source]#

Convert a SQLAlchemy model to a BaseMessage instance.

Parameters:

sql_message (Any) –

Return type:

BaseMessage

abstract get_sql_model_class() β†’ Any[source]#

Get the SQLAlchemy model class.

Return type:

Any

abstract to_sql_model(message: BaseMessage, session_id: str) β†’ Any[source]#

Convert a BaseMessage instance to a SQLAlchemy model.

Parameters:
Return type:

Any