mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
bfbd7b8416
2 changed files with 7 additions and 1 deletions
|
@ -359,7 +359,11 @@ class Coder:
|
||||||
self.summarizer_thread.start()
|
self.summarizer_thread.start()
|
||||||
|
|
||||||
def summarize_worker(self):
|
def summarize_worker(self):
|
||||||
self.summarized_done_messages = self.summarizer.summarize(self.done_messages)
|
try:
|
||||||
|
self.summarized_done_messages = self.summarizer.summarize(self.done_messages)
|
||||||
|
except ValueError as err:
|
||||||
|
self.io.tool_error(err.args[0])
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
self.io.tool_output("Finished summarizing chat history.")
|
self.io.tool_output("Finished summarizing chat history.")
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,8 @@ class ChatSummary:
|
||||||
]
|
]
|
||||||
|
|
||||||
summary = simple_send_with_retries(self.model.name, messages)
|
summary = simple_send_with_retries(self.model.name, messages)
|
||||||
|
if summary is None:
|
||||||
|
raise ValueError(f"summarizer unexpectedly failed for {self.model.name}")
|
||||||
summary = prompts.summary_prefix + summary
|
summary = prompts.summary_prefix + summary
|
||||||
|
|
||||||
return [dict(role="user", content=summary)]
|
return [dict(role="user", content=summary)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue