LlmResponse class

LLM response.

Constructors

LlmResponse({required String content, LlmUsage? usage, String? model, String? finishReason, List<LlmToolCall>? toolCalls, Map<String, dynamic>? metadata})
const
LlmResponse.fromJson(Map<String, dynamic> json)
Create from JSON.
factory

Properties

content String
Response content.
final
finishReason String?
Finish reason (stop, length, tool_calls).
final
hashCode int
The hash code for this object.
no setterinherited
hasToolCalls bool
Whether the response contains tool calls.
no setter
metadata Map<String, dynamic>?
Response metadata.
final
model String?
Model used.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stopReason String?
Alias for finishReason for compatibility.
no setter
toolCalls List<LlmToolCall>?
Tool calls from the model.
final
usage LlmUsage?
Token usage.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert to JSON.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited