yangtb24 commited on
Commit
5d0028a
·
verified ·
1 Parent(s): c59d1e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -27,11 +27,8 @@ MODELS_ENDPOINT = "https://api.deepseek.com/models"
27
  app = Flask(__name__)
28
 
29
  text_models = []
30
- free_text_models = []
31
 
32
  invalid_keys_global = []
33
- free_keys_global = []
34
- unverified_keys_global = []
35
  valid_keys_global = []
36
 
37
  executor = concurrent.futures.ThreadPoolExecutor(max_workers=1000)
@@ -81,7 +78,7 @@ def get_credit_summary(api_key):
81
  logging.error(f"获取美元兑人民币汇率失败,API Key:{api_key},错误信息:{e}")
82
  total_balance_cny += usd_balance * 7.2
83
 
84
- return {"total_balance_cny": round(total_balance_cny, 2)}
85
  except requests.exceptions.RequestException as e:
86
  logging.error(f"获取额度信息失败,API Key:{api_key},错误信息:{e}")
87
  return None
@@ -763,12 +760,9 @@ def handsome_chat_completions():
763
  return jsonify({"error": str(e)}), 500
764
 
765
  if __name__ == '__main__':
766
- import json
767
  logging.info(f"环境变量:{os.environ}")
768
 
769
  invalid_keys_global = []
770
- free_keys_global = []
771
- unverified_keys_global = []
772
  valid_keys_global = []
773
 
774
  load_keys()
 
27
  app = Flask(__name__)
28
 
29
  text_models = []
 
30
 
31
  invalid_keys_global = []
 
 
32
  valid_keys_global = []
33
 
34
  executor = concurrent.futures.ThreadPoolExecutor(max_workers=1000)
 
78
  logging.error(f"获取美元兑人民币汇率失败,API Key:{api_key},错误信息:{e}")
79
  total_balance_cny += usd_balance * 7.2
80
 
81
+ return {"total_balance": float(total_balance_cny)}
82
  except requests.exceptions.RequestException as e:
83
  logging.error(f"获取额度信息失败,API Key:{api_key},错误信息:{e}")
84
  return None
 
760
  return jsonify({"error": str(e)}), 500
761
 
762
  if __name__ == '__main__':
 
763
  logging.info(f"环境变量:{os.environ}")
764
 
765
  invalid_keys_global = []
 
 
766
  valid_keys_global = []
767
 
768
  load_keys()