ThreadRun class
Represents an execution run on a thread. https://platform.openai.com/docs/api-reference/runs/object
- Annotations
-
- @freezed
Constructors
-
ThreadRun({required String id, @Default('thread.run') String object, required int createdAt, required String threadId, required String assistantId, required String status, int? expiresAt, int? startedAt, int? cancelledAt, int? failedAt, int? completedAt, Map<
String, dynamic> ? lastError, required String model, required String instructions, @Default([]) List tools, @Default([]) List<String> fileIds, @Default({}) Map<String, dynamic> metadata}) -
constfactory
-
ThreadRun.fromJson(Map<
String, dynamic> json) -
factory
Properties
- assistantId → String
-
The ID of the assistant used for execution of this run.
no setterinherited
- cancelledAt → int?
-
The Unix timestamp (in seconds) for when the run was cancelled.
no setterinherited
- completedAt → int?
-
The Unix timestamp (in seconds) for when the run was completed.
no setterinherited
-
copyWith
→ $ThreadRunCopyWith<
ThreadRun> -
no setterinherited
- createdAt → int
-
The Unix timestamp (in seconds) for when the run was created.
no setterinherited
- expiresAt → int?
-
The Unix timestamp (in seconds) for when the run will expire.
no setterinherited
- failedAt → int?
-
The Unix timestamp (in seconds) for when the run failed.
no setterinherited
-
fileIds
→ List<
String> -
The list of File IDs the assistant used for this run.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The identifier which can be referenced in API endpoints.
no setterinherited
- instructions → String
-
The instructions that the assistant used for this run.
no setterinherited
-
lastError
→ Map<
String, dynamic> ? -
The last error associated with this run. Will be null if there are no errors.
no setterinherited
-
metadata
→ Map<
String, dynamic> -
A set of 16 key-value pairs that can be attached to the object. Useful for storing additional
information about the object in a structured format. Keys can be a maximum of 64 characters long,
and values can be a maximum of 512 characters long.
no setterinherited
- model → String
-
The model that the assistant used for this run.
no setterinherited
- object → String
-
The object type which is always thread.run.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startedAt → int?
-
The Unix timestamp (in seconds) for when the run was started.
no setterinherited
- status → String
-
The status of the run which can be either queued, in_progress, requires_action,
cancelling, cancelled, failed, completed, or expired.
no setterinherited
- threadId → String
-
The ID of the thread that was executed on as a part of this run.
no setterinherited
- tools → List
-
The list of tools that the assistant used for this run.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited