llmRequestStreaming

fun <T : Any> llmRequestStreaming(transformStreamData: (Flow.Publisher<ERROR CLASS: Symbol not found for StreamFrame>) -> Flow.Publisher<T>, outputClass: Class<T>, structureDefinition: ERROR CLASS: Symbol not found for StructureDefinition?? = null, name: String? = null): AIAgentNodeBase<String, Flow.Publisher<T>>(source)

Creates a node for streaming responses from LLM and handling the incoming stream data. This overload transforms the stream via a Publisher for Java interoperability.

Return

An instance of AIAgentNodeBase with a message input and a publisher output.

Parameters

transformStreamData

A function that processes the incoming stream of StreamFrame objects and transforms them into a publisher.

outputClass

The class type of the transformed output data.

structureDefinition

An optional definition of structured data.

name

An optional name for the node being created.


fun llmRequestStreaming(name: String? = null, structureDefinition: ERROR CLASS: Symbol not found for StructureDefinition??): AIAgentNodeBase<String, ERROR CLASS: Symbol not found for Flow<ERROR CLASS: Symbol not found for StreamFrame>>(source)

A node that sends a user message and requests a streaming response from the LLM.

Parameters

name

Optional node name, defaults to delegate's property name.

structureDefinition

Optional structure definition to customize the streaming response.