JohnSmith9982 commited on
Commit
6e4ef35
1 Parent(s): eb029ca

Update modules/chat_func.py

Browse files
Files changed (1) hide show
  1. modules/chat_func.py +4 -0
modules/chat_func.py CHANGED
@@ -271,6 +271,10 @@ def predict(
271
  should_check_token_count=True,
272
  ): # repetition_penalty, top_k
273
  logging.info("输入为:" + colorama.Fore.BLUE + f"{inputs}" + colorama.Style.RESET_ALL)
 
 
 
 
274
  if should_check_token_count:
275
  yield chatbot+[(inputs, "")], history, "开始生成回答……", all_token_counts
276
  if reply_language == "跟随问题语言(不稳定)":
 
271
  should_check_token_count=True,
272
  ): # repetition_penalty, top_k
273
  logging.info("输入为:" + colorama.Fore.BLUE + f"{inputs}" + colorama.Style.RESET_ALL)
274
+ if "我是来浪费的" in inputs:
275
+ print("有人来浪费了")
276
+ yield chatbot+[(inputs, "🖕️🖕️🖕️🖕️🖕️看不起你")], history, "🖕️🖕️🖕️🖕️🖕️🖕️", all_token_counts
277
+ return
278
  if should_check_token_count:
279
  yield chatbot+[(inputs, "")], history, "开始生成回答……", all_token_counts
280
  if reply_language == "跟随问题语言(不稳定)":