assistant2: Add tool selector (#26480)
This PR adds a tool selector to Assistant 2 to facilitate customizing the tools that the model sees: <img width="1297" alt="Screenshot 2025-03-11 at 4 25 31 PM" src="https://github.com/user-attachments/assets/7a656343-83bc-4546-9430-6a5f7ff1fd08" /> Release Notes: - N/A
This commit is contained in:
parent
0cf6259fec
commit
4e6c37d23b
6 changed files with 166 additions and 33 deletions
|
@ -355,16 +355,13 @@ impl Thread {
|
|||
input_schema: ScriptingTool::input_schema(),
|
||||
});
|
||||
|
||||
tools.extend(
|
||||
self.tools()
|
||||
.tools(cx)
|
||||
.into_iter()
|
||||
.map(|tool| LanguageModelRequestTool {
|
||||
name: tool.name(),
|
||||
description: tool.description(),
|
||||
input_schema: tool.input_schema(),
|
||||
}),
|
||||
);
|
||||
tools.extend(self.tools().enabled_tools(cx).into_iter().map(|tool| {
|
||||
LanguageModelRequestTool {
|
||||
name: tool.name(),
|
||||
description: tool.description(),
|
||||
input_schema: tool.input_schema(),
|
||||
}
|
||||
}));
|
||||
|
||||
request.tools = tools;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue