pub struct ChatCompletionRequestBuilder { /* private fields */ }
Expand description
Builder for ChatCompletionRequest
.
Implementations§
Source§impl ChatCompletionRequestBuilder
impl ChatCompletionRequestBuilder
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn messages(&mut self, value: Vec<Message>) -> &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<ChatCompletionRequest, OpenRouterError>
pub fn build(&self) -> Result<ChatCompletionRequest, OpenRouterError>
Source§impl ChatCompletionRequestBuilder
impl ChatCompletionRequestBuilder
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 ChatCompletionRequestBuilder
impl Clone for ChatCompletionRequestBuilder
Source§fn clone(&self) -> ChatCompletionRequestBuilder
fn clone(&self) -> ChatCompletionRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for ChatCompletionRequestBuilder
impl RefUnwindSafe for ChatCompletionRequestBuilder
impl Send for ChatCompletionRequestBuilder
impl Sync for ChatCompletionRequestBuilder
impl Unpin for ChatCompletionRequestBuilder
impl UnwindSafe for ChatCompletionRequestBuilder
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