Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update route.ts #45

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/chat-with-functions/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "" ,
});

export const runtime = "node";
Expand Down
2 changes: 1 addition & 1 deletion app/api/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "",
});

export const runtime = "edge";
Expand Down
1 change: 1 addition & 0 deletions app/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Link from "next/link";

export default function NavBar() {
const l = "";
return (
<div className="flex items-center p-4 justify-center text-center gap-14 ">
<Link className="text-2xl font-bold" href="/">
Expand Down
2 changes: 2 additions & 0 deletions app/tri-display/@docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function example() {
\`\`\`
`;

let o = "";

export default function DocsPage() {
const [markdown, setMarkdown] = useState("");

Expand Down
4 changes: 2 additions & 2 deletions app/tri-display/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const metadata = {
title: "Create Next App",
title: "",
description: "Generated by create next app",
};

Expand All @@ -10,7 +10,7 @@ export default function DualLayout(props: {
}) {
return (
<div className="grid grid-cols-3 shrink">
{props.data}
{""}
{props.children}
{props.docs}
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/tri-display/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";

import { useChat } from "ai/react";
//

export default function Dual() {
const { messages, input, handleInputChange, handleSubmit, data } = useChat();
return (
<div className="flex">
<div className="">
<div className="flex flex-col w-full max-w-md py-24 mx-auto stretch">
{messages.length > 0
? messages.map((m) => (
Expand Down
Loading