diff --git a/examples/nextjs-ai-chats/app/[chatId]/page.tsx b/examples/nextjs-ai-chats/app/[chatId]/page.tsx index 7e36e7ab3d4..c2aa76e2e89 100644 --- a/examples/nextjs-ai-chats/app/[chatId]/page.tsx +++ b/examples/nextjs-ai-chats/app/[chatId]/page.tsx @@ -49,7 +49,9 @@ function ChatTitle({ chatId }: { chatId: string }) { // Overriding the empty chat state function Empty({ chatId }: AiChatComponentsEmptyProps) { - const sendMessage = useSendAiMessage(chatId); + const sendMessage = useSendAiMessage(chatId, { + copilotId: process.env.NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID || undefined, + }); return (
diff --git a/examples/nextjs-ai-popup/app/page.tsx b/examples/nextjs-ai-popup/app/page.tsx index 6964ae9f30e..19c63b848a1 100644 --- a/examples/nextjs-ai-popup/app/page.tsx +++ b/examples/nextjs-ai-popup/app/page.tsx @@ -119,7 +119,10 @@ function Chat({ chatId }: { chatId: string }) { layout="compact" components={{ Empty: ({ chatId }) => { - const sendMessage = useSendAiMessage(chatId); + const sendMessage = useSendAiMessage(chatId, { + copilotId: + process.env.NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID || undefined, + }); return (