mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
fix: Handle exceptions in the send method of base_coder.py
This commit is contained in:
parent
8115cbbd3a
commit
6980cfd115
1 changed files with 3 additions and 0 deletions
|
@ -1244,6 +1244,7 @@ class Coder:
|
|||
|
||||
self.io.log_llm_history("TO LLM", format_messages(messages))
|
||||
|
||||
completion = None
|
||||
try:
|
||||
hash_object, completion = send_completion(
|
||||
model.name,
|
||||
|
@ -1263,6 +1264,8 @@ class Coder:
|
|||
except KeyboardInterrupt as kbi:
|
||||
self.keyboard_interrupt()
|
||||
raise kbi
|
||||
except Exception as e:
|
||||
self.io.tool_error(f"Error during API call: {str(e)}")
|
||||
finally:
|
||||
self.io.log_llm_history(
|
||||
"LLM RESPONSE",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue