Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1045,7 +1045,7 @@ def generate_prompt_from_excel_file(df_dict):
|
|
1045 |
prompt += f"""Output : {docstatus}. Here is the sample table:
|
1046 |
{sample_table}.
|
1047 |
"""
|
1048 |
-
prompt += f"- Query: A natural language question (e.g., Give me details of sarah webb).
|
1049 |
prompt += f"""Output : {docstatus}. Here is the sample table:
|
1050 |
{sample_table}.
|
1051 |
"""
|
@@ -1053,7 +1053,7 @@ def generate_prompt_from_excel_file(df_dict):
|
|
1053 |
prompt += f"- Query: A natural language question with request to create LOA document (e.g., can you create LOA document for all the employees with broker name XXXX). The question should be sent as 'What are the employee details with broker name XXXX : LOA document'."
|
1054 |
prompt += f"""Output: {docstatus}. Here is the sample table:
|
1055 |
{sample_table}.
|
1056 |
-
If there is any error, please display the message returned by the function as response.
|
1057 |
|
1058 |
|
1059 |
return "Excel data", prompt
|
@@ -1090,7 +1090,8 @@ def add_to_redmindgpt(title, summary):
|
|
1090 |
# Add the new tool to the beginning
|
1091 |
tools.insert(0, run_time_tool)
|
1092 |
|
1093 |
-
prompt_template = f"""You are an assistant that helps with document retrieval, excel analysis, visual analysis. Your job is to provide clear, complete, and detailed responses to the following queries. Please give the output response in an user friendly way and remove "**" from the response. For example, document related queries can be answered in a clear and concise way with numbering and not as a paragraph.
|
|
|
1094 |
{run_time_tool_summary}
|
1095 |
For datavisualization, user will ask for inventory report of a particular warehouse. Your job is to return the image path to chat interface and display the image as output.
|
1096 |
|
@@ -1117,6 +1118,7 @@ def add_to_redmindgpt(title, summary):
|
|
1117 |
tools.insert(0, run_time_excel_tool)
|
1118 |
|
1119 |
prompt_template = f"""You are an assistant that helps with document retrieval, excel analysis, visual analysis. Your job is to provide clear, complete, and detailed responses to the following queries. Please give the output response in an user friendly way and remove "**" from the response. For example, document related queries can be answered in a clear and concise way with numbering and not as a paragraph.
|
|
|
1120 |
{run_time_excel_tool_summary}
|
1121 |
For datavisualization, user will ask for inventory report of a particular warehouse. Your job is to return the image path to chat interface and display the image as output.
|
1122 |
|
|
|
1045 |
prompt += f"""Output : {docstatus}. Here is the sample table:
|
1046 |
{sample_table}.
|
1047 |
"""
|
1048 |
+
prompt += f"- Query: A natural language question (e.g., Give me details of sarah webb). give me the employee details which contains sarah webb in any of the columns'"
|
1049 |
prompt += f"""Output : {docstatus}. Here is the sample table:
|
1050 |
{sample_table}.
|
1051 |
"""
|
|
|
1053 |
prompt += f"- Query: A natural language question with request to create LOA document (e.g., can you create LOA document for all the employees with broker name XXXX). The question should be sent as 'What are the employee details with broker name XXXX : LOA document'."
|
1054 |
prompt += f"""Output: {docstatus}. Here is the sample table:
|
1055 |
{sample_table}.
|
1056 |
+
If there is any error, please display the message returned by the function as response. """
|
1057 |
|
1058 |
|
1059 |
return "Excel data", prompt
|
|
|
1090 |
# Add the new tool to the beginning
|
1091 |
tools.insert(0, run_time_tool)
|
1092 |
|
1093 |
+
prompt_template = f"""You are an assistant that helps with document retrieval, excel analysis, visual analysis. Your job is to provide clear, complete, and detailed responses to the following queries. Please give the output response in an user friendly way and remove "**" from the response. For example, document related queries can be answered in a clear and concise way with numbering and not as a paragraph.
|
1094 |
+
If the user asks about the document upload, check whether the excel or pdf is added, and give a brief summary about the document.
|
1095 |
{run_time_tool_summary}
|
1096 |
For datavisualization, user will ask for inventory report of a particular warehouse. Your job is to return the image path to chat interface and display the image as output.
|
1097 |
|
|
|
1118 |
tools.insert(0, run_time_excel_tool)
|
1119 |
|
1120 |
prompt_template = f"""You are an assistant that helps with document retrieval, excel analysis, visual analysis. Your job is to provide clear, complete, and detailed responses to the following queries. Please give the output response in an user friendly way and remove "**" from the response. For example, document related queries can be answered in a clear and concise way with numbering and not as a paragraph.
|
1121 |
+
If the user asks about the document upload, check whether the excel or pdf is added, and give a brief summary about the document.
|
1122 |
{run_time_excel_tool_summary}
|
1123 |
For datavisualization, user will ask for inventory report of a particular warehouse. Your job is to return the image path to chat interface and display the image as output.
|
1124 |
|