EcosystemLangChain

ZepChatMessageHistory

You can find a complete Message History Example that showcases how to use the ZepChatMessageHistory class in the chain.

LangChain offers a ZepChatMessageHistory class compatible with LangChain Expression Language (LCEL).

It expects the following initialization parameters:

session_id
strRequired

The unique identifier for Zep Session. If a session for the provided identifier doesn’t exist, one will be created

zep_client
ZepClient

The Zep client used for making API requests. You can pass it rather than the API Key.

api_key
str

Zep Project API Key. You can pass it rather than zep_client and we will initialize ZepClient for you.

memory_type
str

The type of memory to use. Can be "message_window" (the default value if None provided) or "perpetual". You can find out more about the memory types in the Chat History documentation.

Initialization Example
1chat_history = ZepChatMessageHistory(
2 session_id=session_id,
3 zep_client=client,
4 memory_type="perpetual",
5)