ChatModelExt

Trait ChatModelExt 

Source
pub trait ChatModelExt: ChatModel + Sized {
    // Provided method
    fn bind_tools(
        self,
        tools: Vec<Arc<dyn Tool + Send + Sync>>,
    ) -> BoundChatModel<Self> { ... }
}
Expand description

Extension trait for chat models to add tool binding.

Provided Methods§

Source

fn bind_tools( self, tools: Vec<Arc<dyn Tool + Send + Sync>>, ) -> BoundChatModel<Self>

Bind tools to this chat model.

§Arguments
  • tools - The tools to bind.
§Returns

A BoundChatModel that includes the tools.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§