semantic-commands 0.1.1

A lightweight Rust framework for defining and executing semantic commands using text embeddings
Documentation
1
2
3
4
5
6
7
8
use anyhow::Result;

#[async_trait::async_trait]
pub trait Cache {
	async fn get(&self, input: &str) -> Result<Option<Vec<f32>>>;
	async fn put(&self, input: &str, embedding: Vec<f32>) -> Result<()>;
	async fn init(&self) -> Result<()>;
}