Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,9 +57,9 @@ def respond(
|
|
| 57 |
|
| 58 |
# 🔒 Force deterministic behavior
|
| 59 |
generation_kwargs = {
|
| 60 |
-
"max_tokens":
|
| 61 |
-
"temperature": 0.
|
| 62 |
-
"top_p": 0.
|
| 63 |
"stream": True,
|
| 64 |
}
|
| 65 |
|
|
@@ -80,9 +80,18 @@ def respond(
|
|
| 80 |
chatbot = gr.ChatInterface(
|
| 81 |
respond,
|
| 82 |
additional_inputs=[
|
| 83 |
-
gr.Textbox(
|
| 84 |
-
|
| 85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
],
|
| 87 |
)
|
| 88 |
|
|
|
|
| 57 |
|
| 58 |
# 🔒 Force deterministic behavior
|
| 59 |
generation_kwargs = {
|
| 60 |
+
"max_tokens": 1024,
|
| 61 |
+
"temperature": 0.15, # fixed LOW temperature
|
| 62 |
+
"top_p": 0.9,
|
| 63 |
"stream": True,
|
| 64 |
}
|
| 65 |
|
|
|
|
| 80 |
chatbot = gr.ChatInterface(
|
| 81 |
respond,
|
| 82 |
additional_inputs=[
|
| 83 |
+
gr.Textbox(
|
| 84 |
+
value=(
|
| 85 |
+
"You are a senior-level SQL debugging expert with deep mastery of PostgreSQL and Amazon Redshift. "
|
| 86 |
+
"You specialize in diagnosing complex query issues such as fan-out joins, incorrect aggregations, "
|
| 87 |
+
"CTE misusage, window function errors, and performance bottlenecks. "
|
| 88 |
+
"You always reason step-by-step, identify root causes, and propose production-safe fixes. "
|
| 89 |
+
"When relevant, you explain execution behavior in Redshift (distribution styles, sort keys, "
|
| 90 |
+
"query planning implications). You also provide optimized rewrites of queries and clearly "
|
| 91 |
+
"highlight the difference between the broken and fixed versions."
|
| 92 |
+
),
|
| 93 |
+
label="System message",
|
| 94 |
+
),
|
| 95 |
],
|
| 96 |
)
|
| 97 |
|