GenerateObjectResult class
Result of generate_object (user-facing, M12). The parsed JSON object plus
convenience fields from the underlying generate_text call.
Mirrors GenerateObjectResult.ts. object is an arbitrary JSON value
(weak type — Map<String, dynamic> / primitive).
- Annotations
-
- @JsonSerializable.new()
Constructors
-
GenerateObjectResult({Object? object, required FinishReason finishReason, String? rawFinishReason, required Usage usage, List<
Map< warnings = const [], String? reasoning, Map<String, dynamic> >String, dynamic> ? providerMetadata, required ResponseMetadata response, required GenerateTextResult raw}) -
GenerateObjectResult.fromJson(Map<
String, dynamic> json) -
factory
Properties
- finishReason → FinishReason
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- object → Object?
-
The parsed JSON object returned by the model (arbitrary JSON, weak type).
final
-
providerMetadata
→ Map<
String, dynamic> ? -
Provider-specific metadata (e.g. Anthropic cache info). Weak type.
final
- raw → GenerateTextResult
-
final
- rawFinishReason → String?
-
final
- reasoning → String?
-
Concatenated reasoning text (if the model produced reasoning/thinking).
final
- response → ResponseMetadata
-
Response metadata (id, timestamp, model_id).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → Usage
-
final
-
warnings
→ List<
Map< String, dynamic> > -
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited