mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
copy
This commit is contained in:
parent
5d30c71ccf
commit
980197cb05
1 changed files with 7 additions and 2 deletions
|
@ -1237,14 +1237,13 @@ class Coder:
|
||||||
|
|
||||||
if max_input_tokens and input_tokens >= max_input_tokens:
|
if max_input_tokens and input_tokens >= max_input_tokens:
|
||||||
self.io.tool_error(
|
self.io.tool_error(
|
||||||
f"Your current chat context {input_tokens:,} exceeds the"
|
f"Your estimated chat context of {input_tokens:,} tokens exceeds the"
|
||||||
f" {max_input_tokens:,} token limit for {self.main_model.name}!"
|
f" {max_input_tokens:,} token limit for {self.main_model.name}!"
|
||||||
)
|
)
|
||||||
self.io.tool_output("To reduce the chat context:")
|
self.io.tool_output("To reduce the chat context:")
|
||||||
self.io.tool_output("- Use /drop to remove unneeded files from the chat")
|
self.io.tool_output("- Use /drop to remove unneeded files from the chat")
|
||||||
self.io.tool_output("- Use /clear to clear the chat history")
|
self.io.tool_output("- Use /clear to clear the chat history")
|
||||||
self.io.tool_output("- Break your code into smaller files")
|
self.io.tool_output("- Break your code into smaller files")
|
||||||
proceed = "y"
|
|
||||||
|
|
||||||
# Special warning for Ollama models about context window size
|
# Special warning for Ollama models about context window size
|
||||||
if self.main_model.name.startswith(("ollama/", "ollama_chat/")):
|
if self.main_model.name.startswith(("ollama/", "ollama_chat/")):
|
||||||
|
@ -1258,6 +1257,12 @@ class Coder:
|
||||||
" for help configuring larger context windows."
|
" for help configuring larger context windows."
|
||||||
)
|
)
|
||||||
proceed = "n"
|
proceed = "n"
|
||||||
|
else:
|
||||||
|
proceed = "y"
|
||||||
|
self.io.tool_output(
|
||||||
|
"It's probably safe to try and send the request, most providers won't charge if"
|
||||||
|
" the context limit is exceeded."
|
||||||
|
)
|
||||||
|
|
||||||
if not self.io.confirm_ask("Try to proceed anyway?", default=proceed):
|
if not self.io.confirm_ask("Try to proceed anyway?", default=proceed):
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue