assistant2: Add support for using tools (#21190)

This PR adds rudimentary support for using tools to `assistant2`. There
are currently no visual affordances for tool use.

This is gated behind the `assistant-tool-use` feature flag.

<img width="1079" alt="Screenshot 2024-11-25 at 7 21 31 PM"
src="https://github.com/user-attachments/assets/64d6ca29-c592-4474-8e9d-c344f855bc63">

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-11-25 19:44:34 -05:00 committed by GitHub
parent 3901d46101
commit f059b6a24b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 263 additions and 37 deletions

View file

@ -30,7 +30,7 @@ impl Tool for NowTool {
}
fn description(&self) -> String {
"Returns the current datetime in RFC 3339 format.".into()
"Returns the current datetime in RFC 3339 format. Only use this tool when the user specifically asks for it or the current task would benefit from knowing the current datetime.".into()
}
fn input_schema(&self) -> serde_json::Value {