mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(copilot): add max_tokens_exceeded to prompt-too-long patterns
The pattern was missing from _PROMPT_TOO_LONG_PATTERNS, causing test_max_tokens_exceeded and test_all_patterns to fail. Also sync test_all_patterns with the full pattern list (add input tokens exceed).
This commit is contained in:
@@ -103,6 +103,7 @@ _PROMPT_TOO_LONG_PATTERNS: tuple[str, ...] = (
|
||||
"request too large",
|
||||
"maximum context length",
|
||||
"context_length_exceeded",
|
||||
"max_tokens_exceeded",
|
||||
"input tokens exceed",
|
||||
"input is too long",
|
||||
"content length exceeds",
|
||||
|
||||
@@ -89,6 +89,7 @@ class TestIsPromptTooLong:
|
||||
"maximum context length",
|
||||
"context_length_exceeded",
|
||||
"max_tokens_exceeded",
|
||||
"input tokens exceed",
|
||||
"input is too long",
|
||||
"content length exceeds",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user