Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrStructuredIOSchemaValidation = errors.New("structured I/O schema validation error")
ErrStructuredIOSchemaValidation is the umbrella error for all structured I/O schema validation failures.
var ErrStructuredInputSchemaValidation = errors.Join( errors.New("structured input schema validation error"), ErrStructuredIOSchemaValidation, )
ErrStructuredInputSchemaValidation is returned when input JSON fails to match the expected schema. It satisfies errors.Is(err, ErrStructuredIOSchemaValidation).
var ErrStructuredOutputSchemaValidation = errors.Join( errors.New("structured output schema validation error"), ErrStructuredIOSchemaValidation, )
ErrStructuredOutputSchemaValidation is returned when output JSON fails to match the expected schema. It satisfies errors.Is(err, ErrStructuredIOSchemaValidation).
Functions ¶
Types ¶
type Option ¶
type Option func(*options)
Option customizes wrapper behavior at creation time.
func WithInputSchema ¶
WithInputSchema overrides default input JSON schema.
func WithMaxAccumulatedOutputBytes ¶
WithMaxAccumulatedOutputBytes sets the maximum number of output text bytes accumulated for schema validation in a single turn.
func WithOutputSchema ¶
WithOutputSchema overrides default output JSON schema.
func WithOutputValidationRetries ¶
WithOutputValidationRetries sets the number of retries for output schema validation failures. Default is 1 retry (2 total attempts).
func WithSystemInstruction ¶
WithSystemInstruction sets the system instruction for the agent. This instruction is prepended to the I/O requirements prompt.