Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
VectorStoreProtocol
Defined in the knowledge module.
Rust AI Agent SDK
Protocol for vector store implementations.
Methods
add
async fn add(&mut self, record: VectorRecord) -> Result<String>
Add a record to the store
Parameters:
| Name | Type |
|---|
record | VectorRecord |
search
async fn search(&self, query_embedding: &[f32], limit: usize) -> Result<Vec<SearchResultItem>>
Search for similar records
Parameters:
| Name | Type |
|---|
query_embedding | &[f32] |
limit | usize |
get
async fn get(&self, id: &str) -> Result<Option<VectorRecord>>
Get a record by ID
Parameters:
delete
async fn delete(&mut self, id: &str) -> Result<bool>
Delete a record by ID
Parameters:
get_all
async fn get_all(&self, limit: usize) -> Result<Vec<VectorRecord>>
Get all records
Parameters:
clear
async fn clear(&mut self) -> Result<()>
Clear all records
len
Get record count
is_empty
fn is_empty(&self) -> bool
Check if empty
Source
View on GitHub
praisonai/src/knowledge/mod.rs at line 0