createObject

open fun <T> createObject(prompt: String, outputClass: Class<T>): ThinkingResponse<T>

Create an object of the given type with thinking block extraction.

Uses the given prompt and LLM options from context to generate a structured object while capturing the LLM's reasoning process.

Return

Response containing both the converted object and extracted thinking blocks

Parameters

T

The type of object to create

prompt

The text prompt to send to the LLM

outputClass

The class of the object to create


abstract fun <T> createObject(messages: List<Message>, outputClass: Class<T>): ThinkingResponse<T>

Create an object from messages with thinking block extraction.

Return

Response containing both the converted object and extracted thinking blocks

Parameters

T

The type of object to create

messages

The conversation messages to send to the LLM

outputClass

The class of the object to create


open fun <T> createObject(content: MultimodalContent, outputClass: Class<T>): ThinkingResponse<T>

Create an object from multimodal content with thinking block extraction.

Return

Response containing both the converted object and extracted thinking blocks

Parameters

T

The type of object to create

content

The multimodal content (text + images) to send to the LLM

outputClass

The class of the object to create