Retrieval plugin for custom GPTs, function calling, or assistants APIs
Top 2.1% on sourcepulse
This project provides a self-hosted, standalone retrieval backend for ChatGPT, enabling custom GPTs and API integrations to access personal or organizational documents via natural language queries. It offers granular control over document chunking, embedding models, and vector database choices, making it ideal for developers needing a flexible RAG solution beyond native file uploads.
How It Works
The plugin leverages OpenAI's embedding models to convert document chunks into vector representations, which are then stored and queried using a variety of backend vector databases. A FastAPI server exposes endpoints for document upserting, querying with metadata filtering, and deletion. This architecture allows for customizable retrieval pipelines, catering to specific accuracy, cost, and speed requirements.
Quick Start & Requirements
poetry
, create a virtual environment (poetry env use python3.10
), and install dependencies (poetry install
).DATASTORE
, BEARER_TOKEN
, OPENAI_API_KEY
, and vector database specifics.poetry run start
. API docs available at http://0.0.0.0:8000/docs
.Highlighted Details
Maintenance & Community
The project has contributions from various individuals and organizations, with specific mentions for Pinecone, Weaviate, Zilliz, Milvus, Qdrant, Redis, LlamaIndex, Supabase, Postgres, and Elasticsearch integrations. Community contributions are encouraged, with potential for OpenAI credits.
Licensing & Compatibility
The repository is licensed under the MIT License, permitting commercial use and linking with closed-source applications.
Limitations & Caveats
Keyword search performance may vary, with some vector databases offering better hybrid search capabilities. Sensitive data handling is the developer's responsibility, and the accuracy of optional PII detection and metadata extraction is not guaranteed.
1 year ago
1 week