mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Handle null model.info max_input_tokens
This commit is contained in:
parent
fb3a85b6d2
commit
ea97d08449
1 changed files with 4 additions and 1 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")
|
||||||
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue