Signature
Description
Initializes the database by:- Loading and initializing the embedding model
- Initializing the storage adapter
- Attempting to load cached embeddings from storage
Example
Behavior
- Idempotent: Safe to call multiple times. Subsequent calls are no-ops if already initialized.
- Async: Downloads model on first run (~22 MB).
- Auto-loads cache: Automatically loads from storage if valid cache exists.
Error Handling
Related Methods
Example: Startup Pattern
Related
Constructor
Create instance
add()
Add documents
Storage
Storage operations