Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|