mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 20:25:01 +00:00
use litellm's new supports_assistant_prefill
This commit is contained in:
parent
843836ea87
commit
888211fd48
3 changed files with 5 additions and 17 deletions
|
@ -989,7 +989,7 @@ class Coder:
|
|||
return
|
||||
except FinishReasonLength:
|
||||
# We hit the output limit!
|
||||
if not self.main_model.can_prefill:
|
||||
if not self.main_model.info.get("supports_assistant_prefill"):
|
||||
exhausted = True
|
||||
break
|
||||
|
||||
|
@ -998,7 +998,9 @@ class Coder:
|
|||
if messages[-1]["role"] == "assistant":
|
||||
messages[-1]["content"] = self.multi_response_content
|
||||
else:
|
||||
messages.append(dict(role="assistant", content=self.multi_response_content))
|
||||
messages.append(
|
||||
dict(role="assistant", content=self.multi_response_content, prefix=True)
|
||||
)
|
||||
except Exception as err:
|
||||
self.io.tool_error(f"Unexpected error: {err}")
|
||||
traceback.print_exc()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue