executeStructuredOneShot

Executes a given prompt and parses the resulting text, expecting structured data in the response message.

NOTE: you have to manually handle LLM coercion into structured output, e.g. using prompt schema parameter.

Return

A StructuredResponse containing both parsed structure and raw text

Parameters

prompt

The prompt to be executed.

structure

The structure definition that includes the parser and schema information for interpreting the raw response from the execution.