diff --git a/app/api/chat-with-functions/route.ts b/app/api/chat-with-functions/route.ts index 9c54443..e4227b3 100644 --- a/app/api/chat-with-functions/route.ts +++ b/app/api/chat-with-functions/route.ts @@ -3,7 +3,7 @@ import OpenAI from "openai"; import { OpenAIStream, StreamingTextResponse } from "ai"; const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY || "" , + apiKey: process.env.OPENAI_API_KEY || , }); export const runtime = "node"; diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index 7bc0f8e..6084c47 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -3,7 +3,7 @@ import OpenAI from "openai"; import { OpenAIStream, StreamingTextResponse } from "ai"; const openai = new OpenAI({ - apiKey: process.env.OPENAI_API || "", + apiKey: process.env.OP, }); export const runtime = "edge"; diff --git a/app/components/navbar.tsx b/app/components/navbar.tsx index 6b92ef9..425c78a 100644 --- a/app/components/navbar.tsx +++ b/app/components/navbar.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; export default function NavBar() { return (
- + Chat diff --git a/app/function-calling/page.tsx b/app/function-calling/page.tsx index 199b44d..83ced4b 100644 --- a/app/function-calling/page.tsx +++ b/app/function-calling/page.tsx @@ -9,7 +9,7 @@ export default function Chat() { chatMessages, functionCall ) => { - if (functionCall.name === "") { + if (functionCall.name === "eval_code_in_browser") { if (functionCall.arguments) { // Parsing here does not always work since it seems that some characters in generated code aren't escaped properly. const parsedFunctionCallArguments: { code: string } = JSON.parse(