pub struct CompletionRequestBuilder { /* private fields */ }
Expand description
Builder for CompletionRequest
.
Implementations§
Source§impl CompletionRequestBuilder
impl CompletionRequestBuilder
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn prompt<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn stream(&mut self, value: bool) -> &mut Self
pub fn max_tokens(&mut self, value: u32) -> &mut Self
pub fn temperature(&mut self, value: f64) -> &mut Self
pub fn seed(&mut self, value: u32) -> &mut Self
pub fn top_p(&mut self, value: f64) -> &mut Self
pub fn top_k(&mut self, value: u32) -> &mut Self
pub fn frequency_penalty(&mut self, value: f64) -> &mut Self
pub fn presence_penalty(&mut self, value: f64) -> &mut Self
pub fn repetition_penalty(&mut self, value: f64) -> &mut Self
pub fn top_logprobs(&mut self, value: u32) -> &mut Self
pub fn min_p(&mut self, value: f64) -> &mut Self
pub fn top_a(&mut self, value: f64) -> &mut Self
pub fn route<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn provider(&mut self, value: ProviderPreferences) -> &mut Self
pub fn response_format(&mut self, value: ResponseFormat) -> &mut Self
pub fn reasoning(&mut self, value: ReasoningConfig) -> &mut Self
Sourcepub fn build(&self) -> Result<CompletionRequest, OpenRouterError>
pub fn build(&self) -> Result<CompletionRequest, OpenRouterError>
Source§impl CompletionRequestBuilder
impl CompletionRequestBuilder
pub fn models<T, S>(&mut self, items: T) -> &mut Self
pub fn logit_bias<K, V, T>(&mut self, items: T) -> &mut Self
pub fn transforms<T, S>(&mut self, items: T) -> &mut Self
Trait Implementations§
Source§impl Clone for CompletionRequestBuilder
impl Clone for CompletionRequestBuilder
Source§fn clone(&self) -> CompletionRequestBuilder
fn clone(&self) -> CompletionRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for CompletionRequestBuilder
impl RefUnwindSafe for CompletionRequestBuilder
impl Send for CompletionRequestBuilder
impl Sync for CompletionRequestBuilder
impl Unpin for CompletionRequestBuilder
impl UnwindSafe for CompletionRequestBuilder
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