assistant2: Remove "Tools" switch (#26485)
This PR removes the "Tools" switch from Assistant 2, as we can manage tools from the tool selector now. Release Notes: - N/A
This commit is contained in:
parent
2b94a35aaa
commit
d43bcc04db
3 changed files with 8 additions and 34 deletions
|
@ -342,12 +342,10 @@ impl Thread {
|
|||
&mut self,
|
||||
model: Arc<dyn LanguageModel>,
|
||||
request_kind: RequestKind,
|
||||
use_tools: bool,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
let mut request = self.to_completion_request(request_kind, cx);
|
||||
|
||||
if use_tools {
|
||||
request.tools = {
|
||||
let mut tools = Vec::new();
|
||||
|
||||
if self.tools.is_scripting_tool_enabled() {
|
||||
|
@ -366,8 +364,8 @@ impl Thread {
|
|||
}
|
||||
}));
|
||||
|
||||
request.tools = tools;
|
||||
}
|
||||
tools
|
||||
};
|
||||
|
||||
self.stream_completion(request, model, cx);
|
||||
}
|
||||
|
@ -753,7 +751,7 @@ impl Thread {
|
|||
Vec::new(),
|
||||
cx,
|
||||
);
|
||||
self.send_to_model(model, RequestKind::Chat, true, cx);
|
||||
self.send_to_model(model, RequestKind::Chat, cx);
|
||||
}
|
||||
|
||||
/// Cancels the last pending completion, if there are any pending.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue