Class RunStep

java.lang.Object
com.azure.ai.openai.assistants.models.RunStep
All Implemented Interfaces:
com.azure.json.JsonSerializable<RunStep>

public final class RunStep extends Object implements com.azure.json.JsonSerializable<RunStep>
Detailed information about a single step of an assistant thread run.
  • Method Summary

    Modifier and Type
    Method
    Description
    static RunStep
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of RunStep from the JsonReader.
    Get the assistantId property: The ID of the assistant associated with the run step.
    Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.
    Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.
    Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.
    Get the expiredAt property: The Unix timestamp, in seconds, representing when this item expired.
    Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.
    Get the id property: The identifier, which can be referenced in API endpoints.
    Get the lastError property: If applicable, information about the last error encountered by this run step.
    Get the metadata property: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format.
    Get the object property: The object type, which is always 'thread.run.step'.
    Get the runId property: The ID of the run that this run step is a part of.
    Get the status property: The status of this run step.
    Get the stepDetails property: The details for this run step.
    Get the threadId property: The ID of the thread that was run.
    Get the type property: The type of run step, which can be either message_creation or tool_calls.
    Get the usage property: Usage statistics related to the run step.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • getId

      public String getId()
      Get the id property: The identifier, which can be referenced in API endpoints.
      Returns:
      the id value.
    • getObject

      public String getObject()
      Get the object property: The object type, which is always 'thread.run.step'.
      Returns:
      the object value.
    • getType

      public RunStepType getType()
      Get the type property: The type of run step, which can be either message_creation or tool_calls.
      Returns:
      the type value.
    • getAssistantId

      public String getAssistantId()
      Get the assistantId property: The ID of the assistant associated with the run step.
      Returns:
      the assistantId value.
    • getThreadId

      public String getThreadId()
      Get the threadId property: The ID of the thread that was run.
      Returns:
      the threadId value.
    • getRunId

      public String getRunId()
      Get the runId property: The ID of the run that this run step is a part of.
      Returns:
      the runId value.
    • getStatus

      public RunStepStatus getStatus()
      Get the status property: The status of this run step.
      Returns:
      the status value.
    • getStepDetails

      public RunStepDetails getStepDetails()
      Get the stepDetails property: The details for this run step.
      Returns:
      the stepDetails value.
    • getLastError

      public RunStepError getLastError()
      Get the lastError property: If applicable, information about the last error encountered by this run step.
      Returns:
      the lastError value.
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Get the createdAt property: The Unix timestamp, in seconds, representing when this object was created.
      Returns:
      the createdAt value.
    • getExpiredAt

      public OffsetDateTime getExpiredAt()
      Get the expiredAt property: The Unix timestamp, in seconds, representing when this item expired.
      Returns:
      the expiredAt value.
    • getCompletedAt

      public OffsetDateTime getCompletedAt()
      Get the completedAt property: The Unix timestamp, in seconds, representing when this completed.
      Returns:
      the completedAt value.
    • getCancelledAt

      public OffsetDateTime getCancelledAt()
      Get the cancelledAt property: The Unix timestamp, in seconds, representing when this was cancelled.
      Returns:
      the cancelledAt value.
    • getFailedAt

      public OffsetDateTime getFailedAt()
      Get the failedAt property: The Unix timestamp, in seconds, representing when this failed.
      Returns:
      the failedAt value.
    • getMetadata

      public Map<String,String> getMetadata()
      Get the metadata property: A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
      Returns:
      the metadata value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RunStep>
      Throws:
      IOException
    • fromJson

      public static RunStep fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RunStep from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RunStep if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the RunStep.
    • getUsage

      public RunStepCompletionUsage getUsage()
      Get the usage property: Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.
      Returns:
      the usage value.