Run R6 class
Run R6 class
RunStream R6 class
RunStream R6 class
Public fields
idRun ID.
created_atTime the run was created.
thread_idThread ID.
assistant_idAssistant ID.
statusRun status.
required_actionRequired action.
last_errorLast error.
started_atTime the run was started.
expires_atTime the run expires.
cancelled_atTime the run was cancelled.
failed_atTime the run failed.
completed_atTime the run was completed.
incomplete_detailsIncomplete details.
modelModel.
instructionsInstructions.
toolsTools.
metadataMetadata.
usageUsage.
temperatureTemperature.
top_pTop p.
max_prompt_tokensMaximum prompt tokens.
max_completion_tokensMaximum completion tokens.
truncation_strategyTruncation strategy.
tool_choiceTool choice.
response_formatResponse 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_deltaA callback function to handle message delta events.
on_messageA callback function to handle all message events.
on_run_step_deltaA callback function to handle run step delta events.
on_run_stepA callback function to handle all run step events.
on_eventA callback function to handle all events.
envEnvironment to evaluate tool calls.
