Struct async_openai::types::CreateEditRequestArgs
source · pub struct CreateEditRequestArgs { /* private fields */ }
Expand description
Builder for CreateEditRequest
.
Implementations§
source§impl CreateEditRequestArgs
impl CreateEditRequestArgs
sourcepub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
sourcepub fn input<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn input<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The input text to use as a starting point for the edit.
sourcepub fn instruction<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn instruction<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The instruction that tells the model how to edit the prompt.
sourcepub fn n<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn n<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
How many edits to generate for the input and instruction.
sourcepub fn temperature<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
pub fn temperature<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.
We generally recommend altering this or top_p
but not both.
sourcepub fn top_p<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
pub fn top_p<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature
but not both.
sourcepub fn build(&self) -> Result<CreateEditRequest, OpenAIError>
pub fn build(&self) -> Result<CreateEditRequest, OpenAIError>
Trait Implementations§
source§impl Clone for CreateEditRequestArgs
impl Clone for CreateEditRequestArgs
source§fn clone(&self) -> CreateEditRequestArgs
fn clone(&self) -> CreateEditRequestArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more