addeed chathistory functionality

This commit is contained in:
Dhravya 2024-06-22 17:43:16 -05:00
parent 074ea24565
commit a2f8a27e77
15 changed files with 523 additions and 119 deletions

View file

@ -1,9 +1,5 @@
import { type NextRequest } from "next/server";
import {
ChatHistory,
ChatHistoryZod,
convertChatHistoryList,
} from "@repo/shared-types";
import { ChatHistoryZod, convertChatHistoryList } from "@repo/shared-types";
import { ensureAuth } from "../ensureAuth";
import { z } from "zod";
@ -49,6 +45,8 @@ export async function POST(req: NextRequest) {
);
}
console.log("validated.data.chatHistory", validated.data.chatHistory);
const modelCompatible = await convertChatHistoryList(
validated.data.chatHistory,
);