Skip to main content

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:
NameType
recordVectorRecord
async fn search(&self, query_embedding: &[f32], limit: usize) -> Result<Vec<SearchResultItem>>
Search for similar records Parameters:
NameType
query_embedding&[f32]
limitusize

get

async fn get(&self, id: &str) -> Result<Option<VectorRecord>>
Get a record by ID Parameters:
NameType
id&str

delete

async fn delete(&mut self, id: &str) -> Result<bool>
Delete a record by ID Parameters:
NameType
id&str

get_all

async fn get_all(&self, limit: usize) -> Result<Vec<VectorRecord>>
Get all records Parameters:
NameType
limitusize

clear

async fn clear(&mut self) -> Result<()>
Clear all records

len

fn len(&self) -> usize
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

Rust Vector Store

Rust Embeddings