Spaces:
Sleeping
Sleeping
Update src/llamaindex_backend.py
Browse files
src/llamaindex_backend.py
CHANGED
@@ -17,7 +17,7 @@ Reply as faifhfully as possible and in no more than 5 complete sentences unless
|
|
17 |
|
18 |
<chat history>
|
19 |
{context_history}
|
20 |
-
|
21 |
|
22 |
<context>
|
23 |
{context_from_index}
|
@@ -63,7 +63,7 @@ class GLlamaIndex():
|
|
63 |
result = await self.index.retrieve_context(query)
|
64 |
return result["result"]
|
65 |
|
66 |
-
extended_query = f"
|
67 |
results = await self.index.aretrieve_context_multi(
|
68 |
[query, extended_query]
|
69 |
)
|
|
|
17 |
|
18 |
<chat history>
|
19 |
{context_history}
|
20 |
+
</chat history>
|
21 |
|
22 |
<context>
|
23 |
{context_from_index}
|
|
|
63 |
result = await self.index.retrieve_context(query)
|
64 |
return result["result"]
|
65 |
|
66 |
+
extended_query = f"<chat history>]\n{history[:-1]}\n</chat history><new query>\n{query}\n</new query>"
|
67 |
results = await self.index.aretrieve_context_multi(
|
68 |
[query, extended_query]
|
69 |
)
|