mirror of
https://github.com/father-bot/chatgpt_telegram_bot.git
synced 2026-06-13 03:54:57 +03:00
fix argument of type 'float' is not iterable (#211)
* fix argument of type 'float' is not iterable fix "argument of type 'float' is not iterable" in show_balance_handle and message_handle * Update bot.py
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@ async def register_user_if_not_exists(update: Update, context: CallbackContext,
|
||||
|
||||
# back compatibility for n_used_tokens field
|
||||
n_used_tokens = db.get_user_attribute(user.id, "n_used_tokens")
|
||||
if isinstance(n_used_tokens, int): # old format
|
||||
if isinstance(n_used_tokens, int) or isinstance(n_used_tokens, float): # old format
|
||||
new_n_used_tokens = {
|
||||
"gpt-3.5-turbo": {
|
||||
"n_input_tokens": 0,
|
||||
|
||||
Reference in New Issue
Block a user