feat: implement copy message

This commit is contained in:
shadcn 2023-06-13 23:58:59 +04:00
parent 320db5daeb
commit 8255f2d547
5 changed files with 86 additions and 40 deletions

View file

@ -20,7 +20,6 @@ if (!process.env.OPENAI_API_KEY) {
export const POST = auth(async function POST(req: Request) {
const json = await req.json()
// @ts-ignore
console.log(req.auth) // todo fix types
const messages = json.messages.map((m: any) => ({
content: m.content,
role: m.role