RunStepObject class

Represents a step in execution of a run.

Annotations
  • @freezed

Constructors

RunStepObject({required String id, required RunStepObjectObject object, @JsonKey(name: 'created_at') required int createdAt, @JsonKey(name: 'assistant_id') required String assistantId, @JsonKey(name: 'thread_id') required String threadId, @JsonKey(name: 'run_id') required String runId, required RunStepType type, required RunStepStatus status, @JsonKey(name: 'step_details') required RunStepDetails stepDetails, @JsonKey(name: 'last_error') required RunStepLastError? lastError, @JsonKey(name: 'expired_at') required int? expiredAt, @JsonKey(name: 'cancelled_at') required int? cancelledAt, @JsonKey(name: 'failed_at') required int? failedAt, @JsonKey(name: 'completed_at') required int? completedAt, required Map<String, dynamic>? metadata, required RunStepCompletionUsage? usage})
Factory constructor for RunStepObject
const
factory
RunStepObject.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory

Properties

assistantId String
The ID of the assistant associated with the run step.
no setterinherited
cancelledAt int?
The Unix timestamp (in seconds) for when the run step was cancelled.
no setterinherited
completedAt int?
The Unix timestamp (in seconds) for when the run step completed.
no setterinherited
copyWith → $RunStepObjectCopyWith<RunStepObject>
Create a copy of RunStepObject with the given fields replaced by the non-null parameter values.
no setterinherited
createdAt int
The Unix timestamp (in seconds) for when the run step was created.
no setterinherited
expiredAt int?
The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.
no setterinherited
failedAt int?
The Unix timestamp (in seconds) for when the run step failed.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The identifier of the run step, which can be referenced in API endpoints.
no setterinherited
lastError RunStepLastError?
The last error associated with this run step. Will be null if there are no errors.
no setterinherited
metadata Map<String, dynamic>?
Set of 16 key-value pairs that can be attached to an object. This can be 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
object RunStepObjectObject
The object type, which is always thread.run.step.
no setterinherited
runId String
The ID of the run that this run step is a part of.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status RunStepStatus
The status of the run step, which can be either in_progress, cancelled, failed, completed, or expired.
no setterinherited
stepDetails RunStepDetails
The details of the run step. Any of: RunStepDetailsMessageCreationObject, RunStepDetailsToolCallsObject
no setterinherited
threadId String
The ID of the thread that was run.
no setterinherited
type RunStepType
The type of run step, which can be either message_creation or tool_calls.
no setterinherited
usage RunStepCompletionUsage?
Usage statistics related to the run step. This value will be null while the run step's status is in_progress.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this RunStepObject to a JSON map.
inherited
toMap() Map<String, dynamic>
Map representation of object (not serialized)
toString() String
A string representation of this object.
inherited
validateSchema() String?
Perform validations on the schema property values

Operators

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

Constants

propertyNames → const List<String>
List of all property names of schema