chatgpt-memory  by continuum-llms

Scalable ChatGPT API for multi-session context powered by GPT and Redis

created 2 years ago
525 stars

Top 61.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Python library for scaling ChatGPT API interactions across multiple simultaneous sessions, offering persistent, adaptive memory through GPT embeddings and a Redis datastore. It's designed for developers and researchers looking to build stateful conversational AI applications beyond single-turn interactions.

How It Works

The system leverages a modular architecture. User messages are processed by an EmbeddingClient to generate vector representations. These embeddings, along with conversation history, are stored and retrieved from a Redis datastore. A MemoryManager orchestrates this, using a topk parameter to fetch relevant past interactions. The ChatGPTClient then uses these retrieved memories, combined with the current user message, to generate contextually aware responses from the OpenAI API.

Quick Start & Requirements

  • Install dependencies: poetry install
  • Run UI: poetry run streamlit run ui.py
  • Run API: poetry run uvicorn rest_api:app --host 0.0.0.0 --port 8000
  • Prerequisites: Redis datastore, OpenAI API key.
  • Setup: Requires poetry for dependency management.

Highlighted Details

  • Enables "infinite contextual and adaptive memory" for ChatGPT.
  • Supports multiple simultaneous conversation sessions.
  • Integrates with Redis for efficient data storage and retrieval.
  • Modular design allows for component-level usage.

Maintenance & Community

Development on this repository has been discontinued. Users are directed to OpenAI's retrieval plugin as an alternative.

Licensing & Compatibility

The license is not explicitly stated in the README.

Limitations & Caveats

Development has ceased, and users are advised to migrate to OpenAI's retrieval plugin. The project's long-term viability and support are therefore limited.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.