diff --git a/langchain/memory/chat_message_histories/zep.py b/langchain/memory/chat_message_histories/zep.py index 0aabd5e65d1f2..d124fe27e8007 100644 --- a/langchain/memory/chat_message_histories/zep.py +++ b/langchain/memory/chat_message_histories/zep.py @@ -25,6 +25,7 @@ class ZepChatMessageHistory(BaseChatMessageHistory): zep_chat_history = ZepChatMessageHistory( session_id=session_id, url=ZEP_API_URL, + api_key=, ) # Use a standard ConversationBufferMemory to encapsulate the Zep chat history @@ -37,7 +38,8 @@ class ZepChatMessageHistory(BaseChatMessageHistory): summarizes, embeds, indexes, and enriches conversational AI chat histories, and exposes them via simple, low-latency APIs. - For server installation instructions and more, see: https://getzep.github.io/ + For server installation instructions and more, see: + https://docs.getzep.com/deployment/quickstart/ This class is a thin wrapper around the zep-python package. Additional Zep functionality is exposed via the `zep_summary` and `zep_messages` @@ -51,6 +53,7 @@ def __init__( self, session_id: str, url: str = "http://localhost:8000", + api_key: Optional[str] = None, ) -> None: try: from zep_python import ZepClient @@ -60,7 +63,7 @@ def __init__( "Please install it with `pip install zep-python`." ) - self.zep_client = ZepClient(base_url=url) + self.zep_client = ZepClient(base_url=url, api_key=api_key) self.session_id = session_id @property diff --git a/langchain/retrievers/zep.py b/langchain/retrievers/zep.py index 38c9827cd5f8d..fff01da0d6fca 100644 --- a/langchain/retrievers/zep.py +++ b/langchain/retrievers/zep.py @@ -20,13 +20,14 @@ class ZepRetriever(BaseRetriever): histories, and exposes them via simple, low-latency APIs. For server installation instructions, see: - https://getzep.github.io/deployment/quickstart/ + https://docs.getzep.com/deployment/quickstart/ """ def __init__( self, session_id: str, url: str, + api_key: Optional[str] = None, top_k: Optional[int] = None, ): try: @@ -37,7 +38,7 @@ def __init__( "Please install it with `pip install zep-python`." ) - self.zep_client = ZepClient(base_url=url) + self.zep_client = ZepClient(base_url=url, api_key=api_key) self.session_id = session_id self.top_k = top_k diff --git a/pyproject.toml b/pyproject.toml index e92d386734f93..57e0c70e928d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ pandas = {version = "^2.0.1", optional = true} telethon = {version = "^1.28.5", optional = true} neo4j = {version = "^5.8.1", optional = true} psychicapi = {version = "^0.5", optional = true} -zep-python = {version=">=0.31", optional=true} +zep-python = {version=">=0.32", optional=true} langkit = {version = ">=0.0.1.dev3, <0.1.0", optional = true} chardet = {version="^5.1.0", optional=true} requests-toolbelt = {version = "^1.0.0", optional = true}