doTransformWithThinkingIfPossible

abstract fun <O> doTransformWithThinkingIfPossible(messages: List<Message>, interaction: LlmInteraction, outputClass: Class<O>, llmRequestEvent: LlmRequestEvent<O>?): <Error class: unknown class><ThinkingResponse<O>>

Low level transform with thinking block extraction and MaybeReturn semantics, not necessarily aware of platform. Returns a failure result if the LLM indicates it cannot create the object.

Parameters

messages

messages

interaction

The LLM call options

outputClass

Class of the output object

llmRequestEvent

Event already published for this request if one has been