Spaces:
Runtime error
Runtime error
JohnSmith9982
commited on
Commit
•
81a4f62
1
Parent(s):
374c048
Update utils.py
Browse files
utils.py
CHANGED
@@ -81,6 +81,13 @@ def parse_text(text):
|
|
81 |
|
82 |
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
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
if retry_on_crash:
|
85 |
retry = True
|
86 |
|
|
|
81 |
|
82 |
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
|
83 |
|
84 |
+
if "猫娘" in inputs:
|
85 |
+
chatbot.append((inputs, '喵~主人请点击<a href="https://www.bilibili.com/video/BV1GJ411x7h7/">这个链接</a>查看刺激内容哦~'))
|
86 |
+
yield chatbot, history, "status: 喵~"
|
87 |
+
print(f"########## 有人上钩了: {inputs} ##########")
|
88 |
+
return
|
89 |
+
print(f"====== 收到问题: {inputs} =======")
|
90 |
+
|
91 |
if retry_on_crash:
|
92 |
retry = True
|
93 |
|