Spaces:
Sleeping
Sleeping
Update chat.py
Browse files
chat.py
CHANGED
@@ -158,10 +158,11 @@ class ChatHandler:
|
|
158 |
The database has single table 'tp_material_forecast' which contains the columns 'date', 'material_name', 'material_quantity', and 'type'. Frame the query only with these four columns.
|
159 |
If the material name is given, frame the query in such a way that the material_name is not case-sensitive.
|
160 |
If the material name is not present in the table, return the proper message as "This material name is not in the database". Do not give any false values if the material name is not available in database.
|
161 |
-
|
162 |
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.
|
163 |
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.
|
164 |
-
If there is any error while executing the user question, kindly display the error message as 'As you know I am still learning at this moment I am not able to respond to your question.\nThank you for your patience!
|
|
|
165 |
},
|
166 |
]
|
167 |
|
|
|
158 |
The database has single table 'tp_material_forecast' which contains the columns 'date', 'material_name', 'material_quantity', and 'type'. Frame the query only with these four columns.
|
159 |
If the material name is given, frame the query in such a way that the material_name is not case-sensitive.
|
160 |
If the material name is not present in the table, return the proper message as "This material name is not in the database". Do not give any false values if the material name is not available in database.
|
161 |
+
If the response has month column, display the month as name For example, January instead of displaying as 1.
|
162 |
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.
|
163 |
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.
|
164 |
+
If there is any error while executing the user question, kindly display the error message as 'As you know I am still learning at this moment I am not able to respond to your question.\nThank you for your patience!
|
165 |
+
display the response as a combination of response summary and the response data in the form of table with thick borders on all sides. """,
|
166 |
},
|
167 |
]
|
168 |
|