Skip to main content

Memories

Chat memory components store and retrieve chat messages by session_id.

AstraDBChatMemory Component

This component creates an AstraDBChatMessageHistory instance, which allows for storing and retrieving chat messages using Astra DB, a cloud-native database service.

Parameters

Inputs

NameTypeDescription
collection_nameStringName of the Astra DB collection for storing messages. Required.
tokenSecretStringAuthentication token for Astra DB access. Required.
api_endpointSecretStringAPI endpoint URL for the Astra DB service. Required.
namespaceStringOptional namespace within Astra DB for the collection.
session_idMessageTextChat session ID. Uses current session ID if not provided.

Outputs

NameTypeDescription
message_historyBaseChatMessageHistoryAn instance of AstraDBChatMessageHistory for the session.

CassandraChatMemory Component

This component creates a CassandraChatMessageHistory instance, enabling storage and retrieval of chat messages using Apache Cassandra or DataStax Astra DB.

Parameters

Inputs

NameTypeDescription
database_refMessageTextContact points for Cassandra or Astra DB database ID. Required.
usernameMessageTextUsername for Cassandra (leave empty for Astra DB).
tokenSecretStringPassword for Cassandra or token for Astra DB. Required.
keyspaceMessageTextKeyspace in Cassandra or namespace in Astra DB. Required.
table_nameMessageTextName of the table or collection for storing messages. Required.
session_idMessageTextUnique identifier for the chat session. Optional.
cluster_kwargsDictionaryAdditional keyword arguments for Cassandra cluster configuration. Optional.

Outputs

NameTypeDescription
message_historyBaseChatMessageHistoryAn instance of CassandraChatMessageHistory for the session.

ZepChatMemory Component

This component creates a ZepChatMessageHistory instance, enabling storage and retrieval of chat messages using Zep, a memory server for Large Language Models (LLMs).

Parameters

Inputs

NameTypeDescription
urlMessageTextURL of the Zep instance. Required.
api_keySecretStringAPI Key for authentication with the Zep instance.
api_base_pathDropdownAPI version to use. Options: "api/v1" or "api/v2".
session_idMessageTextUnique identifier for the chat session. Optional.

Outputs

NameTypeDescription
message_historyBaseChatMessageHistoryAn instance of ZepChatMessageHistory for the session.

Hi, how can I help you?