RunStep class
A step in a run's execution.
Run steps track the individual actions taken during a run, such as tool calls and message creation.
- Annotations
-
- @immutable
Constructors
-
RunStep({required String id, required String object, required int createdAt, required String runId, required String assistantId, required String threadId, required RunStepType type, required RunStepStatus status, required StepDetails stepDetails, StepError? lastError, int? expiredAt, int? cancelledAt, int? failedAt, int? completedAt, required Map<
String, String> metadata, Usage? usage}) -
Creates a RunStep.
const
-
RunStep.fromJson(Map<
String, dynamic> json) -
Creates a RunStep from JSON.
factory
Properties
- assistantId → String
-
The assistant ID.
final
- cancelledAt → int?
-
The Unix timestamp when the step was cancelled.
final
- completedAt → int?
-
The Unix timestamp when the step completed.
final
- createdAt → int
-
The Unix timestamp when the step was created.
final
- expiredAt → int?
-
The Unix timestamp when the step expired.
final
- failedAt → int?
-
The Unix timestamp when the step failed.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
The run step identifier.
final
- isMessageCreation → bool
-
Whether the step is a message creation.
no setter
- isToolCall → bool
-
Whether the step is a tool call.
no setter
- lastError → StepError?
-
The last error if the step failed.
final
-
metadata
→ Map<
String, String> -
Custom metadata.
final
- object → String
-
The object type (always "thread.run.step").
final
- runId → String
-
The run ID this step belongs to.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → RunStepStatus
-
The status of the step.
final
- stepDetails → StepDetails
-
The step details.
final
- threadId → String
-
The thread ID.
final
- type → RunStepType
-
The type of step.
final
- usage → Usage?
-
Token usage statistics.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override