assistant2: Avoid unnecessary String
cloning in tool use (#25725)
This PR removes some unnecessary `String` cloning in the tool use paths. We now store the data in `Arc<str>`s for cheap cloning. Release Notes: - N/A
This commit is contained in:
parent
da22f21dec
commit
e7df5ce61c
5 changed files with 19 additions and 16 deletions
|
@ -731,7 +731,7 @@ pub fn map_to_language_model_completion_events(
|
|||
Ok(LanguageModelCompletionEvent::ToolUse(
|
||||
LanguageModelToolUse {
|
||||
id: tool_use.id.into(),
|
||||
name: tool_use.name,
|
||||
name: tool_use.name.into(),
|
||||
input: if tool_use.input_json.is_empty()
|
||||
{
|
||||
Value::Null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue