Commit
·
913de56
1
Parent(s):
e2ff706
Error checking
Browse files
app.py
CHANGED
|
@@ -74,7 +74,10 @@ def bot(input_message: str, db_info="", temperature=0.1, top_p=0.9, top_k=0, rep
|
|
| 74 |
partial_text += new_text
|
| 75 |
|
| 76 |
# Split the text by "|", and get the last element in the list which should be the final query
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
try:
|
| 80 |
# Attempt to format SQL query using sqlparse
|
|
|
|
| 74 |
partial_text += new_text
|
| 75 |
|
| 76 |
# Split the text by "|", and get the last element in the list which should be the final query
|
| 77 |
+
try:
|
| 78 |
+
final_query = partial_text.split("|")[1].strip()
|
| 79 |
+
except Exception:
|
| 80 |
+
final_query = partial_text
|
| 81 |
|
| 82 |
try:
|
| 83 |
# Attempt to format SQL query using sqlparse
|