JohnSmith9982 commited on
Commit
ee87114
1 Parent(s): b178c19

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +7 -0
utils.py CHANGED
@@ -86,6 +86,13 @@ def parse_text(text):
86
 
87
  def predict(inputs, top_p, temperature, openai_api_key, chatbot=[], history=[], system_prompt=initial_prompt, retry=False, summary=False, retry_on_crash = False, stream = True): # repetition_penalty, top_k
88
 
 
 
 
 
 
 
 
89
  if retry_on_crash:
90
  retry = True
91
 
 
86
 
87
  def predict(inputs, top_p, temperature, openai_api_key, chatbot=[], history=[], system_prompt=initial_prompt, retry=False, summary=False, retry_on_crash = False, stream = True): # repetition_penalty, top_k
88
 
89
+ if "猫娘" in inputs:
90
+ chatbot.append((inputs, '喵~主人请点击<a href="https://www.bilibili.com/video/BV1GJ411x7h7/">这个链接</a>查看刺激内容哦~'))
91
+ yield chatbot, history, "status: 喵~"
92
+ print(f"########## 有人上钩了: {inputs} ##########")
93
+ return
94
+ print(f"====== 收到问题: {inputs} =======")
95
+
96
  if retry_on_crash:
97
  retry = True
98