| runs {openaistream} | R Documentation |
runs Class
Description
runs Class
runs Class
Super class
openaistream::openai -> runs
Methods
Public methods
Inherited methods
Method create()
Create a run.
Usage
runs$create(thread_id, assistant_id, ..., verbosity = 0)
Arguments
thread_idcharacter Required. The ID of the thread to run.
assistant_idcharacter Required. The ID of the assistant to use to execute this run.
...Additional parameters as required by the OpenAI API.For example:model,instructions,tools,metadata
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
A run object.
Method retrieve()
Retrieves a run.
Usage
runs$retrieve(thread_id, run_id, verbosity = 0)
Arguments
thread_idcharacter Required The ID of the thread the run belongs to.
run_idcharacter Required The ID of the run to retrieve.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
The run object matching the specified ID.
Method modify()
Modifies a run.
Usage
runs$modify(thread_id, run_id, ..., verbosity = 0)
Arguments
thread_idcharacter Required The ID of the thread the run belongs to.
run_idcharacter Required The ID of the run to retrieve.
...Additional parameters as required by the OpenAI API.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
The modified run object matching the specified ID.
Method list()
Returns a list of runs for a given thread.
Usage
runs$list(thread_id, ..., verbosity = 0)
Arguments
thread_idcharacter Required The ID of the thread the run belongs to.
...Additional parameters as required by the OpenAI API.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
A list of run objects.
Method submit_tool_outputs()
When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
Usage
runs$submit_tool_outputs(thread_id, run_id, tool_outputs, verbosity = 0)
Arguments
thread_idcharacter Required The ID of the thread the run belongs to.
run_idcharacter Required The ID of the run to retrieve.
tool_outputscharacter Required. A list of tools for which the outputs are being submitted.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
The modified run object matching the specified ID.
Method cancel()
Cancels a run that is in_progress.
Usage
runs$cancel(thread_id, run_id, verbosity = 0)
Arguments
thread_idcharacter Required The ID of the thread the run belongs to.
run_idcharacter Required The ID of the run to retrieve.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
The modified run object matching the specified ID.
Method create_tread()
Create a thread and run it in one request.
Usage
runs$create_tread(assistant_id, ..., verbosity = 0)
Arguments
assistant_idcharacter Required The ID of the assistant to use to execute this run.
...Additional parameters as required by the OpenAI API.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
A run object.
Method steps_retrieve()
Retrieves a run step.
Usage
runs$steps_retrieve(thread_id, run_id, step_id, verbosity = 0)
Arguments
thread_idcharacter Required. The ID of the thread to which the run and run step belongs.
run_idcharacter Required. The ID of the run the step belongs to.
step_idcharacter Required. The ID of the step to retrieve.
verbositynumeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
The run step object matching the specified ID.
Method steps_list()
Returns a list of run steps belonging to a run.
Usage
runs$steps_list(thread_id, run_id, ..., verbosity = 0)
Arguments
thread_idcharacter Required The ID of the thread the run belongs to.
run_idcharacter Required The ID of the run the step belongs to.
...Additional parameters as required by the OpenAI API.
verbositynumeric Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.)
Returns
A list of run step objects.
Method clone()
The objects of this class are cloneable with this method.
Usage
runs$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.