mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 23:25:39 +00:00
add parallel_tool_calls option to chat completion
This commit is contained in:
@ -45,6 +45,8 @@ pub struct ChatCompletionRequest {
|
|||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub tools: Option<Vec<Tool>>,
|
pub tools: Option<Vec<Tool>>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub parallel_tool_calls: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
#[serde(serialize_with = "serialize_tool_choice")]
|
#[serde(serialize_with = "serialize_tool_choice")]
|
||||||
pub tool_choice: Option<ToolChoiceType>,
|
pub tool_choice: Option<ToolChoiceType>,
|
||||||
}
|
}
|
||||||
@ -67,6 +69,7 @@ impl ChatCompletionRequest {
|
|||||||
user: None,
|
user: None,
|
||||||
seed: None,
|
seed: None,
|
||||||
tools: None,
|
tools: None,
|
||||||
|
parallel_tool_calls: None,
|
||||||
tool_choice: None,
|
tool_choice: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,6 +90,7 @@ impl_builder_methods!(
|
|||||||
user: String,
|
user: String,
|
||||||
seed: i64,
|
seed: i64,
|
||||||
tools: Vec<Tool>,
|
tools: Vec<Tool>,
|
||||||
|
parallel_tool_calls: bool,
|
||||||
tool_choice: ToolChoiceType
|
tool_choice: ToolChoiceType
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user