pub struct CreateAnswerRequest<'a> {Show 18 fields
pub documents: Option<Vec<String>>,
pub examples: Vec<Vec<String>>,
pub examples_context: String,
pub expand: Option<Vec<Value>>,
pub file: Option<String>,
pub logit_bias: Option<Value>,
pub logprobs: Option<i64>,
pub max_rerank: Option<i64>,
pub max_tokens: Option<i64>,
pub model: String,
pub n: Option<i64>,
pub question: String,
pub return_metadata: Option<bool>,
pub return_prompt: Option<bool>,
pub search_model: Option<String>,
pub stop: Option<Value>,
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§
§documents: Option<Vec<String>>
§examples: Vec<Vec<String>>
§examples_context: String
§expand: Option<Vec<Value>>
§file: Option<String>
§logit_bias: Option<Value>
§logprobs: Option<i64>
§max_rerank: Option<i64>
§max_tokens: Option<i64>
§model: String
§n: Option<i64>
§question: String
§return_metadata: Option<bool>
§return_prompt: Option<bool>
§search_model: Option<String>
§stop: Option<Value>
§temperature: Option<f64>
§user: Option<String>
Implementations§
Source§impl<'a> CreateAnswerRequest<'a>
impl<'a> CreateAnswerRequest<'a>
pub async fn send(self) -> InMemoryResult<CreateAnswerResponse>
pub fn documents( self, documents: impl IntoIterator<Item = impl AsRef<str>>, ) -> Self
pub fn expand(self, expand: Vec<Value>) -> Self
pub fn file(self, file: &str) -> Self
pub fn logit_bias(self, logit_bias: Value) -> Self
pub fn logprobs(self, logprobs: i64) -> Self
pub fn max_rerank(self, max_rerank: i64) -> Self
pub fn max_tokens(self, max_tokens: i64) -> Self
pub fn n(self, n: 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 stop(self, stop: Value) -> Self
pub fn temperature(self, temperature: f64) -> Self
pub fn user(self, user: &str) -> Self
Trait Implementations§
Source§impl<'a> Clone for CreateAnswerRequest<'a>
impl<'a> Clone for CreateAnswerRequest<'a>
Source§fn clone(&self) -> CreateAnswerRequest<'a>
fn clone(&self) -> CreateAnswerRequest<'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 CreateAnswerRequest<'a>
impl<'a> IntoFuture for CreateAnswerRequest<'a>
Source§type Output = Result<CreateAnswerResponse, Error<InMemoryBody>>
type Output = Result<CreateAnswerResponse, Error<InMemoryBody>>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <CreateAnswerRequest<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <CreateAnswerRequest<'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 CreateAnswerRequest<'a>
impl<'a> !RefUnwindSafe for CreateAnswerRequest<'a>
impl<'a> Send for CreateAnswerRequest<'a>
impl<'a> Sync for CreateAnswerRequest<'a>
impl<'a> Unpin for CreateAnswerRequest<'a>
impl<'a> !UnwindSafe for CreateAnswerRequest<'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