Class: OpenAI::Models::Beta::Threads::Runs::RunStep

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/threads/runs/run_step.rb

Overview

Defined Under Namespace

Modules: Status, StepDetails, Type Classes: LastError, Usage

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: , assistant_id: , cancelled_at: , completed_at: , created_at: , expired_at: , failed_at: , last_error: , metadata: , run_id: , status: , step_details: , thread_id: , type: , usage: , object: :"thread.run.step") ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::Threads::Runs::RunStep for more details.

Represents a step in execution of a run.

Parameters:



# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 119

Instance Attribute Details

#assistant_idString

The ID of the [assistant](platform.openai.com/docs/api-reference/assistants) associated with the run step.

Returns:

  • (String)


22
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 22

required :assistant_id, String

#cancelled_atInteger?

The Unix timestamp (in seconds) for when the run step was cancelled.

Returns:

  • (Integer, nil)


28
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 28

required :cancelled_at, Integer, nil?: true

#completed_atInteger?

The Unix timestamp (in seconds) for when the run step completed.

Returns:

  • (Integer, nil)


34
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 34

required :completed_at, Integer, nil?: true

#created_atInteger

The Unix timestamp (in seconds) for when the run step was created.

Returns:

  • (Integer)


40
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 40

required :created_at, Integer

#expired_atInteger?

The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.

Returns:

  • (Integer, nil)


47
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 47

required :expired_at, Integer, nil?: true

#failed_atInteger?

The Unix timestamp (in seconds) for when the run step failed.

Returns:

  • (Integer, nil)


53
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 53

required :failed_at, Integer, nil?: true

#idString

The identifier of the run step, which can be referenced in API endpoints.

Returns:

  • (String)


14
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 14

required :id, String

#last_errorOpenAI::Models::Beta::Threads::Runs::RunStep::LastError?

The last error associated with this run step. Will be ‘null` if there are no errors.



60
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 60

required :last_error, -> { OpenAI::Beta::Threads::Runs::RunStep::LastError }, nil?: true

#metadataHash{Symbol=>String}?

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, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

  • (Hash{Symbol=>String}, nil)


71
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 71

required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#objectSymbol, :"thread.run.step"

The object type, which is always ‘thread.run.step`.

Returns:

  • (Symbol, :"thread.run.step")


77
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 77

required :object, const: :"thread.run.step"

#run_idString

The ID of the [run](platform.openai.com/docs/api-reference/runs) that this run step is a part of.

Returns:

  • (String)


84
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 84

required :run_id, String

#statusSymbol, OpenAI::Models::Beta::Threads::Runs::RunStep::Status

The status of the run step, which can be either ‘in_progress`, `cancelled`, `failed`, `completed`, or `expired`.



91
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 91

required :status, enum: -> { OpenAI::Beta::Threads::Runs::RunStep::Status }

#step_detailsOpenAI::Models::Beta::Threads::Runs::MessageCreationStepDetails, OpenAI::Models::Beta::Threads::Runs::ToolCallsStepDetails

The details of the run step.



97
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 97

required :step_details, union: -> { OpenAI::Beta::Threads::Runs::RunStep::StepDetails }

#thread_idString

The ID of the [thread](platform.openai.com/docs/api-reference/threads) that was run.

Returns:

  • (String)


104
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 104

required :thread_id, String

#typeSymbol, OpenAI::Models::Beta::Threads::Runs::RunStep::Type

The type of run step, which can be either ‘message_creation` or `tool_calls`.



110
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 110

required :type, enum: -> { OpenAI::Beta::Threads::Runs::RunStep::Type }

#usageOpenAI::Models::Beta::Threads::Runs::RunStep::Usage?

Usage statistics related to the run step. This value will be ‘null` while the run step’s status is ‘in_progress`.



117
# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 117

required :usage, -> { OpenAI::Beta::Threads::Runs::RunStep::Usage }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/threads/runs/run_step.rb', line 188