executeStreaming

abstract fun executeStreaming(prompt: Prompt, model: LLModel, tools: List<ToolDescriptor> = emptyList()): Flow<StreamFrame>(source)

Executes a given prompt using the specified language model and returns a stream of output as a flow of StreamFrame objects.

Return

A flow emitting StreamFrame objects that represent the streaming output of the language model.

Parameters

prompt

The prompt containing input messages and parameters to guide the language model execution.

model

The language model to be used for processing the prompt.

tools

A list of ToolDescriptor objects that define the tools available for the execution.