Spaces:
Runtime error
Runtime error
Commit ·
afc247c
1
Parent(s): 850a149
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,12 +86,12 @@ def respond(message, chatHistory):
|
|
| 86 |
# Function to save history of chat
|
| 87 |
def respondCoT(message, chatHistory):
|
| 88 |
"""gpt response handler for gradio ui"""
|
| 89 |
-
global
|
| 90 |
try:
|
| 91 |
-
if "modify" in message:
|
| 92 |
-
botMessage, prospectTablesAndCols = queryHelperCot.
|
| 93 |
else:
|
| 94 |
-
botMessage, prospectTablesAndCols = queryHelperCot.
|
| 95 |
except Exception as e:
|
| 96 |
errorMessage = {"function":"queryHelperFineTuned.getQueryForUserInput","error":str(e), "userInput":message}
|
| 97 |
saveLog(errorMessage, 'error')
|
|
|
|
| 86 |
# Function to save history of chat
|
| 87 |
def respondCoT(message, chatHistory):
|
| 88 |
"""gpt response handler for gradio ui"""
|
| 89 |
+
global queryHelperCot
|
| 90 |
try:
|
| 91 |
+
if "modify" in message[:12].lower():
|
| 92 |
+
botMessage, prospectTablesAndCols = queryHelperCot.getQueryForUserInput(message, chatHistory)
|
| 93 |
else:
|
| 94 |
+
botMessage, prospectTablesAndCols = queryHelperCot.getQueryForUserInputCoT(message, [])
|
| 95 |
except Exception as e:
|
| 96 |
errorMessage = {"function":"queryHelperFineTuned.getQueryForUserInput","error":str(e), "userInput":message}
|
| 97 |
saveLog(errorMessage, 'error')
|