Spaces:
Sleeping
Sleeping
Update chatbot-gradio.py
Browse files- chatbot-gradio.py +2 -2
chatbot-gradio.py
CHANGED
|
@@ -64,7 +64,7 @@ class NL2SQLPlugin:
|
|
| 64 |
chat_history.add_user_message(f"""Convert to Cosmos DB SQL: {question}
|
| 65 |
Collection: converters (alias 'c')
|
| 66 |
Fields:
|
| 67 |
-
- c.type (e.g., '350mA') - for queries related to current (mA) always refer to c.type
|
| 68 |
- c.artnr (numeric (int) article number e.g., 930546)
|
| 69 |
- c.output_voltage_v: dictionary with min/max values for output voltage
|
| 70 |
- c.output_voltage_v.min (e.g., 15)
|
|
@@ -130,7 +130,7 @@ class NL2SQLPlugin:
|
|
| 130 |
}}
|
| 131 |
SQL Guidelines (if needed):
|
| 132 |
- Always use SELECT * and never individual fields
|
| 133 |
-
- When current like 350mA is detected, always query the c.type field
|
| 134 |
- Always refer to fields in SELECT or WHERE clause using c.<field_name>
|
| 135 |
- For exact matches use: WHERE c.[field] = value
|
| 136 |
- For ranges use: WHERE c.[field].min = X AND c.[field].max = Y
|
|
|
|
| 64 |
chat_history.add_user_message(f"""Convert to Cosmos DB SQL: {question}
|
| 65 |
Collection: converters (alias 'c')
|
| 66 |
Fields:
|
| 67 |
+
- c.type (e.g., '350mA') - for queries related to current (mA) always refer to c.type NEVER c.current
|
| 68 |
- c.artnr (numeric (int) article number e.g., 930546)
|
| 69 |
- c.output_voltage_v: dictionary with min/max values for output voltage
|
| 70 |
- c.output_voltage_v.min (e.g., 15)
|
|
|
|
| 130 |
}}
|
| 131 |
SQL Guidelines (if needed):
|
| 132 |
- Always use SELECT * and never individual fields
|
| 133 |
+
- When current like 350mA is detected, always query the c.type field. c.current is NOT A FIELD.
|
| 134 |
- Always refer to fields in SELECT or WHERE clause using c.<field_name>
|
| 135 |
- For exact matches use: WHERE c.[field] = value
|
| 136 |
- For ranges use: WHERE c.[field].min = X AND c.[field].max = Y
|