Manual no tool calls (#29745)
Now instead of the model hallucinating tool calls, we get requests for more context: <img width="620" alt="Screenshot 2025-05-01 at 12 45 49 PM" src="https://github.com/user-attachments/assets/847d5c14-82f6-4234-b85a-8cd2bc7ab11d" /> It still knows how to answer general questions: <img width="624" alt="Screenshot 2025-05-01 at 12 47 44 PM" src="https://github.com/user-attachments/assets/43ab0fc3-4cc8-452f-b26b-474b5d31919f" /> Release Notes: - Fixed the model still trying to do tool calls when no tools selected (e.g. in `Manual` profile). --------- Co-authored-by: Ben <ben@zed.dev> Co-authored-by: Michael <michael@zed.dev>
This commit is contained in:
parent
d7e181576e
commit
23fbab15ee
4 changed files with 21 additions and 5 deletions
|
@ -60,6 +60,8 @@ struct PromptTemplateContext {
|
|||
|
||||
#[serde(flatten)]
|
||||
model: ModelContext,
|
||||
|
||||
has_tools: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
@ -328,6 +330,7 @@ impl PromptBuilder {
|
|||
let template_context = PromptTemplateContext {
|
||||
project: context.clone(),
|
||||
model: model_context.clone(),
|
||||
has_tools: !model_context.available_tools.is_empty(),
|
||||
};
|
||||
|
||||
self.handlebars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue