lakshmivairamani commited on
Commit
40b6522
1 Parent(s): 0e17364

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -151,20 +151,20 @@ tools = [
151
 
152
  Tool(name="ASNData", func=get_ASN_data, description="Tool to get the status of ASN with ASN id given as input. Handles questions related to ASN id which starts with ASN followed by 11 numeric digits. For example, ASN24070100015 ", tool_choice="required"),
153
  Tool(name="DocumentData", func=document_data_tool, description="Tool to search and retrieve information from the uploaded document. Provide responses with the maximum of 150 words.", tool_choice="required"),
154
- #Tool(name="DatabaseQuery", func=database_tool, description="Tool to query the database based on the user's question. Only handles questions related to the collegedb schema, including tables such as buildings, classrooms, college, course, faculty, interns, person, section, student, and textbook. Ensure to use only the available fields in these tables.Provide responses with the maximum of 150 words.", tool_choice="required"),
155
  ]
156
 
157
  prompt_template = f"""You are an assistant that helps with database queries, weather information, and document retrieval.
158
 
159
  For ASN-related questions, if the user specifies ASN id. Provide the information like ASN status, expected Receiving Date etc.
160
  For document-related questions, search and retrieve information from the uploaded document.
161
-
162
  {{agent_scratchpad}}
163
  Question: {{input}}
164
 
165
  """
166
  #{{memory.buffer}}
167
- #For SQL database-related questions, only use the fields available in the collegedb schema, which includes tables such as buildings, classrooms, college, course, faculty, interns, person, section, student, and textbook.
168
  prompt = ChatPromptTemplate.from_template(prompt_template)
169
 
170
  # Initialize the agent with memory
 
151
 
152
  Tool(name="ASNData", func=get_ASN_data, description="Tool to get the status of ASN with ASN id given as input. Handles questions related to ASN id which starts with ASN followed by 11 numeric digits. For example, ASN24070100015 ", tool_choice="required"),
153
  Tool(name="DocumentData", func=document_data_tool, description="Tool to search and retrieve information from the uploaded document. Provide responses with the maximum of 150 words.", tool_choice="required"),
154
+ Tool(name="DatabaseQuery", func=database_tool, description="Tool to query the database based on the user's question. Only handles questions related to the collegedb schema, including tables such as buildings, classrooms, college, course, faculty, interns, person, section, student, and textbook. Ensure to use only the available fields in these tables.Provide responses with the maximum of 150 words.", tool_choice="required"),
155
  ]
156
 
157
  prompt_template = f"""You are an assistant that helps with database queries, weather information, and document retrieval.
158
 
159
  For ASN-related questions, if the user specifies ASN id. Provide the information like ASN status, expected Receiving Date etc.
160
  For document-related questions, search and retrieve information from the uploaded document.
161
+ For SQL database-related questions, only use the fields available in the collegedb schema, which includes tables such as buildings, classrooms, college, course, faculty, interns, person, section, student, and textbook.
162
  {{agent_scratchpad}}
163
  Question: {{input}}
164
 
165
  """
166
  #{{memory.buffer}}
167
+
168
  prompt = ChatPromptTemplate.from_template(prompt_template)
169
 
170
  # Initialize the agent with memory