This commit is contained in:
Umesh Yadav 2025-08-26 15:08:05 +05:30 committed by GitHub
commit a7dfe58554
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -86,11 +86,12 @@ impl Model {
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
#[serde(rename_all = "lowercase")]
pub enum ToolChoice {
Auto,
Required,
None,
#[serde(untagged)]
Other(ToolDefinition),
}

View file

@ -286,12 +286,13 @@ pub enum Prediction {
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
#[serde(rename_all = "lowercase")]
pub enum ToolChoice {
Auto,
Required,
None,
Any,
#[serde(untagged)]
Function(ToolDefinition),
}

View file

@ -269,11 +269,12 @@ pub struct Request {
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
#[serde(rename_all = "lowercase")]
pub enum ToolChoice {
Auto,
Required,
None,
#[serde(untagged)]
Other(ToolDefinition),
}