Update app.py
Browse files
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(
|