From cf2272a949b4b30fd954e511c12257e7cee96671 Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Thu, 25 Apr 2024 16:34:07 -0700 Subject: [PATCH] Always submit function definitions in Simple mode too (#11016) Switches Assistant2 to always provide functions. It's up to the model to choose to use them. At a later point, the `Submit::Codebase` should change the `tool_choice` to `query_codebase` rather than `auto`. For now, I think this will improve the experience for folks testing. Release Notes: - N/A --- crates/assistant2/src/assistant2.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/assistant2/src/assistant2.rs b/crates/assistant2/src/assistant2.rs index 22d05a3fc5b1c74b585367456adac52c4fd826b5..8204dc3654a88d3691eefdcda502589b63aae14e 100644 --- a/crates/assistant2/src/assistant2.rs +++ b/crates/assistant2/src/assistant2.rs @@ -314,7 +314,8 @@ impl AssistantChat { let completion = this.update(cx, |this, cx| { this.push_new_assistant_message(cx); - let definitions = if call_count < limit && matches!(mode, SubmitMode::Codebase) + let definitions = if call_count < limit + && matches!(mode, SubmitMode::Codebase | SubmitMode::Simple) { this.tool_registry.definitions() } else {