mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 08:46:02 +00:00
perf: 完善key管理
This commit is contained in:
@@ -76,7 +76,7 @@ class KeysManager:
|
||||
# 经测算得出的理论与实际的偏差比例
|
||||
salt_rate = 0.93
|
||||
|
||||
self.usage[md5] += round(int((len(new_content.encode('utf-8')) - len(new_content)) / 2 + len(new_content))*salt_rate)
|
||||
self.usage[md5] += ( (len(new_content.encode('utf-8')) - len(new_content)) / 2 + len(new_content) )*salt_rate
|
||||
|
||||
self.usage[md5] = int(self.usage[md5])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user