mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
yield from
This commit is contained in:
parent
c32666b1c5
commit
296a336d22
1 changed files with 3 additions and 6 deletions
|
@ -409,8 +409,7 @@ class Coder:
|
|||
def run_stream(self, user_message):
|
||||
self.io.user_input(user_message)
|
||||
self.reflected_message = None
|
||||
for chunk in self.send_new_user_message(user_message):
|
||||
yield chunk
|
||||
yield from self.send_new_user_message(user_message)
|
||||
|
||||
def run(self, with_message=None):
|
||||
while True:
|
||||
|
@ -561,8 +560,7 @@ class Coder:
|
|||
exhausted = False
|
||||
interrupted = False
|
||||
try:
|
||||
for chunk in self.send(messages, functions=self.functions):
|
||||
yield chunk
|
||||
yield from self.send(messages, functions=self.functions)
|
||||
except KeyboardInterrupt:
|
||||
interrupted = True
|
||||
except ExhaustedContextWindow:
|
||||
|
@ -688,8 +686,7 @@ class Coder:
|
|||
self.chat_completion_call_hashes.append(hash_object.hexdigest())
|
||||
|
||||
if self.stream:
|
||||
for chunk in self.show_send_output_stream(completion):
|
||||
yield chunk
|
||||
yield from self.show_send_output_stream(completion)
|
||||
else:
|
||||
self.show_send_output(completion)
|
||||
except KeyboardInterrupt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue