Thinking Prompt Runner Operations
User-facing interface for executing prompts with thinking block extraction.
This interface provides thinking-aware versions of standard prompt operations, returning both the converted results and the reasoning content that LLMs generated during their processing.
Usage
Access this interface through the withThinking() extension:
val result = promptRunner.withThinking().createObject("analyze this", Person::class.java)
val person = result.result // The converted Person object
val thinking = result.thinkingBlocks // List of reasoning blocksThinking Block Extraction
This interface automatically extracts thinking content in various formats:
Tagged thinking:
<think>reasoning here</think>,<analysis>content</analysis>Prefix thinking:
//THINKING: reasoning hereUntagged thinking: raw text content before JSON objects
Relationship to Regular Operations
Unlike com.embabel.agent.api.common.PromptRunnerOperations which returns direct objects, all methods in this interface return ThinkingResponse wrappers that provide access to both results and reasoning.
See also
for standard operations
for the response wrapper
for thinking content details
Functions
Create an object from multimodal content with thinking block extraction.
Create an object of the given type with thinking block extraction.
Create an object from messages with thinking block extraction.
Try to create an object from multimodal content with thinking block extraction.
Try to create an object of the given type with thinking block extraction.
Try to create an object from messages with thinking block extraction.
Evaluate a condition with thinking block extraction.
Generate text from multimodal content with thinking block extraction.
Generate text with thinking block extraction.
Respond in a conversation with multimodal content and thinking block extraction.
Respond in a conversation with thinking block extraction.