VanturaResponse class
A response from the VanturaAgent.
Contains text, tool calls, streaming chunks, and usage statistics.
Constructors
-
VanturaResponse({String? text, List<
Map< ? toolCalls, String? textChunk, TokenUsage? usage, String? finishReason})String, dynamic> > - Creates a VanturaResponse.
-
VanturaResponse.fromMap(Map<
String, dynamic> map) -
Creates a response from a map.
factory
Properties
- finishReason → String?
-
The reason why the generation finished (e.g., 'stop', 'length', 'content_filter').
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String?
-
Final text response from the agent (optional).
final
- textChunk → String?
-
A single text chunk for streaming.
final
-
toolCalls
→ List<
Map< ?String, dynamic> > -
Tool call information, if the agent requested a tool.
final
- usage → TokenUsage?
-
Token usage statistics for billing and observability.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts response to a map for serialization.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited