pub struct ResponsesCompletionModel<H = Client> {
pub model: String,
pub tools: Vec<ResponsesToolDefinition>,
/* private fields */
}Fields§
§model: String§tools: Vec<ResponsesToolDefinition>Implementations§
Source§impl<H> ResponsesCompletionModel<H>where
Client<H>: HttpClientExt + Clone + Debug + 'static,
H: Clone + Default + Debug + WasmCompatSend + WasmCompatSync + 'static,
impl<H> ResponsesCompletionModel<H>where
Client<H>: HttpClientExt + Clone + Debug + 'static,
H: Clone + Default + Debug + WasmCompatSend + WasmCompatSync + 'static,
Source§impl<H> ResponsesCompletionModel<H>where
Client<H>: HttpClientExt + Clone + Debug + 'static,
H: Clone + Default + Debug + WasmCompatSend + WasmCompatSync + 'static,
impl<H> ResponsesCompletionModel<H>where
Client<H>: HttpClientExt + Clone + Debug + 'static,
H: Clone + Default + Debug + WasmCompatSend + WasmCompatSync + 'static,
pub async fn stream( &self, completion_request: CompletionRequest, ) -> Result<StreamingCompletionResponse<StreamingCompletionResponse>, CompletionError>
Trait Implementations§
Source§impl<H: Clone> Clone for ResponsesCompletionModel<H>
impl<H: Clone> Clone for ResponsesCompletionModel<H>
Source§fn clone(&self) -> ResponsesCompletionModel<H>
fn clone(&self) -> ResponsesCompletionModel<H>
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<H> CompletionModel for ResponsesCompletionModel<H>where
Client<H>: HttpClientExt + Clone + Debug + 'static,
H: Clone + Default + Debug + WasmCompatSend + WasmCompatSync + 'static,
impl<H> CompletionModel for ResponsesCompletionModel<H>where
Client<H>: HttpClientExt + Clone + Debug + 'static,
H: Clone + Default + Debug + WasmCompatSend + WasmCompatSync + '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.
type Client = Client<ChatGPTExt, H>
fn make(client: &Self::Client, model: impl Into<String>) -> Self
Source§async fn completion(
&self,
completion_request: CompletionRequest,
) -> Result<CompletionResponse<Self::Response>, CompletionError>
async fn completion( &self, completion_request: CompletionRequest, ) -> Result<CompletionResponse<Self::Response>, CompletionError>
Generates a completion response for the given completion request.
async fn stream( &self, completion_request: CompletionRequest, ) -> Result<StreamingCompletionResponse<Self::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.Auto Trait Implementations§
impl<H> Freeze for ResponsesCompletionModel<H>where
H: Freeze,
impl<H = Client> !RefUnwindSafe for ResponsesCompletionModel<H>
impl<H> Send for ResponsesCompletionModel<H>where
H: Send,
impl<H> Sync for ResponsesCompletionModel<H>where
H: Sync,
impl<H> Unpin for ResponsesCompletionModel<H>where
H: Unpin,
impl<H> UnsafeUnpin for ResponsesCompletionModel<H>where
H: UnsafeUnpin,
impl<H = Client> !UnwindSafe for ResponsesCompletionModel<H>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more