Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,11 @@ def get_response(system, context, raw = False):
|
|
35 |
statistics = f'This conversation Tokens usage【{response["usage"]["total_tokens"]} / 4096】 ( Question + above {response["usage"]["prompt_tokens"]},Answer {response["usage"]["completion_tokens"]} )'
|
36 |
message = response["choices"][0]["message"]["content"]
|
37 |
|
38 |
-
message_with_stats = f'{message}\n\n================\n\n
|
39 |
# message_with_stats = markdown.markdown(message_with_stats)
|
40 |
|
41 |
-
|
42 |
-
return message
|
43 |
|
44 |
def predict(chatbot, input_sentence, system, context):
|
45 |
if len(input_sentence) == 0:
|
|
|
35 |
statistics = f'This conversation Tokens usage【{response["usage"]["total_tokens"]} / 4096】 ( Question + above {response["usage"]["prompt_tokens"]},Answer {response["usage"]["completion_tokens"]} )'
|
36 |
message = response["choices"][0]["message"]["content"]
|
37 |
|
38 |
+
message_with_stats = f'{message}\n\n================\n\n'
|
39 |
# message_with_stats = markdown.markdown(message_with_stats)
|
40 |
|
41 |
+
return message, parse_text(message_with_stats)
|
42 |
+
#return message
|
43 |
|
44 |
def predict(chatbot, input_sentence, system, context):
|
45 |
if len(input_sentence) == 0:
|