Storage API
Setting Up Storage Layer
The SDK provides a dedicated method to configure and initialize storage components through the add_storage_layer
method. This setup is essential for managing data persistence and retrieval operations:
This method handles storage setup by communicating with the /core/storage/setup
endpoint, which is processed by the kernel for initialization and configuration.
Storage Configuration
The StorageLayer
class defines the essential parameters for storage configuration:
Key Components:
root_dir
: Specifies the base directory for all storage operationsuse_vector_db
: Enables or disables vector database functionalityvector_db_config
: Optional configuration for vector database settings when enabled
Storage Operations
Interactions with the storage layer are handled through the StorageQuery
class:
Query Parameters
messages
: Contains a list of message dictionaries with content for storage operationsoperation_type
: Specifies the type of storage operation to perform
Last updated