invokePluginStream( )
Invoke a streaming plugin handler.
function invokePluginStream(options: InvokePluginOptions): AsyncGeneratorDescription
Invoke a streaming plugin handler.
Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
options | InvokePluginOptions | ✓ | No description |
Returns
AsyncGeneratorinvokePlugin( )
Invoke a non-streaming plugin handler.
loadModel( )
Loads a machine learning model from a local path, remote URL, or Hyperdrive key. This function supports multiple model types: LLM (Large Language Model), Whisper (speech recognition), embeddings, NMT (translation), and TTS. It can handle both local file paths and Hyperdrive URLs (pear://). When `onProgress` is provided, the function uses streaming to provide real-time download progress. Otherwise, it uses a simple request-response pattern for faster execution.