pub struct CompletionModel {
pub model: String,
/* private fields */
}
Fields§
§model: String
Implementations§
Trait Implementations§
Source§impl Clone for CompletionModel
impl Clone for CompletionModel
Source§fn clone(&self) -> CompletionModel
fn clone(&self) -> CompletionModel
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 CompletionModel for CompletionModel
impl CompletionModel for CompletionModel
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§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<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 Freeze for CompletionModel
impl !RefUnwindSafe for CompletionModel
impl Send for CompletionModel
impl Sync for CompletionModel
impl Unpin for CompletionModel
impl !UnwindSafe for CompletionModel
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, R> CompletionModelDyn for T
impl<T, R> CompletionModelDyn for T
Source§fn completion_request(
&self,
prompt: Message,
) -> CompletionRequestBuilder<CompletionModelHandle<'_>>
fn completion_request( &self, prompt: Message, ) -> CompletionRequestBuilder<CompletionModelHandle<'_>>
Generates a completion request builder for the given prompt
.