Suspense-compatible hook for WebLLM ready state. Throws a promise that resolves when WebLLM engine is ready.
function ChatComponent() { useWebLLMReady(); // Suspends until WebLLM is ready const { chatCompletion } = useTransformers(); return <div>Chat is ready!</div>;}// Wrap with Suspense<Suspense fallback={<div>Loading LLM...</div>}> <ChatComponent /></Suspense> Copy
function ChatComponent() { useWebLLMReady(); // Suspends until WebLLM is ready const { chatCompletion } = useTransformers(); return <div>Chat is ready!</div>;}// Wrap with Suspense<Suspense fallback={<div>Loading LLM...</div>}> <ChatComponent /></Suspense>
Suspense-compatible hook for WebLLM ready state. Throws a promise that resolves when WebLLM engine is ready.