AdvancedWeb Worker Support

Web Worker Support

Run model inference in a separate thread for better performance.

Enabling Web Workers

const response = await browserAI.generateText('Hello', {
  useWorker: true
});

Benefits

  • Non-blocking UI
  • Parallel processing
  • Better resource utilization

Worker Status Monitoring

browserAI.on('workerStatus', (status) => {
  console.log('Worker status:', status);
});