Skip to main content

ToolEmbeddingDyn

Trait ToolEmbeddingDyn 

Source
pub trait ToolEmbeddingDyn: ToolDyn {
    // Required methods
    fn context(&self) -> Result<Value>;
    fn embedding_docs(&self) -> Vec<String>;
}
Expand description

Wrapper trait to allow for dynamic dispatch of raggable tools

Required Methods§

Source

fn context(&self) -> Result<Value>

Serializes context needed to reconstruct this dynamic tool.

Source

fn embedding_docs(&self) -> Vec<String>

Returns text fragments used to retrieve this tool from a vector store.

Implementors§

Source§

impl<T> ToolEmbeddingDyn for T
where T: ToolEmbedding + 'static,