Cleanup unused stuff
This commit is contained in:
parent
01527d450b
commit
9f4ef62961
9 changed files with 13 additions and 558 deletions
|
|
@ -1,10 +1,20 @@
|
|||
import { auth } from "@/auth";
|
||||
import { chats, db } from "@/lib/db/schema";
|
||||
import { openai } from "@/lib/openai";
|
||||
import { OpenAIStream, StreamingTextResponse } from "ai-connector";
|
||||
import { Configuration, OpenAIApi } from "openai-edge";
|
||||
|
||||
export const runtime = "edge";
|
||||
|
||||
const configuration = new Configuration({
|
||||
apiKey: process.env.OPENAI_API_KEY,
|
||||
});
|
||||
|
||||
const openai = new OpenAIApi(configuration);
|
||||
|
||||
if (!process.env.OPENAI_API_KEY) {
|
||||
throw new Error("Missing env var from OpenAI");
|
||||
}
|
||||
|
||||
export const POST = auth(async function POST(req: Request) {
|
||||
const json = await req.json();
|
||||
// @ts-ignore
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { type Message } from "@prisma/client";
|
||||
import CodeBlock from "@/components/ui/codeblock";
|
||||
import { MemoizedReactMarkdown } from "@/components/markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import remarkMath from "remark-math";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { fontMessage } from "@/lib/fonts";
|
||||
import { Message } from "ai-connector";
|
||||
export interface ChatMessageProps {
|
||||
message: Message;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue