praval.storage.providers.qdrant_provider
Qdrant vector storage provider for Praval framework
Integrates with existing Praval memory system to provide vector storage capabilities through the storage framework.
Classes
|
Qdrant vector database storage provider. |
- class praval.storage.providers.qdrant_provider.QdrantProvider(name, config)[source]
Bases:
BaseStorageProviderQdrant vector database storage provider.
Features: - Vector similarity search - Collection management - Point insertion and retrieval - Filtering and metadata search - Batch operations - Integration with Praval memory system
- async store(resource, data, **kwargs)[source]
Store vector data in Qdrant.
- Parameters:
resource (
str) – Collection name (optional, uses default if not specified)data (
Any) – Data to store - can be: - Single point: {“id”: “…”, “vector”: […], “payload”: {…}} - Multiple points: [{“id”: “…”, “vector”: […], “payload”: {…}}, …] - Just vector: [0.1, 0.2, …] (will generate ID)**kwargs – Additional parameters
- Return type:
- Returns:
StorageResult with operation outcome
- async retrieve(resource, **kwargs)[source]
Retrieve vectors from Qdrant.
- Parameters:
resource (
str) – Collection name or “collection:point_id”**kwargs – Retrieval parameters (point_ids, with_vectors, with_payload)
- Return type:
- Returns:
StorageResult with retrieved data
- async query(resource, query, **kwargs)[source]
Execute vector search or other operations.
- Parameters:
- Return type:
- Returns:
StorageResult with query results
- async delete(resource, **kwargs)[source]
Delete points from Qdrant.
- Parameters:
resource (
str) – Collection name or “collection:point_id”**kwargs – Delete parameters (point_ids, filter)
- Return type:
- Returns:
StorageResult with operation outcome