[Improvement] return all the metadata when citations flag is True (#1059)

Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
Deven Patel
2023-12-29 14:48:41 +05:30
committed by GitHub
parent d9d529987e
commit 19d80914df
15 changed files with 47 additions and 56 deletions

View File

@@ -237,13 +237,7 @@ class Pipeline(EmbedChain):
)
result = []
for c in context:
result.append(
{
"context": c[0],
"source": c[1],
"document_id": c[2],
}
)
result.append({"context": c[0], "metadata": c[1]})
return result
else:
# Make API call to the backend to get the results