mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
Update tool prompting to be more direct
This commit is contained in:
parent
374d69d428
commit
943fabe4d6
2 changed files with 14 additions and 9 deletions
|
@ -1161,8 +1161,6 @@ class Coder:
|
|||
|
||||
def fmt_system_prompt(self, prompt):
|
||||
final_reminders = []
|
||||
if self.mcp_tools and len(self.mcp_tools) > 0:
|
||||
final_reminders.append(self.gpt_prompts.tool_prompt)
|
||||
|
||||
if self.main_model.lazy:
|
||||
final_reminders.append(self.gpt_prompts.lazy_prompt)
|
||||
|
@ -1198,6 +1196,9 @@ class Coder:
|
|||
else:
|
||||
quad_backtick_reminder = ""
|
||||
|
||||
if self.mcp_tools and len(self.mcp_tools) > 0:
|
||||
final_reminders.append(self.gpt_prompts.tool_prompt)
|
||||
|
||||
final_reminders = "\n\n".join(final_reminders)
|
||||
|
||||
prompt = prompt.format(
|
||||
|
|
|
@ -56,13 +56,17 @@ Do not edit these files!
|
|||
no_shell_cmd_prompt = ""
|
||||
no_shell_cmd_reminder = ""
|
||||
|
||||
tool_prompt = """ALWAYS Answer the user's request using the relevant tool(s), if they are
|
||||
available.
|
||||
Do your best to infer required parameters from your context. If the user provides a
|
||||
specific value for a parameter (for example provided in quotes), make sure to use that
|
||||
value EXACTLY.
|
||||
Carefully analyze descriptive terms in the request as they may indicate required parameter values
|
||||
that should be included even if not explicitly quoted.
|
||||
tool_prompt = """
|
||||
<tool_calling>
|
||||
When solving problems, you have special tools available. Please follow these rules:
|
||||
|
||||
1. Always use the exact format required for each tool and include all needed information.
|
||||
2. Only use tools that are currently available in this conversation.
|
||||
3. Don't mention tool names when talking to people. Say "I'll check your code" instead
|
||||
of "I'll use the code_analyzer tool."
|
||||
4. Only use tools when necessary. If you know the answer, just respond directly.
|
||||
5. Before using any tool, briefly explain why you need to use it.
|
||||
</tool_calling>
|
||||
"""
|
||||
|
||||
rename_with_shell = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue