pub struct CompletionModel<T = Client> {
pub model: String,
/* private fields */
}Fields§
§model: StringImplementations§
Source§impl<T> CompletionModel<T>where
T: HttpClientExt,
impl<T> CompletionModel<T>where
T: HttpClientExt,
Trait Implementations§
Source§impl<T> Clone for CompletionModel<T>where
T: Clone,
impl<T> Clone for CompletionModel<T>where
T: Clone,
Source§fn clone(&self) -> CompletionModel<T>
fn clone(&self) -> CompletionModel<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> CompletionModel for CompletionModel<T>where
T: HttpClientExt + Clone + 'static,
impl<T> CompletionModel for CompletionModel<T>where
T: HttpClientExt + Clone + 'static,
Source§type Response = CompletionResponse
type Response = CompletionResponse
The raw response type returned by the underlying completion model.
Source§type StreamingResponse = StreamingCompletionResponse
type StreamingResponse = StreamingCompletionResponse
The raw response type returned by the underlying completion model when streaming.
Source§fn make(
client: &<CompletionModel<T> as CompletionModel>::Client,
model: impl Into<String>,
) -> CompletionModel<T>
fn make( client: &<CompletionModel<T> as CompletionModel>::Client, model: impl Into<String>, ) -> CompletionModel<T>
Construct a model handle from a provider client and model identifier.
Source§async fn completion(
&self,
completion_request: CompletionRequest,
) -> Result<CompletionResponse<CompletionResponse>, CompletionError>
async fn completion( &self, completion_request: CompletionRequest, ) -> Result<CompletionResponse<CompletionResponse>, CompletionError>
Generates a completion response for the given completion request.
async fn stream( &self, request: CompletionRequest, ) -> Result<StreamingCompletionResponse<<CompletionModel<T> as CompletionModel>::StreamingResponse>, CompletionError>
Source§fn completion_request(
&self,
prompt: impl Into<Message>,
) -> CompletionRequestBuilder<Self>
fn completion_request( &self, prompt: impl Into<Message>, ) -> CompletionRequestBuilder<Self>
Generates a completion request builder for the given
prompt.Source§fn composes_native_output_with_tools(&self) -> bool
fn composes_native_output_with_tools(&self) -> bool
Whether this provider’s native structured output (
output_schema ->
format/response_format) composes with tool calls in the same
multi-turn request without suppressing them. Read moreAuto Trait Implementations§
impl<T> Freeze for CompletionModel<T>where
T: Freeze,
impl<T> RefUnwindSafe for CompletionModel<T>where
T: RefUnwindSafe,
impl<T> Send for CompletionModel<T>where
T: Send,
impl<T> Sync for CompletionModel<T>where
T: Sync,
impl<T> Unpin for CompletionModel<T>where
T: Unpin,
impl<T> UnsafeUnpin for CompletionModel<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for CompletionModel<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<M> AgentModelExt for Mwhere
M: CompletionModel,
impl<M> AgentModelExt for Mwhere
M: CompletionModel,
Source§fn into_agent_builder(self) -> AgentBuilder<Self>
fn into_agent_builder(self) -> AgentBuilder<Self>
Convert this model into a classic agent builder.
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