Skip to main content

Setup

Install Cassandra packages
Run Cassandra with Docker:
Set your Mistral API key. The examples below use Mistral for embeddings and responses.

Example

agent_with_knowledge.py
Cassandra tables are created with a fixed vector dimension of 1024. Use an embedder that outputs 1024-dimension vectors, like MistralEmbedder() or OpenAIEmbedder(dimensions=1024).

Async Support ⚡

Cassandra also supports asynchronous operations, enabling concurrency and leading to better performance.

async_cassandra.py
Use ainsert() and aprint_response() methods with asyncio.run() for non-blocking operations in high-throughput applications.

Cassandra Params