AIResponse class
A unified response from any AI provider.
Constructors
Properties
- content → String
-
The generated text content.
final
- finishReason → String?
-
The finish reason (e.g., 'stop', 'length', 'content_filter').
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- latency → Duration
-
How long the request took.
final
-
metadata
→ Map<
String, dynamic> ? -
Provider-specific metadata.
final
- model → String
-
The model that generated this response.
final
- provider → String
-
The provider that served this response.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
When the response was received.
final
-
toolCalls
→ List<
AIToolCall> ? -
Tool invocations requested by the model.
final
- usage → AIUsage
-
Token usage information.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited