refac: inline citations

This commit is contained in:
Timothy Jaeryang Baek
2024-11-21 18:26:38 -08:00
parent 714ed248fb
commit 7062e637e8
3 changed files with 24 additions and 6 deletions

View File

@@ -43,6 +43,10 @@
$: {
_citations = citations.reduce((acc, citation) => {
if (Object.keys(citation).length === 0) {
return acc;
}
citation.document.forEach((document, index) => {
const metadata = citation.metadata?.[index];
const distance = citation.distances?.[index];