Scalable ChatGPT API for multi-session context powered by GPT and Redis
Top 61.0% on sourcepulse
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
poetry install
poetry run streamlit run ui.py
poetry run uvicorn rest_api:app --host 0.0.0.0 --port 8000
poetry
for dependency management.Highlighted Details
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.
1 year ago
Inactive