Hook to access the Transformers and WebLLM context. Must be used within a TransformersProvider.
Context value containing all Transformers.js and WebLLM functionality
Error if used outside of TransformersProvider
function MyComponent() { const { libraryStatus, analyzeSentiment, // WebLLM features isWebLLMLoaded, chatCompletion, getAvailableWebLLMModels } = useTransformers(); return <div>Status: {libraryStatus}</div>;} Copy
function MyComponent() { const { libraryStatus, analyzeSentiment, // WebLLM features isWebLLMLoaded, chatCompletion, getAvailableWebLLMModels } = useTransformers(); return <div>Status: {libraryStatus}</div>;}
Hook to access the Transformers and WebLLM context. Must be used within a TransformersProvider.