Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,9 @@ def generate_sql(user_input):
|
|
| 52 |
if not user_input.strip():
|
| 53 |
return "Enter SQL question."
|
| 54 |
|
| 55 |
-
#
|
| 56 |
if not is_sql_related(user_input):
|
| 57 |
-
return "
|
| 58 |
|
| 59 |
prompt = f"""
|
| 60 |
{SYSTEM_PROMPT}
|
|
|
|
| 52 |
if not user_input.strip():
|
| 53 |
return "Enter SQL question."
|
| 54 |
|
| 55 |
+
# HARD GUARD
|
| 56 |
if not is_sql_related(user_input):
|
| 57 |
+
return "I only respond to SQL and database related questions. If you want, I can craft helpful database queries for you."
|
| 58 |
|
| 59 |
prompt = f"""
|
| 60 |
{SYSTEM_PROMPT}
|