pratikshahp
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,8 @@ def main_loop(message, history):
|
|
42 |
Main loop for the chatbot to handle user input.
|
43 |
"""
|
44 |
# Validate the user's input for safety
|
45 |
-
|
46 |
-
|
47 |
|
48 |
# Generate and validate the response
|
49 |
return run_action(message, history)
|
|
|
42 |
Main loop for the chatbot to handle user input.
|
43 |
"""
|
44 |
# Validate the user's input for safety
|
45 |
+
if not is_safe(message):
|
46 |
+
return "Your input violates our safety policy. Please try again with a finance-related query."
|
47 |
|
48 |
# Generate and validate the response
|
49 |
return run_action(message, history)
|