mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
8x repomap when finding files; fix max_input_tokens
This commit is contained in:
parent
5e25e3550e
commit
c020d94d5f
2 changed files with 5 additions and 2 deletions
|
@ -328,7 +328,10 @@ class Model:
|
||||||
self.missing_keys = res.get("missing_keys")
|
self.missing_keys = res.get("missing_keys")
|
||||||
self.keys_in_environment = res.get("keys_in_environment")
|
self.keys_in_environment = res.get("keys_in_environment")
|
||||||
|
|
||||||
if self.info.get("max_input_tokens", 0) < 32 * 1024:
|
max_input_tokens = self.info.get("max_input_tokens", 0)
|
||||||
|
if not max_input_tokens:
|
||||||
|
max_input_tokens = 0
|
||||||
|
if max_input_tokens < 32 * 1024:
|
||||||
self.max_chat_history_tokens = 1024
|
self.max_chat_history_tokens = 1024
|
||||||
else:
|
else:
|
||||||
self.max_chat_history_tokens = 2 * 1024
|
self.max_chat_history_tokens = 2 * 1024
|
||||||
|
|
|
@ -71,7 +71,7 @@ class RepoMap:
|
||||||
max_map_tokens = self.max_map_tokens
|
max_map_tokens = self.max_map_tokens
|
||||||
|
|
||||||
# With no files in the chat, give a bigger view of the entire repo
|
# With no files in the chat, give a bigger view of the entire repo
|
||||||
MUL = 16
|
MUL = 8
|
||||||
padding = 4096
|
padding = 4096
|
||||||
if max_map_tokens and self.max_context_window:
|
if max_map_tokens and self.max_context_window:
|
||||||
target = min(max_map_tokens * MUL, self.max_context_window - padding)
|
target = min(max_map_tokens * MUL, self.max_context_window - padding)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue