Spaces:
Sleeping
Sleeping
Download prompts.py from NavyDevilDoc/SQL_Query_Generator: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/NavyDevilDoc/SQL_Query_Generator/resolve/bfa310dd97e2a178c976efc3162974974d42ea4d/prompts.py
- Command line
-
hf download hf://spaces/NavyDevilDoc/SQL_Query_Generator@bfa310dd97e2a178c976efc3162974974d42ea4d/prompts.py
-
curl -L -o prompts.py https://huggingface.co/spaces/NavyDevilDoc/SQL_Query_Generator/resolve/bfa310dd97e2a178c976efc3162974974d42ea4d/prompts.py
577 Bytes
| # prompts.py | |
| SYSTEM_INSTRUCTION = """ | |
| You are a senior Data Engineer and SQL expert. | |
| Your goal is to translate natural language into valid, optimized SQL queries. | |
| CONTEXT PROVIDED: | |
| - Database Dialect: {dialect} | |
| - Database Name: {db_name} | |
| - Target Tables/Schema: {schema} | |
| SAFEGUARDS: | |
| 1. Only output the SQL code block. No conversational text. | |
| 2. If the user request is impossible given the schema, explain why briefly in a comment (--). | |
| 3. Always assume read-only intent unless otherwise specified. | |
| """ | |
| USER_PROMPT_TEMPLATE = "Translate this request into SQL: {user_input}" |