Spaces:
Runtime error
Runtime error
Commit ·
36ea358
1
Parent(s): 3d2478f
bug fix
Browse files- queryHelperManagerCoT.py +1 -1
queryHelperManagerCoT.py
CHANGED
|
@@ -42,7 +42,7 @@ class QueryHelperChainOfThought:
|
|
| 42 |
self.gptInstanceForCoT.setSystemPrompt(prompt)
|
| 43 |
gptResponse = self.gptInstanceForCoT.getResponseForUserInput(userInput)
|
| 44 |
try:
|
| 45 |
-
txt =
|
| 46 |
sqlResult = json.loads(txt)['finalResult']
|
| 47 |
formattedSql = sqlparse.format(sqlResult, reindent=True)
|
| 48 |
print(formattedSql)
|
|
|
|
| 42 |
self.gptInstanceForCoT.setSystemPrompt(prompt)
|
| 43 |
gptResponse = self.gptInstanceForCoT.getResponseForUserInput(userInput)
|
| 44 |
try:
|
| 45 |
+
txt = gptResponse.split("```json")[-1].split('```')[0].replace('\n', '')
|
| 46 |
sqlResult = json.loads(txt)['finalResult']
|
| 47 |
formattedSql = sqlparse.format(sqlResult, reindent=True)
|
| 48 |
print(formattedSql)
|