$structuredOutput = (new StructuredOutput)
->withMessages($messages) // Set chat messages
->withInput($input) // Set input (converted to messages)
->withSystem($systemPrompt) // Set system prompt
->withPrompt($prompt) // Set additional prompt
->withExamples($examples) // Set example data for context
->withModel($modelName) // Set LLM model name
->withOptions($options) // Set LLM-specific options
->withOption($key, $value) // Set individual LLM option
->withStreaming(true) // Enable streaming responses
->withCachedContext($messages, $system, $prompt, $examples) // Use cached context
// @doctest id="bb1d"