pub struct ChatModel<P> { /* private fields */ }Implementations§
Source§impl<P: ChatProvide> ChatModel<P>
impl<P: ChatProvide> ChatModel<P>
pub fn new(provider: P, model: impl Into<String>) -> Self
pub fn set_config(&mut self, config: ChatConfig)
pub fn bind_tools<'a>( &'a mut self, tools: impl IntoIterator<Item = &'a Box<dyn Tool>>, )
pub fn bind_tool_defines(&mut self, tools: impl Into<Vec<ToolDefinition>>)
pub async fn chat( &self, messages: impl IntoChatMessages, ) -> Result<ChatResponse, ChatModelError>
pub async fn chat_no_tools( &self, messages: impl IntoChatMessages, ) -> Result<ChatResponse, ChatModelError>
Auto Trait Implementations§
impl<P> !Freeze for ChatModel<P>
impl<P> RefUnwindSafe for ChatModel<P>where
P: RefUnwindSafe,
impl<P> Send for ChatModel<P>where
P: Send,
impl<P> Sync for ChatModel<P>where
P: Sync,
impl<P> Unpin for ChatModel<P>where
P: Unpin,
impl<P> UnsafeUnpin for ChatModel<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for ChatModel<P>where
P: UnwindSafe,
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