mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
cleanup
This commit is contained in:
parent
d750511c7c
commit
fbcbe137ab
1 changed files with 1 additions and 9 deletions
|
@ -198,15 +198,7 @@ class Commands:
|
||||||
self.io.tool_output("=" * (width + cost_width + 1))
|
self.io.tool_output("=" * (width + cost_width + 1))
|
||||||
self.io.tool_output(f"${total_cost:7.4f} {fmt(total)} tokens total")
|
self.io.tool_output(f"${total_cost:7.4f} {fmt(total)} tokens total")
|
||||||
|
|
||||||
# only switch to image model token count if gpt4 and openai and image in files
|
limit = self.coder.main_model.info.get("max_input_tokens")
|
||||||
image_in_chat = False
|
|
||||||
if self.coder.main_model.accepts_images:
|
|
||||||
image_in_chat = any(
|
|
||||||
is_image_file(relative_fname)
|
|
||||||
for relative_fname in self.coder.get_inchat_relative_files()
|
|
||||||
)
|
|
||||||
limit = 128000 if image_in_chat else self.coder.main_model.info.get("max_input_tokens")
|
|
||||||
|
|
||||||
remaining = limit - total
|
remaining = limit - total
|
||||||
if remaining > 1024:
|
if remaining > 1024:
|
||||||
self.io.tool_output(f"{cost_pad}{fmt(remaining)} tokens remaining in context window")
|
self.io.tool_output(f"{cost_pad}{fmt(remaining)} tokens remaining in context window")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue