feat(generation): enforce prompt budget with whole article eviction (#47)
This commit is contained in:
@ -56,7 +56,7 @@ func generationErrorCode(raw []byte) string {
|
||||
}
|
||||
for _, value := range values {
|
||||
switch code := strings.ToLower(value); code {
|
||||
case "invalid_api_key", "authentication_error", "permission_denied", "unauthenticated", "api_key_invalid", "api_key_expired", "model_not_found", "not_found_error", "not_found", "rate_limit_error", "rate_limit_exceeded", "resource_exhausted", "deadline_exceeded", "timeout_error":
|
||||
case "context_length_exceeded", "max_tokens_exceeded", "input_too_long", "request_too_large", "invalid_api_key", "authentication_error", "permission_denied", "unauthenticated", "api_key_invalid", "api_key_expired", "model_not_found", "not_found_error", "not_found", "rate_limit_error", "rate_limit_exceeded", "resource_exhausted", "deadline_exceeded", "timeout_error":
|
||||
return code
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user