Skip to content

Commit

Permalink
fix basepath api url
Browse files Browse the repository at this point in the history
  • Loading branch information
yoziru committed Mar 27, 2024
1 parent 52d284a commit 8c689f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useChat } from "ai/react";
import React from "react";
import useLocalStorageState from "use-local-storage-state";
import { ChatOptions } from "@/components/chat/chat-options";
import { basePath } from "@/lib/utils";

export default function Page({ params }: { params: { id: string } }) {
const {
Expand All @@ -17,7 +18,7 @@ export default function Page({ params }: { params: { id: string } }) {
error,
stop,
setMessages,
} = useChat();
} = useChat({ api: basePath + "/api/chat" });
const [chatId, setChatId] = React.useState<string>("");
const [chatOptions, setChatOptions] = useLocalStorageState<ChatOptions>(
"chatOptions",
Expand Down

0 comments on commit 8c689f0

Please sign in to comment.