pub struct ModelConfig {
pub model: String,
pub model_name: Option<String>,
pub top_p: Option<f64>,
pub parallel_tool_calls: Option<bool>,
pub temperature: Option<f64>,
pub max_completion_tokens: Option<u64>,
pub reasoning_effort: Option<String>,
pub presence_penalty: Option<f64>,
pub strict: Option<bool>,
pub web_search_options: Option<WebSearchOptions>,
}Expand description
Configuration for the model request.
Fields§
§model: StringModel name.
model_name: Option<String>Optional model name.
top_p: Option<f64>Top-p sampling parameter.
parallel_tool_calls: Option<bool>Specifies whether to perform parallel ToolCalls. default: true
temperature: Option<f64>Specifies the diversity of tokens generated by the model.
max_completion_tokens: Option<u64>Specifies the maximum number of tokens generated by the model.
reasoning_effort: Option<String>Specifies the level of effort for reasoning in the inference model:
- “low”: Low effort
- “medium”: Medium effort
- “high”: High effort default: “medium”
presence_penalty: Option<f64>Specifies whether to apply a presence penalty to the model. Range: 2.0..-2.0
strict: Option<bool>Strictly structured default: false Forced disabled in parallel ToolCalls
web_search_options: Option<WebSearchOptions>Options for performing web search with available models.
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
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 ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnwindSafe for ModelConfig
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