mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
bcd5783752
commit
dca7ce9420
1 changed files with 4 additions and 3 deletions
|
|
@ -56,9 +56,9 @@
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
source.document.forEach((document, index) => {
|
source?.document?.forEach((document, index) => {
|
||||||
const metadata = source.metadata?.[index];
|
const metadata = source?.metadata?.[index];
|
||||||
const distance = source.distances?.[index];
|
const distance = source?.distances?.[index];
|
||||||
|
|
||||||
// Within the same citation there could be multiple documents
|
// Within the same citation there could be multiple documents
|
||||||
const id = metadata?.source ?? source?.source?.id ?? 'N/A';
|
const id = metadata?.source ?? source?.source?.id ?? 'N/A';
|
||||||
|
|
@ -88,6 +88,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
console.log('citations', citations);
|
console.log('citations', citations);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue