Struct rig::providers::openai::CompletionModel
source · pub struct CompletionModel {
pub model: String,
/* private fields */
}
Fields§
§model: String
Name of the model (e.g.: gpt-3.5-turbo-1106)
Implementations§
Trait Implementations§
source§impl Clone for CompletionModel
impl Clone for CompletionModel
source§fn clone(&self) -> CompletionModel
fn clone(&self) -> CompletionModel
Returns a copy 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
§type Response = CompletionResponse
type Response = CompletionResponse
The raw response type returned by the underlying completion model
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.
fn completion_request(&self, prompt: &str) -> CompletionRequestBuilder<Self>
fn simple_completion( &self, prompt: &str, chat_history: Vec<Message>, ) -> impl Future<Output = Result<CompletionResponse<Self::Response>, CompletionError>> + Send
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