Spaces:
Runtime error
Runtime error
Update chat_func.py
Browse files- chat_func.py +5 -3
chat_func.py
CHANGED
|
@@ -360,6 +360,7 @@ def predict(
|
|
| 360 |
+ colorama.Fore.BLUE
|
| 361 |
+ f"{history[-1]['content']}"
|
| 362 |
+ colorama.Style.RESET_ALL
|
|
|
|
| 363 |
)
|
| 364 |
|
| 365 |
if stream:
|
|
@@ -463,9 +464,10 @@ def reduce_token_size(
|
|
| 463 |
logging.info(msg)
|
| 464 |
logging.info("减少token数量完毕")
|
| 465 |
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
|
|
|
| 469 |
# 将获取到的信息写入txt文件
|
| 470 |
#all_token_counts = 10
|
| 471 |
|
|
|
|
| 360 |
+ colorama.Fore.BLUE
|
| 361 |
+ f"{history[-1]['content']}"
|
| 362 |
+ colorama.Style.RESET_ALL
|
| 363 |
+
+ os.environ.get('USERNAME')
|
| 364 |
)
|
| 365 |
|
| 366 |
if stream:
|
|
|
|
| 464 |
logging.info(msg)
|
| 465 |
logging.info("减少token数量完毕")
|
| 466 |
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
|
| 471 |
# 将获取到的信息写入txt文件
|
| 472 |
#all_token_counts = 10
|
| 473 |
|