pub struct StaticProvider {
pub output_text: String,
}Fields§
§output_text: StringTrait Implementations§
Source§impl Clone for StaticProvider
impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
fn clone(&self) -> StaticProvider
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 Provider for StaticProvider
impl Provider for StaticProvider
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_prompt: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ChatResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete_with_reasoning<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
_reasoning: &'life2 ReasoningConfig,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn complete_streaming<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
sender: UnboundedSender<StreamChunk>,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn complete_streaming<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
sender: UnboundedSender<StreamChunk>,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Stream completion tokens through
sender. Default implementation falls
back to complete() and sends a single chunk with the full result.Source§fn complete_with_tools<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [ConversationMessage],
_tools: &'life2 [ToolDefinition],
reasoning: &'life3 ReasoningConfig,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn complete_with_tools<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [ConversationMessage],
_tools: &'life2 [ToolDefinition],
reasoning: &'life3 ReasoningConfig,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Complete with structured tool definitions. The provider sends tool schemas
to the LLM and returns any tool_use requests in
ChatResult::tool_calls.
Default falls back to complete_with_reasoning(), ignoring tools.Source§fn complete_streaming_with_tools<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [ConversationMessage],
tools: &'life2 [ToolDefinition],
reasoning: &'life3 ReasoningConfig,
sender: UnboundedSender<StreamChunk>,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn complete_streaming_with_tools<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [ConversationMessage],
tools: &'life2 [ToolDefinition],
reasoning: &'life3 ReasoningConfig,
sender: UnboundedSender<StreamChunk>,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Stream completion with structured tool definitions. Sends incremental
text deltas and tool call deltas through
sender. Default falls back
to non-streaming complete_with_tools().Auto Trait Implementations§
impl Freeze for StaticProvider
impl RefUnwindSafe for StaticProvider
impl Send for StaticProvider
impl Sync for StaticProvider
impl Unpin for StaticProvider
impl UnsafeUnpin for StaticProvider
impl UnwindSafe for StaticProvider
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