pub struct LocalModelProvider { /* private fields */ }Implementations§
Source§impl LocalModelProvider
impl LocalModelProvider
pub fn new(model: LocalModelInfo) -> Self
pub fn model(&self) -> &LocalModelInfo
Trait Implementations§
Source§impl Clone for LocalModelProvider
impl Clone for LocalModelProvider
Source§fn clone(&self) -> LocalModelProvider
fn clone(&self) -> LocalModelProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalModelProvider
impl Debug for LocalModelProvider
Source§impl LlmProvider for LocalModelProvider
impl LlmProvider for LocalModelProvider
Source§fn chat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_messages: &'life1 [Message],
_tools: Option<&'life2 [ToolDefinition]>,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn chat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_messages: &'life1 [Message],
_tools: Option<&'life2 [ToolDefinition]>,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Single response, optionally including tool-call information.
Source§fn stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_messages: &'life1 [Message],
_tools: Option<&'life2 [ToolDefinition]>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<String>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_messages: &'life1 [Message],
_tools: Option<&'life2 [ToolDefinition]>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<String>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Token streaming response, optionally including tool definitions.
Auto Trait Implementations§
impl Freeze for LocalModelProvider
impl RefUnwindSafe for LocalModelProvider
impl Send for LocalModelProvider
impl Sync for LocalModelProvider
impl Unpin for LocalModelProvider
impl UnsafeUnpin for LocalModelProvider
impl UnwindSafe for LocalModelProvider
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