Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3895,11 +3895,12 @@ def respond(message, history, max_tokens, temperature, top_p):
|
|
3895 |
):
|
3896 |
token = message.choices[0].delta.content
|
3897 |
response += token
|
3898 |
-
|
3899 |
-
response = random.choice(alternative_responses)
|
3900 |
-
|
3901 |
-
yield response
|
3902 |
|
|
|
|
|
|
|
|
|
3903 |
|
3904 |
css = """
|
3905 |
/* Import Caveat font from Google Fonts */
|
|
|
3895 |
):
|
3896 |
token = message.choices[0].delta.content
|
3897 |
response += token
|
3898 |
+
yield response
|
|
|
|
|
|
|
3899 |
|
3900 |
+
if any(phrase in response for phrase in ["I cannot", "I can't", "I won't", "I'm not going to engage in this conversation"]):
|
3901 |
+
response = random.choice(alternative_responses)
|
3902 |
+
|
3903 |
+
yield response
|
3904 |
|
3905 |
css = """
|
3906 |
/* Import Caveat font from Google Fonts */
|