fix: query memory

This commit is contained in:
Timothy J. Baek 2024-06-24 14:00:08 -07:00
parent d361404a60
commit 68b3cce0fd

View File

@ -529,8 +529,8 @@
});
if (res) {
if (res.documents[0].length > 0) {
userContext = res.documents.reduce((acc, doc, index) => {
const createdAtTimestamp = res.metadatas[index][0].created_at;
userContext = res.documents[0].reduce((acc, doc, index) => {
const createdAtTimestamp = res.metadatas[0][index].created_at;
const createdAtDate = new Date(createdAtTimestamp * 1000)
.toISOString()
.split('T')[0];