Skip to content

Instantly share code, notes, and snippets.

@christopherbauer
Created May 18, 2024 17:48
Show Gist options
  • Save christopherbauer/fd49fe5be859e59d162d82cd7608f524 to your computer and use it in GitHub Desktop.
Save christopherbauer/fd49fe5be859e59d162d82cd7608f524 to your computer and use it in GitHub Desktop.
.post(async (req, res) => {
//start a new conversation
const { id } = req.params;
const { persona, message } = req.body;
const response = await inMemoryDB.createConversation(id, persona, {
text: message,
sent: new Date(),
source: "user",
});
res.status(200).send(response);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment