Spaces:
Sleeping
Sleeping
Download managed-chatkit/frontend/src/components/ChatKitPanel.tsx from taboola-cz/ClassLensPortal: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/spaces/taboola-cz/ClassLensPortal/resolve/main/managed-chatkit/frontend/src/components/ChatKitPanel.tsx
- Command line
-
hf download hf://spaces/taboola-cz/ClassLensPortal/managed-chatkit/frontend/src/components/ChatKitPanel.tsx
-
curl -L -o ChatKitPanel.tsx https://huggingface.co/spaces/taboola-cz/ClassLensPortal/resolve/main/managed-chatkit/frontend/src/components/ChatKitPanel.tsx
581 Bytes
| import { useMemo } from "react"; | |
| import { ChatKit, useChatKit } from "@openai/chatkit-react"; | |
| import { createClientSecretFetcher, workflowId } from "../lib/chatkitSession"; | |
| export function ChatKitPanel() { | |
| const getClientSecret = useMemo( | |
| () => createClientSecretFetcher(workflowId), | |
| [] | |
| ); | |
| const chatkit = useChatKit({ | |
| api: { getClientSecret }, | |
| }); | |
| return ( | |
| <div className="flex h-[90vh] w-full rounded-2xl bg-white shadow-sm transition-colors dark:bg-slate-900"> | |
| <ChatKit control={chatkit.control} className="h-full w-full" /> | |
| </div> | |
| ); | |
| } | |