gemini: Fix issue when deserializing tool call (#29363)
Fixes a regression introduced in #29322 Release Notes: - N/A Co-authored-by: Agus Zubiaga <hi@aguz.me>
This commit is contained in:
parent
58604fba86
commit
cd365b0cf5
2 changed files with 2 additions and 4 deletions
|
@ -334,7 +334,6 @@ pub struct CountTokensResponse {
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
pub struct FunctionCall {
|
pub struct FunctionCall {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub raw_args: String,
|
|
||||||
pub args: serde_json::Value,
|
pub args: serde_json::Value,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,6 @@ pub fn into_google(
|
||||||
Some(Part::FunctionCallPart(google_ai::FunctionCallPart {
|
Some(Part::FunctionCallPart(google_ai::FunctionCallPart {
|
||||||
function_call: google_ai::FunctionCall {
|
function_call: google_ai::FunctionCall {
|
||||||
name: tool_use.name.to_string(),
|
name: tool_use.name.to_string(),
|
||||||
raw_args: tool_use.raw_input,
|
|
||||||
args: tool_use.input,
|
args: tool_use.input,
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
@ -540,8 +539,8 @@ pub fn map_to_language_model_completion_events(
|
||||||
is_input_complete: true,
|
is_input_complete: true,
|
||||||
raw_input: function_call_part
|
raw_input: function_call_part
|
||||||
.function_call
|
.function_call
|
||||||
.raw_args
|
.args
|
||||||
.clone(),
|
.to_string(),
|
||||||
input: function_call_part.function_call.args,
|
input: function_call_part.function_call.args,
|
||||||
},
|
},
|
||||||
)));
|
)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue