Add application file
Browse files
app.py
CHANGED
@@ -41,11 +41,11 @@ class Datas(Resource):
|
|
41 |
# old_prompt + new_input
|
42 |
total_consumed = 561 + return_output
|
43 |
return {'status': '1', 'token_legth': return_output,
|
44 |
-
'
|
45 |
'remaining_tokens': 4000 - total_consumed}
|
46 |
|
47 |
except Exception as e:
|
48 |
-
return {'status': '-1'}
|
49 |
|
50 |
|
51 |
api.add_resource(Status, '/')
|
|
|
41 |
# old_prompt + new_input
|
42 |
total_consumed = 561 + return_output
|
43 |
return {'status': '1', 'token_legth': return_output,
|
44 |
+
'char_length': len(prompt_),
|
45 |
'remaining_tokens': 4000 - total_consumed}
|
46 |
|
47 |
except Exception as e:
|
48 |
+
return {'status': '-1', 'e': e}
|
49 |
|
50 |
|
51 |
api.add_resource(Status, '/')
|