pub struct ChatCompletionRequestBuilder { /* private fields */ }
Implementations§
Source§impl ChatCompletionRequestBuilder
impl ChatCompletionRequestBuilder
pub fn new() -> Self
Sourcepub fn model(self, value: impl Into<String>) -> Self
pub fn model(self, value: impl Into<String>) -> Self
Sets the model
field with automatic conversion using Into<String>
.
Sourcepub fn max_tokens(self, value: u32) -> Self
pub fn max_tokens(self, value: u32) -> Self
Sets the max_tokens
field directly.
Sourcepub fn temperature(self, value: f64) -> Self
pub fn temperature(self, value: f64) -> Self
Sets the temperature
field directly.
Sourcepub fn frequency_penalty(self, value: f64) -> Self
pub fn frequency_penalty(self, value: f64) -> Self
Sets the frequency_penalty
field directly.
Sourcepub fn presence_penalty(self, value: f64) -> Self
pub fn presence_penalty(self, value: f64) -> Self
Sets the presence_penalty
field directly.
Sourcepub fn repetition_penalty(self, value: f64) -> Self
pub fn repetition_penalty(self, value: f64) -> Self
Sets the repetition_penalty
field directly.
Sourcepub fn top_logprobs(self, value: u32) -> Self
pub fn top_logprobs(self, value: u32) -> Self
Sets the top_logprobs
field directly.
Sourcepub fn logit_bias(self, value: HashMap<String, f64>) -> Self
pub fn logit_bias(self, value: HashMap<String, f64>) -> Self
Sets the logit_bias
field directly.
Sourcepub fn transforms(self, value: Vec<String>) -> Self
pub fn transforms(self, value: Vec<String>) -> Self
Sets the transforms
field directly.
Sourcepub fn provider(self, value: ProviderPreferences) -> Self
pub fn provider(self, value: ProviderPreferences) -> Self
Sets the provider
field directly.
Sourcepub fn reasoning(self, value: ReasoningConfig) -> Self
pub fn reasoning(self, value: ReasoningConfig) -> Self
Sets the reasoning
field directly.
pub fn build(self) -> Result<ChatCompletionRequest, OpenRouterError>
Trait Implementations§
Source§impl Default for ChatCompletionRequestBuilder
impl Default for ChatCompletionRequestBuilder
Source§fn default() -> ChatCompletionRequestBuilder
fn default() -> ChatCompletionRequestBuilder
Returns the “default value” for a type. Read more
Auto 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