mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
chore: 删除冗余的兼容性检查判断
This commit is contained in:
@@ -58,9 +58,6 @@ def get_rest_wait_time(session_name: str, spent: float) -> float:
|
||||
|
||||
import config
|
||||
|
||||
if not hasattr(config, 'rate_limitation'):
|
||||
return 0
|
||||
|
||||
min_seconds_per_round = 60.0 / config.rate_limitation
|
||||
|
||||
if session_name in __crt_minute_usage__:
|
||||
@@ -75,9 +72,6 @@ def is_reach_limit(session_name: str) -> bool:
|
||||
|
||||
import config
|
||||
|
||||
if not hasattr(config, 'rate_limitation'):
|
||||
return False
|
||||
|
||||
if session_name in __crt_minute_usage__:
|
||||
return __crt_minute_usage__[session_name] >= config.rate_limitation
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user