zep-python


Namezep-python JSON
Version 2.0.1 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-09-26 13:35:54
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.9.0
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
[![Release to PyPI](https://github.com/getzep/zep-python/actions/workflows/release.yml/badge.svg)](https://github.com/getzep/zep-python/actions/workflows/release.yml) ![GitHub](https://img.shields.io/github/license/getzep/zep-python?color=blue) [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)


<p align="center">
  <a href="https://www.getzep.com/">
    <img src="https://raw.githubusercontent.com/getzep/zep/main/assets/zep-logo-icon-gradient-rgb.svg" width="150" alt="Zep Logo">
  </a>
</p>

<h1 align="center">
Zep: Long-Term Memory for ‍AI Assistants.
</h1>
<h2 align="center">Recall, understand, and extract data from chat histories. Power personalized AI experiences.</h2>
<br />

<p align="center">
<a href="https://docs.getzep.com/deployment/quickstart/">Quick Start</a> | 
<a href="https://docs.getzep.com/">Documentation</a> | 
<a href="https://docs.getzep.com/sdk/langchain/">LangChain</a> and 
<a href="https://docs.getzep.com/sdk/langchain/">LlamaIndex</a> Support | 
<a href="https://discord.gg/W8Kw6bsgXQ">Discord</a><br />
<a href="https://www.getzep.com">www.getzep.com</a>
</p>

## What is Zep? 💬
Zep is a long-term memory service for AI Assistant apps. With Zep, you can provide AI assistants with the ability to recall past conversations, no matter how distant, while also reducing hallucinations, latency, and cost.

### Installation Notes
Main branch contains the latest version of zep-cloud sdk. You can install it by running:
```bash
pip install zep-cloud
```

-- OR --

```bash
poetry add zep-cloud
```

Open Source Compatible SDK is available in the [oss](https://github.com/getzep/zep-python/tree/oss) branch, where you can also find Open Source compatible examples. You can install it by running:
```bash
pip install zep-python
```

-- OR --

```bash
poetry add zep-python
```

### How Zep works

Zep persists and recalls chat histories, and automatically generates summaries and other artifacts from these chat histories. It also embeds messages and summaries, enabling you to search Zep for relevant context from past conversations. Zep does all of this asynchronously, ensuring these operations don't impact your user's chat experience. Data is persisted to database, allowing you to scale out when growth demands.

Zep also provides a simple, easy to use abstraction for document vector search called Document Collections. This is designed to complement Zep's core memory features, but is not designed to be a general purpose vector database.

Zep allows you to be more intentional about constructing your prompt:
1. automatically adding a few recent messages, with the number customized for your app;
2. a summary of recent conversations prior to the messages above;
3. and/or contextually relevant summaries or messages surfaced from the entire chat session.
4. and/or relevant Business data from Zep Document Collections.

Zep Cloud offers:
- **Fact Extraction:** Automatically build fact tables from conversations, without having to define a data schema upfront.
- **Dialog Classification:** Instantly and accurately classify chat dialog. Understand user intent and emotion, segment users, and more. Route chains based on semantic context, and trigger events.
- **Structured Data Extraction:** Quickly extract business data from chat conversations using a schema you define. Understand what your Assistant should ask for next in order to complete its task.

You will also need to provide a Zep Project API key to your zep client.
You can find out about zep projects in our [cloud docs](https://help.getzep.com/projects.html)

### Using LangChain Zep Classes with `zep-python`

(Currently only available on release candidate versions)

In the pre-release version `zep-python` sdk comes with `ZepChatMessageHistory` and `ZepVectorStore`
classes that are compatible with [LangChain's Python expression language](https://python.langchain.com/docs/expression_language/)

In order to use these classes in your application, you need to make sure that you have
`langchain_core` package installed, please refer to [Langchain's docs installation section](https://python.langchain.com/docs/get_started/installation#langchain-core).

We support `langchain_core@>=0.1.3<0.2.0`

You can import these classes in the following way:

```python
from zep_python.langchain import ZepChatMessageHistory, ZepVectorStore
```

### Running Examples
You will need to set the following environment variables to run examples in the `examples` directory:

```dotenv
# Please use examples/.env.example as a template for .env file

# Required
ZEP_API_KEY=<zep-project-api-key># Your Zep Project API Key
ZEP_COLLECTION=<zep-collection-name># used in ingestion script and in vector store examples
OPENAI_API_KEY=<openai-api-key># Your OpenAI API Key

# Optional (If you want to use langsmith with LangServe Sample App)
LANGCHAIN_TRACING_V2=true
LANGCHAIN_API_KEY=<your-langchain-api-key>
LANGCHAIN_PROJECT=<your-langchain-project-name># If not specified, defaults to "default"
```




            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "zep-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9.0",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/fe/ed/fc1c07d94e845dee009c05ce6854aeba99b407579ff261d805e7a70ea24d/zep_python-2.0.1.tar.gz",
    "platform": null,
    "description": "\n[![Release to PyPI](https://github.com/getzep/zep-python/actions/workflows/release.yml/badge.svg)](https://github.com/getzep/zep-python/actions/workflows/release.yml) ![GitHub](https://img.shields.io/github/license/getzep/zep-python?color=blue) [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)\n\n\n<p align=\"center\">\n  <a href=\"https://www.getzep.com/\">\n    <img src=\"https://raw.githubusercontent.com/getzep/zep/main/assets/zep-logo-icon-gradient-rgb.svg\" width=\"150\" alt=\"Zep Logo\">\n  </a>\n</p>\n\n<h1 align=\"center\">\nZep: Long-Term Memory for \u200dAI Assistants.\n</h1>\n<h2 align=\"center\">Recall, understand, and extract data from chat histories. Power personalized AI experiences.</h2>\n<br />\n\n<p align=\"center\">\n<a href=\"https://docs.getzep.com/deployment/quickstart/\">Quick Start</a> | \n<a href=\"https://docs.getzep.com/\">Documentation</a> | \n<a href=\"https://docs.getzep.com/sdk/langchain/\">LangChain</a> and \n<a href=\"https://docs.getzep.com/sdk/langchain/\">LlamaIndex</a> Support | \n<a href=\"https://discord.gg/W8Kw6bsgXQ\">Discord</a><br />\n<a href=\"https://www.getzep.com\">www.getzep.com</a>\n</p>\n\n## What is Zep? \ud83d\udcac\nZep is a long-term memory service for AI Assistant apps. With Zep, you can provide AI assistants with the ability to recall past conversations, no matter how distant, while also reducing hallucinations, latency, and cost.\n\n### Installation Notes\nMain branch contains the latest version of zep-cloud sdk. You can install it by running:\n```bash\npip install zep-cloud\n```\n\n-- OR --\n\n```bash\npoetry add zep-cloud\n```\n\nOpen Source Compatible SDK is available in the [oss](https://github.com/getzep/zep-python/tree/oss) branch, where you can also find Open Source compatible examples. You can install it by running:\n```bash\npip install zep-python\n```\n\n-- OR --\n\n```bash\npoetry add zep-python\n```\n\n### How Zep works\n\nZep persists and recalls chat histories, and automatically generates summaries and other artifacts from these chat histories. It also embeds messages and summaries, enabling you to search Zep for relevant context from past conversations. Zep does all of this asynchronously, ensuring these operations don't impact your user's chat experience. Data is persisted to database, allowing you to scale out when growth demands.\n\nZep also provides a simple, easy to use abstraction for document vector search called Document Collections. This is designed to complement Zep's core memory features, but is not designed to be a general purpose vector database.\n\nZep allows you to be more intentional about constructing your prompt:\n1. automatically adding a few recent messages, with the number customized for your app;\n2. a summary of recent conversations prior to the messages above;\n3. and/or contextually relevant summaries or messages surfaced from the entire chat session.\n4. and/or relevant Business data from Zep Document Collections.\n\nZep Cloud offers:\n- **Fact Extraction:** Automatically build fact tables from conversations, without having to define a data schema upfront.\n- **Dialog Classification:** Instantly and accurately classify chat dialog. Understand user intent and emotion, segment users, and more. Route chains based on semantic context, and trigger events.\n- **Structured Data Extraction:** Quickly extract business data from chat conversations using a schema you define. Understand what your Assistant should ask for next in order to complete its task.\n\nYou will also need to provide a Zep Project API key to your zep client.\nYou can find out about zep projects in our [cloud docs](https://help.getzep.com/projects.html)\n\n### Using LangChain Zep Classes with `zep-python`\n\n(Currently only available on release candidate versions)\n\nIn the pre-release version `zep-python` sdk comes with `ZepChatMessageHistory` and `ZepVectorStore`\nclasses that are compatible with [LangChain's Python expression language](https://python.langchain.com/docs/expression_language/)\n\nIn order to use these classes in your application, you need to make sure that you have\n`langchain_core` package installed, please refer to [Langchain's docs installation section](https://python.langchain.com/docs/get_started/installation#langchain-core).\n\nWe support `langchain_core@>=0.1.3<0.2.0`\n\nYou can import these classes in the following way:\n\n```python\nfrom zep_python.langchain import ZepChatMessageHistory, ZepVectorStore\n```\n\n### Running Examples\nYou will need to set the following environment variables to run examples in the `examples` directory:\n\n```dotenv\n# Please use examples/.env.example as a template for .env file\n\n# Required\nZEP_API_KEY=<zep-project-api-key># Your Zep Project API Key\nZEP_COLLECTION=<zep-collection-name># used in ingestion script and in vector store examples\nOPENAI_API_KEY=<openai-api-key># Your OpenAI API Key\n\n# Optional (If you want to use langsmith with LangServe Sample App)\nLANGCHAIN_TRACING_V2=true\nLANGCHAIN_API_KEY=<your-langchain-api-key>\nLANGCHAIN_PROJECT=<your-langchain-project-name># If not specified, defaults to \"default\"\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "2.0.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abd1bba1abb9774f3628b94aabaf1855c5df138869fb41fe5b17d79b458302b6",
                "md5": "df35860c116463a7307d5243adfe8e96",
                "sha256": "fde48c9dbb4fb1bd756112188f073b829a3c7192d74cf8f758184621f85a5acc"
            },
            "downloads": -1,
            "filename": "zep_python-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "df35860c116463a7307d5243adfe8e96",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9.0",
            "size": 39886,
            "upload_time": "2024-09-26T13:35:53",
            "upload_time_iso_8601": "2024-09-26T13:35:53.147569Z",
            "url": "https://files.pythonhosted.org/packages/ab/d1/bba1abb9774f3628b94aabaf1855c5df138869fb41fe5b17d79b458302b6/zep_python-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "feedfc1c07d94e845dee009c05ce6854aeba99b407579ff261d805e7a70ea24d",
                "md5": "2fd654f95de16999eda0f6824f072cb8",
                "sha256": "9aac58e9134ce4bc4fdc38c85e25f15046baf8457ffa00a2c37f838c471e1f34"
            },
            "downloads": -1,
            "filename": "zep_python-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2fd654f95de16999eda0f6824f072cb8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9.0",
            "size": 21974,
            "upload_time": "2024-09-26T13:35:54",
            "upload_time_iso_8601": "2024-09-26T13:35:54.236693Z",
            "url": "https://files.pythonhosted.org/packages/fe/ed/fc1c07d94e845dee009c05ce6854aeba99b407579ff261d805e7a70ea24d/zep_python-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-26 13:35:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "zep-python"
}
        
Elapsed time: 0.52508s