Spaces:
Sleeping
Sleeping
Update chat.py
Browse files
chat.py
CHANGED
@@ -154,7 +154,7 @@ class ChatHandler:
|
|
154 |
"name": "Database Schema",
|
155 |
"function": lambda q: self._load_schema_from_database(q),
|
156 |
"description": """Search within the database schema and generate SQL-based responses.
|
157 |
-
The database has single table 'tp_material_forecast' which contains the columns 'date', 'material_name', 'material_quantity', and 'type'. If the material name is given, frame the query in such a way that the material_name is not case-sensitive.
|
158 |
display the response as a combination of response summary and the response data in the form of table. If the response has month column, display the month as name For example, January instead of displaying as 1.
|
159 |
If the user requested comparison between two or more years or the user asks for the data for all years, data should be shown for all the years with month as first column and the years like 2020, 2021 etc as the adjacent columns. Do not show everything in the same column. (For example, if the user requested from 2020 to 2024, then display the output table with the columns [Month, Material value in 2020, Material value in 2020, Material value in 2021, Material value in 2022, Material value in 2023, Material value in 2024]) so that the records will be displayed for all the months from Jaunary to December across the years.
|
160 |
include the table data in the Final answer.""",
|
|
|
154 |
"name": "Database Schema",
|
155 |
"function": lambda q: self._load_schema_from_database(q),
|
156 |
"description": """Search within the database schema and generate SQL-based responses.
|
157 |
+
The database has single table 'tp_material_forecast' which contains the columns 'date', 'material_name', 'material_quantity', and 'type'. If the material name is given, frame the query in such a way that the material_name is not case-sensitive. If the material name is not present in the table, return the proper message as "This material name is not in the database".
|
158 |
display the response as a combination of response summary and the response data in the form of table. If the response has month column, display the month as name For example, January instead of displaying as 1.
|
159 |
If the user requested comparison between two or more years or the user asks for the data for all years, data should be shown for all the years with month as first column and the years like 2020, 2021 etc as the adjacent columns. Do not show everything in the same column. (For example, if the user requested from 2020 to 2024, then display the output table with the columns [Month, Material value in 2020, Material value in 2020, Material value in 2021, Material value in 2022, Material value in 2023, Material value in 2024]) so that the records will be displayed for all the months from Jaunary to December across the years.
|
160 |
include the table data in the Final answer.""",
|