Chatoyant_schema.SchemaSourceTyped schema descriptors used for structured outputs and tool arguments.
This first layer models schema metadata explicitly. Later increments can add richer typed builders and generated/proxied ergonomics without changing the provider-facing JSON Schema contract.
type field = | String of string_options| Number of number_options| Integer of number_options| Boolean of boolean_options| Null of base_options| Array of array_options| Object of object_options| Enum of enum_options| Literal of literal_optionsand string_options = {string_base : base_options;string_default : string option;min_length : int option;max_length : int option;pattern : string option;format : string_format option;}and number_options = {number_base : base_options;number_default : float option;minimum : float option;maximum : float option;exclusive_minimum : float option;exclusive_maximum : float option;multiple_of : float option;}and array_options = {array_base : base_options;items : field;min_items : int option;max_items : int option;unique_items : bool option;}and enum_options = {enum_base : base_options;values : Chatoyant_runtime.Json.t list;enum_default : Chatoyant_runtime.Json.t option;}val string :
?description:string ->
?optional:bool ->
?default:string ->
?min_length:int ->
?max_length:int ->
?pattern:string ->
?format:string_format ->
unit ->
fieldReplace the human-readable description on a schema field.
val with_array_constraints :
?min_items:int ->
?max_items:int ->
?unique_items:bool ->
field ->
fieldApply array-specific validation constraints when field is an array.
val with_string_constraints :
?min_length:int ->
?max_length:int ->
?pattern:string ->
field ->
fieldApply string-specific validation constraints when field is a string.
Apply numeric validation constraints when field is a number or integer.
Convert a field to JSON Schema draft-compatible JSON.