pub struct Parameters {
pub result_format: Option<String>,
pub translation_options: Option<TranslationOptions>,
pub incremental_output: Option<bool>,
pub tools: Option<Vec<FunctionCall>>,
pub parallel_tool_calls: Option<bool>,
pub thinking_budget: Option<usize>,
pub enable_search: Option<bool>,
pub search_options: Option<SearchOptions>,
pub enable_thinking: Option<bool>,
pub response_format: Option<ResponseFormat>,
/* private fields */
}
Fields§
§result_format: Option<String>
返回数据的格式。推荐优先设置为“message“
translation_options: Option<TranslationOptions>
当您使用翻译模型时需要配置的翻译参数。
incremental_output: Option<bool>
👎Deprecated since 0.5.0: Stream control is now unified under the top-level
§stream
parameter in request objects. This parameter will be ignored.tools: Option<Vec<FunctionCall>>
§parallel_tool_calls: Option<bool>
是否开启并行工具调用。参数为true时开启,为false时不开启。并行工具调用详情请参见:并行工具调用。
thinking_budget: Option<usize>
§enable_search: Option<bool>
§search_options: Option<SearchOptions>
联网搜索的策略。仅当enable_search为true时生效。
enable_thinking: Option<bool>
只支持 qwen3, 对 QwQ 与 DeepSeek-R1 模型无效。
response_format: Option<ResponseFormat>
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
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 moreSource§impl Debug for Parameters
impl Debug for Parameters
Source§impl<'de> Deserialize<'de> for Parameters
impl<'de> Deserialize<'de> for Parameters
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Parameters
impl PartialEq for Parameters
Source§impl Serialize for Parameters
impl Serialize for Parameters
Source§impl Validator<Parameters> for ModelValidator
impl Validator<Parameters> for ModelValidator
Source§fn validate<R: RequestTrait<P = Parameters> + ?Sized>(
&self,
params: &R,
) -> Result<()>
fn validate<R: RequestTrait<P = Parameters> + ?Sized>( &self, params: &R, ) -> Result<()>
验证请求的参数
impl StructuralPartialEq for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnwindSafe for Parameters
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