Index | Description | Installation |
---|---|---|
LocalIndex | In-memory index for development and testing | pip install -qU semantic-router |
HybridLocalIndex | In-memory index supporting hybrid search | pip install -qU "semantic-router[hybrid]" |
PineconeIndex | Pinecone vector database integration | pip install -qU "semantic-router[pinecone]" |
QdrantIndex | Qdrant vector database integration | pip install -qU "semantic-router[qdrant]" |
PostgresIndex | PostgreSQL with pgvector extension | pip install -qU "semantic-router[postgres]" |
"local"
: Sync from remote to local (pull)"remote"
: Sync from local to remote (push)None
: No automatic syncingBaseIndex
and implement these key methods:
add()
: Add embeddings to the indexquery()
: Search for similar vectorsdelete()
: Remove routes from the indexdescribe()
: Get information about the indexis_ready()
: Check if the index is initialized and ready for use