Spaces:
Running
Running
Commit
·
bc7b01d
1
Parent(s):
78eeae8
Update prompt 1000
Browse files
main.py
CHANGED
@@ -253,7 +253,6 @@ class HealthcareChatbot:
|
|
253 |
|
254 |
**STEP 5: Parameter Extraction (only if API_ACTION)**
|
255 |
- Extract parameter values from user query
|
256 |
-
- Translate the parameters value to English.
|
257 |
- Use the CALCULATED dates/times from Step 2
|
258 |
- Convert all dates/times to ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
|
259 |
- List any missing required parameters
|
@@ -277,6 +276,11 @@ class HealthcareChatbot:
|
|
277 |
4. Double-check weekday numbers: Sunday=0, Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6
|
278 |
|
279 |
Now analyze the user query step by step and give me the JSON response.
|
|
|
|
|
|
|
|
|
|
|
280 |
""",
|
281 |
input_variables=["user_query", "detected_language", "extracted_keywords",
|
282 |
"sentiment_analysis", "endpoints_documentation", "current_datetime",
|
|
|
253 |
|
254 |
**STEP 5: Parameter Extraction (only if API_ACTION)**
|
255 |
- Extract parameter values from user query
|
|
|
256 |
- Use the CALCULATED dates/times from Step 2
|
257 |
- Convert all dates/times to ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
|
258 |
- List any missing required parameters
|
|
|
276 |
4. Double-check weekday numbers: Sunday=0, Monday=1, Tuesday=2, Wednesday=3, Thursday=4, Friday=5, Saturday=6
|
277 |
|
278 |
Now analyze the user query step by step and give me the JSON response.
|
279 |
+
|
280 |
+
**FINAL CHECK BEFORE OUTPUTTING:**
|
281 |
+
- Scan your params object for ANY Arabic characters
|
282 |
+
- If you find Arabic text, STOP and translate it to English
|
283 |
+
- Only output the JSON when params contains ZERO Arabic characters
|
284 |
""",
|
285 |
input_variables=["user_query", "detected_language", "extracted_keywords",
|
286 |
"sentiment_analysis", "endpoints_documentation", "current_datetime",
|