Created
May 18, 2024 17:48
-
-
Save christopherbauer/fd49fe5be859e59d162d82cd7608f524 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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