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 -e .
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.1.tar.gz
(8.0 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.1.tar.gz.
File metadata
- Download URL: cortexdb_py-0.2.1.tar.gz
- Upload date:
- Size: 8.0 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 |
8a98ae6e0c390d76a7f251e0500df7b80be1f73b2a2c403cf1ffb9748e11fa6e
|
|
| MD5 |
5ed3d55ce7a9f29f4e469ca060a74475
|
|
| BLAKE2b-256 |
1a8cd53d67fa187f09b72ac77aa06a7cbea38a3bda27e90cfa6df8c2a0c48128
|
File details
Details for the file cortexdb_py-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cortexdb_py-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.2 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 |
c4e0415595180052d93e48754c7109db89fe2a683b7d53365afdc199d288463d
|
|
| MD5 |
e52403615272640c15af6152fdca74ba
|
|
| BLAKE2b-256 |
97003611f930cb221b8eb7a269d6a9e5350394ea80f02c034bb1a0b8f7836c40
|