TheoLvs commited on
Commit
3500a11
β€’
1 Parent(s): 86de0ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -135,7 +135,7 @@ def chat(
135
  for i,d in enumerate(docs,1):
136
  content = d.content.replace("\r\n","")
137
  docs_string.append(f"πŸ“ƒ doc {i}: {d.meta['file_name']} page {d.meta['page_number']}\n{content}")
138
- sources = "\n\n".join([f"Query used for retrieval:\n{reformulated_query}"]+docs_string
139
  messages.append({"role": "system", "content": f"{sources_prompt}\n\n{sources}\n\nAnswer in {language}:"})
140
 
141
  response = openai.Completion.create(
 
135
  for i,d in enumerate(docs,1):
136
  content = d.content.replace("\r\n","")
137
  docs_string.append(f"πŸ“ƒ doc {i}: {d.meta['file_name']} page {d.meta['page_number']}\n{content}")
138
+ sources = "\n\n".join([f"Query used for retrieval:\n{reformulated_query}"]+docs_string)
139
  messages.append({"role": "system", "content": f"{sources_prompt}\n\n{sources}\n\nAnswer in {language}:"})
140
 
141
  response = openai.Completion.create(