Thanks.
_id: 61f06a83afbf51c80b9a9b4b
project_id: "sorteringshatt-dgwo"
name: "2022-01-25 22:23:41.315399"
inputContexts: Array
originalRequestSource: "SORTERINGSHATT_MAI"
v2Response: Object
responseTime: "2022-01-25 22:24:19.697221"
logType: "TESTING"
updated: false
__v: 0
where name is current conversation start, so next document will have the same name if a user talked to chatbot more.
It looks like this now, so i get ALOT of returns, then i start checking for if(i and i+1) is the same and do logic on the server…
const history = await History
.find({ project_id: project_id })
.find({ updated: false })
.sort({ responseTime: 1 });