mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
Model.use_repo_map, Model.send_undo_reply
This commit is contained in:
parent
43ba638ac4
commit
122c1c4f6c
3 changed files with 7 additions and 3 deletions
|
@ -113,7 +113,7 @@ class Coder:
|
||||||
self.io.tool_output("Git repo: none")
|
self.io.tool_output("Git repo: none")
|
||||||
self.find_common_root()
|
self.find_common_root()
|
||||||
|
|
||||||
if main_model.is_gpt4():
|
if main_model.use_repo_map:
|
||||||
rm_io = io if self.verbose else None
|
rm_io = io if self.verbose else None
|
||||||
self.repo_map = RepoMap(
|
self.repo_map = RepoMap(
|
||||||
map_tokens,
|
map_tokens,
|
||||||
|
@ -328,7 +328,7 @@ class Coder:
|
||||||
]
|
]
|
||||||
|
|
||||||
main_sys = self.gpt_prompts.main_system
|
main_sys = self.gpt_prompts.main_system
|
||||||
if self.main_model.is_gpt4():
|
if self.main_model.use_repo_map:
|
||||||
main_sys += "\n" + self.gpt_prompts.system_reminder
|
main_sys += "\n" + self.gpt_prompts.system_reminder
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
|
|
|
@ -183,7 +183,7 @@ class Commands:
|
||||||
"was reset and removed from git.\n"
|
"was reset and removed from git.\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.coder.main_model.is_gpt4():
|
if self.coder.main_model.send_undo_reply:
|
||||||
return prompts.undo_command_reply
|
return prompts.undo_command_reply
|
||||||
|
|
||||||
def cmd_diff(self, args):
|
def cmd_diff(self, args):
|
||||||
|
|
|
@ -3,6 +3,8 @@ import re
|
||||||
|
|
||||||
class Model:
|
class Model:
|
||||||
always_available = False
|
always_available = False
|
||||||
|
use_repo_map = False
|
||||||
|
send_undo_reply = False
|
||||||
|
|
||||||
def __init__(self, name, tokens=None):
|
def __init__(self, name, tokens=None):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
@ -17,6 +19,8 @@ class Model:
|
||||||
|
|
||||||
if self.is_gpt4():
|
if self.is_gpt4():
|
||||||
self.edit_format = "diff"
|
self.edit_format = "diff"
|
||||||
|
self.use_repo_map = True
|
||||||
|
self.send_undo_reply = True
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.is_gpt35():
|
if self.is_gpt35():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue