refactor: add retry loop to simple_send_with_retries function

This commit is contained in:
Paul Gauthier (aider) 2024-10-28 15:05:07 -07:00
parent f9c45432e6
commit bc515cf74a
2 changed files with 23 additions and 15 deletions

View file

@ -1124,7 +1124,6 @@ class Coder:
exhausted = False
interrupted = False
try:
# ai: replicate this try/except retry loop...
while True:
try:
yield from self.send(messages, functions=self.functions)
@ -1137,7 +1136,6 @@ class Coder:
self.io.tool_output(f"Retrying in {retry_delay:.1f} seconds...")
time.sleep(retry_delay)
continue
# ai: ... down to here
except KeyboardInterrupt:
interrupted = True
break