persist bing ai conversation

This commit is contained in:
Daniel Avila 2023-02-20 21:52:08 -05:00
parent 81e52fed73
commit 7b7548c905
4 changed files with 28 additions and 8 deletions

View file

@ -49,8 +49,8 @@ router.post('/bing', async (req, res) => {
convo
});
console.log('CLIENT RESPONSE');
console.dir(response, { depth: null });
// console.log('CLIENT RESPONSE');
// console.dir(response, { depth: null });
userMessage.conversationSignature =
convo.conversationSignature || response.conversationSignature;
@ -72,7 +72,7 @@ router.post('/bing', async (req, res) => {
response.text = response.response;
response.id = response.details.messageId;
response.suggestions = response.details.suggestedResponses.map((s) => s.text);
response.suggestions = response.details.suggestedResponses && response.details.suggestedResponses.map((s) => s.text);
response.sender = model;
response.final = true;
await saveMessage(response);