createObjectStreamIfPossible

abstract fun <O> createObjectStreamIfPossible(messages: List<Message>, interaction: LlmInteraction, outputClass: Class<O>, agentProcess: AgentProcess, action: Action?): <Error class: unknown class><<Error class: unknown class><O>>

Try to create a streaming list of objects in the context of an AgentProcess. Return a Flux that may error if the LLM does not have enough information to create objects. Streaming equivalent of createObjectIfPossible().

Return

Flux of Result objects, where each Result indicates success/failure for that object

Parameters

messages

messages

interaction

Llm options and tool callbacks to use, plus unique identifier

outputClass

Class of the output objects

agentProcess

Agent process we are running within

action

Action we are running within if we are running within an action