Run R6 class
Run R6 class
RunStream R6 class
RunStream R6 class
Public fields
id
Run ID.
created_at
Time the run was created.
thread_id
Thread ID.
assistant_id
Assistant ID.
status
Run status.
required_action
Required action.
last_error
Last error.
started_at
Time the run was started.
expires_at
Time the run expires.
cancelled_at
Time the run was cancelled.
failed_at
Time the run failed.
completed_at
Time the run was completed.
incomplete_details
Incomplete details.
model
Model.
instructions
Instructions.
tools
Tools.
metadata
Metadata.
usage
Usage.
temperature
Temperature.
top_p
Top p.
max_prompt_tokens
Maximum prompt tokens.
max_completion_tokens
Maximum completion tokens.
truncation_strategy
Truncation strategy.
tool_choice
Tool choice.
response_format
Response format.
Methods
Method new()
Initialize a Run object. If thread_id
and run_id
are provided, the Run object is initialized with the corresponding run. If thread_id
and assistant_id
are provided, a new run is created.
Usage
Run$new(
thread_id = NULL,
run_id = NULL,
assistant_id = NULL,
...,
resp = NULL,
.async = FALSE
)
Method await()
Perform tool calls asynchronously. Returns a promise.
Usage
Run$await(env = parent.frame())
Method do_tool_calls()
Perform tool calls. Returns a list of tool outputs.
Usage
Run$do_tool_calls(env = parent.frame())
Methods
Inherited methods
Method stream_async()
Stream the run asynchronously.
Usage
RunStream$stream_async(
on_message_delta = function(data) {
},
on_message = function(msg) {
},
on_run_step_delta = function(data) {
},
on_run_step = function(step) {
},
on_event = function(event) {
},
env = parent.frame()
)
Arguments
on_message_delta
A callback function to handle message delta events.
on_message
A callback function to handle all message events.
on_run_step_delta
A callback function to handle run step delta events.
on_run_step
A callback function to handle all run step events.
on_event
A callback function to handle all events.
env
Environment to evaluate tool calls.