Learn R Programming

openaiRtools (version 0.2.2)

RunsClient: Runs Client

Description

Manages runs on threads. A run executes an assistant's logic against a thread's messages and produces a response. Access via client$threads$runs.

Arguments

Run status lifecycle

"queued""in_progress""completed" (success) or → "requires_action" (tool call needed) → "in_progress" (after submitting outputs) or → "failed" / "cancelled" / "expired"

Methods


Method new()

Usage

RunsClient$new(parent)


Method create()

Usage

RunsClient$create(
  thread_id,
  assistant_id,
  model = NULL,
  instructions = NULL,
  additional_instructions = NULL,
  additional_messages = NULL,
  tools = NULL,
  metadata = NULL,
  temperature = NULL,
  top_p = NULL,
  max_prompt_tokens = NULL,
  max_completion_tokens = NULL,
  truncation_strategy = NULL,
  tool_choice = NULL,
  parallel_tool_calls = NULL,
  response_format = NULL,
  stream = NULL,
  callback = NULL
)


Method list()

Usage

RunsClient$list(
  thread_id,
  limit = NULL,
  order = NULL,
  after = NULL,
  before = NULL
)


Method retrieve()

Usage

RunsClient$retrieve(thread_id, run_id)


Method update()

Usage

RunsClient$update(thread_id, run_id, metadata = NULL)


Method cancel()

Usage

RunsClient$cancel(thread_id, run_id)


Method submit_tool_outputs()

Usage

RunsClient$submit_tool_outputs(
  thread_id,
  run_id,
  tool_outputs,
  stream = NULL,
  callback = NULL
)


Method clone()

The objects of this class are cloneable with this method.

Usage

RunsClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.