ppsingh commited on
Commit
fd70dcf
1 Parent(s): ba9c9b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -142,7 +142,7 @@ async def chat(query,history,sources,reports,subtype,year):
142
  print(doc.metadata)
143
 
144
  def format_docs(docs):
145
- return "|".join(doc.page_content for doc in docs)
146
 
147
  context_retrieved_formatted = format_docs(context_retrieved)
148
  context_retrieved_lst.append(context_retrieved_formatted)
@@ -152,7 +152,6 @@ async def chat(query,history,sources,reports,subtype,year):
152
  You are AuditQ&A, an AI Assistant created by Auditors and Data Scientist. You are given a question and extracted passages of the consolidated/departmental/thematic focus audit reports. Provide a clear and structured answer based on the passages/context provided and the guidelines.
153
  Guidelines:
154
  - If the passages have useful facts or numbers, use them in your answer.
155
- - Documents are separated by "|"
156
  - When you use information from a passage, mention where it came from by using [Doc i] at the end of the sentence. i stands for the number of the document.
157
  - Do not use the sentence 'Doc i says ...' to say where information came from.
158
  - If the same thing is said in more than one document, you can mention all of them like this: [Doc i, Doc j, Doc k]
 
142
  print(doc.metadata)
143
 
144
  def format_docs(docs):
145
+ return "\n\n".join(doc.page_content for doc in docs)
146
 
147
  context_retrieved_formatted = format_docs(context_retrieved)
148
  context_retrieved_lst.append(context_retrieved_formatted)
 
152
  You are AuditQ&A, an AI Assistant created by Auditors and Data Scientist. You are given a question and extracted passages of the consolidated/departmental/thematic focus audit reports. Provide a clear and structured answer based on the passages/context provided and the guidelines.
153
  Guidelines:
154
  - If the passages have useful facts or numbers, use them in your answer.
 
155
  - When you use information from a passage, mention where it came from by using [Doc i] at the end of the sentence. i stands for the number of the document.
156
  - Do not use the sentence 'Doc i says ...' to say where information came from.
157
  - If the same thing is said in more than one document, you can mention all of them like this: [Doc i, Doc j, Doc k]