pub struct SemanticCommands<E: Embedder, Ch: Cache, C> { /* private fields */ }Implementations§
Source§impl<E: Embedder, Ch: Cache, C> SemanticCommands<E, Ch, C>
impl<E: Embedder, Ch: Cache, C> SemanticCommands<E, Ch, C>
pub async fn get_embedding(&self, input: &str) -> Result<Vec<f32>>
pub fn new(embedder: E, cache: Ch, context: C) -> Self
pub async fn execute(&mut self, input: &str) -> Result<Box<dyn Any + Send>>
pub fn add_command( &mut self, command: Command<C>, inputs: Vec<Input>, ) -> &mut Self
pub fn add_commands( &mut self, commands: Vec<(Command<C>, Vec<Input>)>, ) -> &mut Self
pub async fn init(&mut self) -> Result<&mut Self>
Auto Trait Implementations§
impl<E, Ch, C> Freeze for SemanticCommands<E, Ch, C>
impl<E, Ch, C> !RefUnwindSafe for SemanticCommands<E, Ch, C>
impl<E, Ch, C> Send for SemanticCommands<E, Ch, C>
impl<E, Ch, C> Sync for SemanticCommands<E, Ch, C>
impl<E, Ch, C> Unpin for SemanticCommands<E, Ch, C>
impl<E, Ch, C> !UnwindSafe for SemanticCommands<E, Ch, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more