Response class

Top-level result object returned by the API.

Constructors

Response({bool? background, int? createdAt, ResponseError? error, String? id, IncompleteDetails? incompleteDetails, dynamic instructions, Input? input, int? maxOutputTokens, Map<String, dynamic>? metadata, ChatModel? model, bool? parallelToolCalls, String? previousResponseId, Prompt? prompt, ReasoningOptions? reasoning, ServiceTier? serviceTier, String? status, num? temperature, TextFormat? text, ToolChoice? toolChoice, List<Tool>? tools, num? topP, Truncation? truncation, Usage? usage, String? user, List<ResponseItem>? output})
const
Response.fromJson(Map<String, dynamic> json)
factory

Properties

background → bool?
final
createdAt → int?
final
error → ResponseError?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String?
final
incompleteDetails → IncompleteDetails?
final
input → Input?
final
instructions → dynamic
Either a single instruction string or an array of message objects.
final
maxOutputTokens → int?
final
metadata → Map<String, dynamic>?
final
model → ChatModel?
final
output → List<ResponseItem>?
final
outputText → String?
no setter
parallelToolCalls → bool?
final
previousResponseId → String?
final
prompt → Prompt?
final
reasoning → ReasoningOptions?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serviceTier → ServiceTier?
final
status → String?
completed / failed / in_progress / cancelled / queued / incomplete
final
temperature → num?
final
text → TextFormat?
final
toolChoice → ToolChoice?
final
tools → List<Tool>?
final
topP → num?
final
truncation → Truncation?
final
usage → Usage?
final
user → String?
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.
override

Operators

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