Skip to main content

stream_object_async

Function stream_object_async 

Source
pub async fn stream_object_async<T>(
    provider: &dyn DynProvider,
    params: ChatParams,
    config: GenerateObjectConfig,
) -> Result<ChatStream, LlmError>
Expand description

Async streaming variant of generate_object.

Awaits the provider’s stream creation and returns the ChatStream directly. Yields StreamEvents which can be collected via collect_stream_object.

The max_attempts field in config is ignored — retry logic must be implemented by the caller.