convert

open fun convert(source: String): T?

Converts the source string to the target type after removing any thinking blocks.

This method performs the following steps:

  1. Calls identifyThinkBlock to sanitize the input by removing thinking blocks

  2. Logs any detected thinking blocks (for debugging/analysis purposes)

  3. Delegates the actual conversion to the wrapped converter

Return

The converted object of type T, or null if conversion fails

Parameters

source

The raw string output from the LLM, potentially containing thinking blocks