Introduce LanguageModelToolUse::raw_input (#29322)

This is to enable alternative streaming solutions at the application
layer. I'm not sure we really should have performed parsing of the input
at this layer. Either way I want to experiment with streaming approaches
in a separate crate on a branch, and this will help.

/cc @maxdeviant @bennetbo @rtfeldman

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Nathan Sobo 2025-04-23 20:30:48 -06:00 committed by GitHub
parent f125353b6f
commit 8836c6fb42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 13 additions and 0 deletions

View file

@ -396,6 +396,7 @@ pub fn into_google(
Some(Part::FunctionCallPart(google_ai::FunctionCallPart {
function_call: google_ai::FunctionCall {
name: tool_use.name.to_string(),
raw_args: tool_use.raw_input,
args: tool_use.input,
},
}))
@ -537,6 +538,10 @@ pub fn map_to_language_model_completion_events(
id,
name,
is_input_complete: true,
raw_input: function_call_part
.function_call
.raw_args
.clone(),
input: function_call_part.function_call.args,
},
)));