Skip to main content

ProviderRequestFn

Type Alias ProviderRequestFn 

Source
pub type ProviderRequestFn = extern "C" fn(req_json: StbStringRef, out: *mut StbString, user_data: *mut c_void) -> i32;
Expand description

A provider-injection factory fn (for register_provider). req_json is a borrowed request envelope; out is an owning response the plugin frees. The host wraps this into a Provider impl (B4/B5).

One-shot. The plugin returns the complete assistant message and the host emits it as a single terminal chunk (no progressive rendering). A provider that can stream should use ProviderStreamRequestFn via register_streaming_provider instead; both slots stay registered so an existing plugin keeps its behavior unchanged.