Python SDK for CortexDB — a RAG-powered memory database
Project description
CortexDB Python SDK
A Python client for the CortexDB RAG backend, providing easy access to ingestion, querying, and LLM orchestration.
Features
- Setup API: Configure LLM providers (Gemini, OpenAI, Azure).
- Ingest API: Ingest documents with automatic embedding generation.
- Query API: Perform semantic search, entity retrieval, and graph traversals.
- Native LLM Integration: Uses
google-genaifor native Gemini support.
Installation
pip install cortexdb-py
Or visit the package on PyPI.
Usage
See main.py for a complete example of setting up a medical chatbot.
from cortexdb import CortexDB
db = CortexDB("http://localhost:8080")
# Setup
db.setup.configure(provider="GEMINI", api_key="...", chat_model="gemini-2.0-flash", embed_model="gemini-embedding-001")
# Ingest
db.ingest.document(uid="user-1", document_title="Test Doc", document_text="Hello world")
db.ingest.prompt(uid="user-1", converser="USER", text="What is this?")
# Query
results = db.query.search_contexts("Hello", limit=5)
Testing
pip install pytest respx
pytest tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cortexdb_py-0.2.13.tar.gz
(8.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cortexdb_py-0.2.13.tar.gz.
File metadata
- Download URL: cortexdb_py-0.2.13.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.9.25 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebe46d9b9b9298cdf17e658ca9e0aa52aa4f0e9069b0d22f1535f4b1df3cfe42
|
|
| MD5 |
96dbc99becc2ec4d6f5a74e555289a64
|
|
| BLAKE2b-256 |
e2872d9058f5f153fe271644a04691851e92a44213f2d6fbbdbad55debd9078e
|
File details
Details for the file cortexdb_py-0.2.13-py3-none-any.whl.
File metadata
- Download URL: cortexdb_py-0.2.13-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.9.25 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48002fea46317c59e73b6428ac2437d25d1ed81ad019deb76c82f638b61f92c4
|
|
| MD5 |
627acf27cccd51d3700ff67780966a5c
|
|
| BLAKE2b-256 |
4ee6bfc2bc36e7cccb56b76a80c8a61987243beced059b1b546ae6ba3aad2585
|