create Object Stream With Thinking
abstract fun <O> createObjectStreamWithThinking(messages: List<Message>, interaction: LlmInteraction, outputClass: Class<O>, agentProcess: AgentProcess, action: Action?): <Error class: unknown class><<Error class: unknown class><O>>
Create a streaming list of objects with LLM thinking content from mixed JSONL response. Supports both JSON object lines and //THINKING: lines in the LLM response. Returns StreamingEvent objects that can contain either typed objects or thinking content.
This enables real-time visibility into LLM reasoning process alongside structured results. Supports the API layer createObjectStreamWithThinking() method.
Return
Flux of StreamingEvent objects containing either objects or thinking content
Parameters
messages
messages in the conversation so far
interaction
Llm options and tool callbacks to use, plus unique identifier
output Class
Class of the output objects
agent Process
Agent process we are running within
action
Action we are running within if we are running within an action