Spaces:
Runtime error
Runtime error
path update
Browse files- queryHelperManagerCoT.py +3 -3
queryHelperManagerCoT.py
CHANGED
|
@@ -104,7 +104,7 @@ class QueryHelperChainOfThought:
|
|
| 104 |
def getPromptForCot(self):
|
| 105 |
schemaName = self.schemaName
|
| 106 |
platform = self.platform
|
| 107 |
-
tableSummaryDict = json.load(open(
|
| 108 |
selectedTablesAndCols = self.metadataLayout.getSelectedTablesAndCols()
|
| 109 |
|
| 110 |
egUserInput = "I want to get top 5 product categories by state, then rank categories on decreasing order of total sales"
|
|
@@ -216,7 +216,7 @@ ORDER BY state, category_rank"
|
|
| 216 |
def getSystemPromptForTableCols(self):
|
| 217 |
schemaName = self.schemaName
|
| 218 |
platform = self.platform
|
| 219 |
-
tableSummaryDict = json.load(open(
|
| 220 |
selectedTablesAndCols = self.metadataLayout.getSelectedTablesAndCols()
|
| 221 |
|
| 222 |
promptTableInfo = f"""You are a powerful text to sql model. Answer which tables and columns are needed
|
|
@@ -233,7 +233,7 @@ ORDER BY state, category_rank"
|
|
| 233 |
def getSystemPromptForQuery(self, prospectTablesAndCols):
|
| 234 |
schemaName = self.schemaName
|
| 235 |
platform = self.platform
|
| 236 |
-
tableSummaryDict = json.load(open(
|
| 237 |
exampleQuery = """SELECT a.customer_id, COUNT(a.product_id) as chandelier_count
|
| 238 |
FROM lpdatamart.tbl_f_sales a
|
| 239 |
JOIN lpdatamart.tbl_d_product b ON a.product_id = b.product_id
|
|
|
|
| 104 |
def getPromptForCot(self):
|
| 105 |
schemaName = self.schemaName
|
| 106 |
platform = self.platform
|
| 107 |
+
tableSummaryDict = json.load(open(self.tableSummaryJson, 'r'))
|
| 108 |
selectedTablesAndCols = self.metadataLayout.getSelectedTablesAndCols()
|
| 109 |
|
| 110 |
egUserInput = "I want to get top 5 product categories by state, then rank categories on decreasing order of total sales"
|
|
|
|
| 216 |
def getSystemPromptForTableCols(self):
|
| 217 |
schemaName = self.schemaName
|
| 218 |
platform = self.platform
|
| 219 |
+
tableSummaryDict = json.load(open(self.tableSummaryJson, 'r'))
|
| 220 |
selectedTablesAndCols = self.metadataLayout.getSelectedTablesAndCols()
|
| 221 |
|
| 222 |
promptTableInfo = f"""You are a powerful text to sql model. Answer which tables and columns are needed
|
|
|
|
| 233 |
def getSystemPromptForQuery(self, prospectTablesAndCols):
|
| 234 |
schemaName = self.schemaName
|
| 235 |
platform = self.platform
|
| 236 |
+
tableSummaryDict = json.load(open(self.tableSummaryJson,'r'))
|
| 237 |
exampleQuery = """SELECT a.customer_id, COUNT(a.product_id) as chandelier_count
|
| 238 |
FROM lpdatamart.tbl_f_sales a
|
| 239 |
JOIN lpdatamart.tbl_d_product b ON a.product_id = b.product_id
|