mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: handle system reminder message construction properly
This commit is contained in:
parent
22fc961dc0
commit
aa217a3a43
1 changed files with 7 additions and 2 deletions
|
@ -35,8 +35,13 @@ class EditorEditBlockCoder(EditBlockCoder):
|
|||
# Only add reminder if there are current messages
|
||||
if chunks.cur:
|
||||
final = chunks.cur[-1]
|
||||
if self.main_model.reminder == "sys":
|
||||
chunks.reminder = self.reminder_message
|
||||
if self.main_model.reminder == "sys" and self.gpt_prompts.system_reminder:
|
||||
chunks.reminder = [
|
||||
dict(
|
||||
role="system",
|
||||
content=self.fmt_system_prompt(self.gpt_prompts.system_reminder)
|
||||
)
|
||||
]
|
||||
elif self.main_model.reminder == "user" and final["role"] == "user":
|
||||
# stuff it into the user message
|
||||
new_content = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue