ShiwenNi commited on
Commit
f7181fa
1 Parent(s): 2d19928

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -69,6 +69,7 @@ class Response:
69
  result = ''
70
  for choice in response.choices:
71
  result += choice.message.content
 
72
  except Exception as e:
73
  # 处理其他的异常
74
  result = "非常抱歉>_<,生了一个错误:"+ str(e)
 
69
  result = ''
70
  for choice in response.choices:
71
  result += choice.message.content
72
+ usage = response.usage.total_tokens
73
  except Exception as e:
74
  # 处理其他的异常
75
  result = "非常抱歉>_<,生了一个错误:"+ str(e)