Class: OpenAI::Resources::Beta::Threads::Runs::Steps Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/resources/beta/threads/runs/steps.rb

Overview

Deprecated.

The Assistants API is deprecated in favor of the Responses API

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Steps

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Steps.



98
99
100
# File 'lib/openai/resources/beta/threads/runs/steps.rb', line 98

def initialize(client:)
  @client = client
end

Instance Method Details

#list(run_id, thread_id: , after: nil, before: nil, include: nil, limit: nil, order: nil, request_options: {}) ⇒ OpenAI::Internal::CursorPage<OpenAI::Models::Beta::Threads::Runs::RunStep>

Deprecated.

The Assistants API is deprecated in favor of the Responses API

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

Returns a list of run steps belonging to a run.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/openai/resources/beta/threads/runs/steps.rb', line 79

def list(run_id, params)
  parsed, options = OpenAI::Beta::Threads::Runs::StepListParams.dump_request(params)
  thread_id =
    parsed.delete(:thread_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["threads/%1$s/runs/%2$s/steps", thread_id, run_id],
    query: parsed,
    page: OpenAI::Internal::CursorPage,
    model: OpenAI::Beta::Threads::Runs::RunStep,
    options: {extra_headers: {"OpenAI-Beta" => "assistants=v2"}, **options}
  )
end

#retrieve(step_id, thread_id: , run_id: , include: nil, request_options: {}) ⇒ OpenAI::Models::Beta::Threads::Runs::RunStep

Deprecated.

The Assistants API is deprecated in favor of the Responses API

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

Retrieves a run step.



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/openai/resources/beta/threads/runs/steps.rb', line 32

def retrieve(step_id, params)
  parsed, options = OpenAI::Beta::Threads::Runs::StepRetrieveParams.dump_request(params)
  thread_id =
    parsed.delete(:thread_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  run_id =
    parsed.delete(:run_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["threads/%1$s/runs/%2$s/steps/%3$s", thread_id, run_id, step_id],
    query: parsed,
    model: OpenAI::Beta::Threads::Runs::RunStep,
    options: {extra_headers: {"OpenAI-Beta" => "assistants=v2"}, **options}
  )
end