pub struct CreateClassificationRequest<'a> {Show 14 fields
pub examples: Option<Vec<Vec<String>>>,
pub expand: Option<Vec<Value>>,
pub file: Option<String>,
pub labels: Option<Vec<String>>,
pub logit_bias: Option<Value>,
pub logprobs: Option<i64>,
pub max_examples: Option<i64>,
pub model: String,
pub query: String,
pub return_metadata: Option<bool>,
pub return_prompt: Option<bool>,
pub search_model: Option<String>,
pub temperature: Option<f64>,
pub user: Option<String>,
/* private fields */
}
Expand description
Create this with the associated client method.
That method takes required values as arguments. Set optional values using builder methods on this struct.
Fields§
§examples: Option<Vec<Vec<String>>>
§expand: Option<Vec<Value>>
§file: Option<String>
§labels: Option<Vec<String>>
§logit_bias: Option<Value>
§logprobs: Option<i64>
§max_examples: Option<i64>
§model: String
§query: String
§return_metadata: Option<bool>
§return_prompt: Option<bool>
§search_model: Option<String>
§temperature: Option<f64>
§user: Option<String>
Implementations§
Source§impl<'a> CreateClassificationRequest<'a>
impl<'a> CreateClassificationRequest<'a>
pub async fn send(self) -> InMemoryResult<CreateClassificationResponse>
pub fn examples(self, examples: &[&[&str]]) -> Self
pub fn expand(self, expand: Vec<Value>) -> Self
pub fn file(self, file: &str) -> Self
pub fn labels(self, labels: impl IntoIterator<Item = impl AsRef<str>>) -> Self
pub fn logit_bias(self, logit_bias: Value) -> Self
pub fn logprobs(self, logprobs: i64) -> Self
pub fn max_examples(self, max_examples: i64) -> Self
pub fn return_metadata(self, return_metadata: bool) -> Self
pub fn return_prompt(self, return_prompt: bool) -> Self
pub fn search_model(self, search_model: &str) -> Self
pub fn temperature(self, temperature: f64) -> Self
pub fn user(self, user: &str) -> Self
Trait Implementations§
Source§impl<'a> Clone for CreateClassificationRequest<'a>
impl<'a> Clone for CreateClassificationRequest<'a>
Source§fn clone(&self) -> CreateClassificationRequest<'a>
fn clone(&self) -> CreateClassificationRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> IntoFuture for CreateClassificationRequest<'a>
impl<'a> IntoFuture for CreateClassificationRequest<'a>
Source§type Output = Result<CreateClassificationResponse, Error<InMemoryBody>>
type Output = Result<CreateClassificationResponse, Error<InMemoryBody>>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CreateClassificationRequest<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CreateClassificationRequest<'a> as IntoFuture>::Output> + Send + 'a>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> Freeze for CreateClassificationRequest<'a>
impl<'a> !RefUnwindSafe for CreateClassificationRequest<'a>
impl<'a> Send for CreateClassificationRequest<'a>
impl<'a> Sync for CreateClassificationRequest<'a>
impl<'a> Unpin for CreateClassificationRequest<'a>
impl<'a> !UnwindSafe for CreateClassificationRequest<'a>
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