GithubHelp home page GithubHelp logo

cxz / zep Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getzep/zep

0.0 1.0 0.0 7.75 MB

Zep: A long-term memory store for LLM / Chatbot applications

Home Page: https://docs.getzep.com/

License: Apache License 2.0

Shell 0.36% Go 97.63% Makefile 1.76% Dockerfile 0.25%

zep's Introduction

Build/Test Docker golangci-lint License: Apache

Zep: A long-term memory store for LLM applications

Zep stores, summarizes, embeds, indexes, and enriches LLM app / chatbot histories, and exposes them via simple, low-latency APIs. Zep allows developers to focus on developing their AI apps, rather than on building memory persistence, search, and enrichment infrastructure.

Zep's Extractor model is easily extensible, with a simple, clean interface available to build new enrichment functionality, such as summarizers, entity extractors, embedders, and more.

Key Features:

  • Long-term memory persistence, with access to historical messages irrespective of your summarization strategy.
  • Auto-summarization of memory messages based on a configurable message window. A series of summaries are stored, providing flexibility for future summarization strategies.
  • Hybrid Vector search over memories and metadata, with messages automatically embedded on creation.
  • Entity Extractor that extracts named entities from messages and stores them in the message metadata.
  • Auto-token counting of memories and summaries, allowing finer-grained control over prompt assembly.
  • Python and JavaScript SDKs.
  • Langchain memory and retriever support.

Quick Start

Deploy to Render

Read the docs: https://getzep.github.io

  1. Clone this repo
git clone https://github.com/getzep/zep.git
  1. Add your OpenAI API key to a .env file in the root of the repo:
ZEP_OPENAI_API_KEY=<your key here>
  1. Start the Zep server:
docker-compose up

This will start a Zep server on port 8000, and a Postgres database on port 5432.

  1. Access Zep via the Python or Javascript SDKs:

Python

async with ZepClient(base_url) as client:
    role = "user"
    content = "who was the first man to go to space?"
    message = Message(role=role, content=content)
    memory = Memory()
    memory.messages = [message]
    # Add a memory
    result = await client.aadd_memory(session_id, memory)

See zep-python for installation and use docs.

Javascript

 // Add memory
 const role = "user";
 const content = "I'm looking to plan a trip to Iceland. Can you help me?"
 const message = new Message({ role, content });
 const memory = new Memory();
 memory.messages = [message];
 const result = await client.addMemoryAsync(session_id, memory);
...

Zep Documentation

Server installation and SDK usage documentation is available here: https://getzep.github.io

Acknowledgements

h/t to the Motorhead and Langchain projects for inspiration.

zep's People

Contributors

danielchalef avatar rsharath avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.