Tuchuanhuhuhu commited on
Commit
51f18f8
·
1 Parent(s): dd740ac

minor: 平息了 API 使用情况获取失败的提示

Browse files
Files changed (1) hide show
  1. modules/models/models.py +2 -2
modules/models/models.py CHANGED
@@ -87,7 +87,7 @@ class OpenAIClient(BaseLLMModel):
87
  try:
88
  usage_data = self._get_billing_data(usage_url)
89
  except Exception as e:
90
- logging.error(f"获取API使用情况失败: " + str(e))
91
  if "Invalid authorization header" in str(e):
92
  return i18n("**获取API使用情况失败**,需在填写`config.json`中正确填写sensitive_id")
93
  elif "Incorrect API key provided: sess" in str(e):
@@ -182,7 +182,7 @@ class OpenAIClient(BaseLLMModel):
182
  "Content-Type": "application/json",
183
  "Authorization": f"Bearer {sensitive_id}",
184
  }
185
-
186
 
187
  def _get_billing_data(self, billing_url):
188
  with retrieve_proxy():
 
87
  try:
88
  usage_data = self._get_billing_data(usage_url)
89
  except Exception as e:
90
+ # logging.error(f"获取API使用情况失败: " + str(e))
91
  if "Invalid authorization header" in str(e):
92
  return i18n("**获取API使用情况失败**,需在填写`config.json`中正确填写sensitive_id")
93
  elif "Incorrect API key provided: sess" in str(e):
 
182
  "Content-Type": "application/json",
183
  "Authorization": f"Bearer {sensitive_id}",
184
  }
185
+
186
 
187
  def _get_billing_data(self, billing_url):
188
  with retrieve_proxy():