EdgeGenAIToolSchema class
The schema of one value the model generates when calling a tool,
mirroring what Foundation Models' DynamicGenerationSchema can enforce
natively on iOS: primitive types, string enums, numeric ranges, arrays
with item schemas and length bounds, and nested objects.
On Android the same schema is rendered into the tool-calling prompt as JSON Schema text, which the model is asked to follow.
Constructors
- EdgeGenAIToolSchema.array({required EdgeGenAIToolSchema items, String? description, int? minItems, int? maxItems})
-
A list whose elements each match
items, optionally withminItems/maxItemslength bounds.factory - EdgeGenAIToolSchema.boolean({String? description})
-
A true/false value.
factory
- EdgeGenAIToolSchema.integer({String? description, int? minimum, int? maximum})
-
A whole number, optionally bounded to
minimum/maximum.factory - EdgeGenAIToolSchema.number({String? description, double? minimum, double? maximum})
-
A floating-point number, optionally bounded to
minimum/maximum.factory -
EdgeGenAIToolSchema.object({required Map<
String, EdgeGenAIToolSchema> properties, String? description, List<String> optionalProperties = const []}) -
A nested object with named
properties.factory - EdgeGenAIToolSchema.ofType(EdgeGenAIToolParameterType type, {String? description})
-
The schema of a primitive EdgeGenAIToolParameterType.
factory
-
EdgeGenAIToolSchema.string({String? description, List<
String> ? enumValues}) -
A text value, optionally restricted to
enumValues.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJsonSchema(
) → Map< String, Object?> - This schema as a JSON Schema document (a plain JSON-encodable map).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited