chat_message_histories#

Chat message history stores a history of the message interactions in a chat.

Class hierarchy:

BaseChatMessageHistory --> <name>ChatMessageHistory  # Examples: FileChatMessageHistory, PostgresChatMessageHistory

Main helpers:

AIMessage, HumanMessage, BaseMessage

Classes

chat_message_histories.cassandra.CassandraChatMessageHistory(...)

Chat message history that is backed by Cassandra.

chat_message_histories.cosmos_db.CosmosDBChatMessageHistory(...)

Chat message history backed by Azure CosmosDB.

chat_message_histories.dynamodb.DynamoDBChatMessageHistory(...)

Chat message history that stores history in AWS DynamoDB.

chat_message_histories.file.FileChatMessageHistory(...)

Chat message history that stores history in a local file.

chat_message_histories.firestore.FirestoreChatMessageHistory(...)

Chat message history backed by Google Firestore.

chat_message_histories.kafka.ConsumeStartPosition(value)

Consume start position for Kafka consumer to get chat history messages.

chat_message_histories.kafka.KafkaChatMessageHistory(...)

Chat message history stored in Kafka.

chat_message_histories.momento.MomentoChatMessageHistory(...)

Chat message history cache that uses Momento as a backend.

chat_message_histories.neo4j.Neo4jChatMessageHistory(...)

Chat message history stored in a Neo4j database.

chat_message_histories.redis.RedisChatMessageHistory(...)

Chat message history stored in a Redis database.

chat_message_histories.rocksetdb.RocksetChatMessageHistory(...)

Uses Rockset to store chat messages.

chat_message_histories.singlestoredb.SingleStoreDBChatMessageHistory(...)

Chat message history stored in a SingleStoreDB database.

chat_message_histories.sql.BaseMessageConverter()

Convert BaseMessage to the SQLAlchemy model.

chat_message_histories.sql.DefaultMessageConverter(...)

The default message converter for SQLChatMessageHistory.

chat_message_histories.sql.SQLChatMessageHistory(...)

Chat message history stored in an SQL database.

chat_message_histories.streamlit.StreamlitChatMessageHistory([key])

Chat message history that stores messages in Streamlit session state.

chat_message_histories.tidb.TiDBChatMessageHistory(...)

Represents a chat message history stored in a TiDB database.

chat_message_histories.upstash_redis.UpstashRedisChatMessageHistory(...)

Chat message history stored in an Upstash Redis database.

chat_message_histories.xata.XataChatMessageHistory(...)

Chat message history stored in a Xata database.

chat_message_histories.zep.SearchScope(value)

Scope for the document search.

chat_message_histories.zep.SearchType(value)

Enumerator of the types of search to perform.

chat_message_histories.zep.ZepChatMessageHistory(...)

Chat message history that uses Zep as a backend.

chat_message_histories.zep_cloud.ZepCloudChatMessageHistory(...)

Chat message history that uses Zep Cloud as a backend.

Functions

chat_message_histories.kafka.ensure_topic_exists(...)

Create topic if it doesn't exist, and return the number of partitions.

chat_message_histories.sql.create_message_model(...)

Create a message model for a given table name.

chat_message_histories.zep_cloud.condense_zep_memory_into_human_message(...)

Condense Zep memory into a human message.

chat_message_histories.zep_cloud.get_zep_message_role_type(role)

Get the Zep role type from the role string.

Deprecated classes