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:
@@ -90,7 +90,7 @@ where
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize, Deserialize)]
|
||||
pub struct LanguageModelToolUse {
|
||||
pub id: LanguageModelToolUseId,
|
||||
pub name: String,
|
||||
pub name: Arc<str>,
|
||||
pub input: serde_json::Value,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user