Skip to content



All async methods that have an _async suffix have sync equivalents that can be called with out the suffix e.g. run() and await run_async().


The Run class represents a single execution of an assistant.


Name Type Description
thread Thread

The thread in which the run is executed.

assistant Assistant

The assistant that is being run.

model str

The model used by the assistant.

instructions str

Replacement instructions for the run.

additional_instructions str

Additional instructions to append to the assistant's instructions.

tools list[Union[AssistantTool, Callable]]

Replacement tools for the run.

additional_tools list[AssistantTool]

Additional tools to append to the assistant's tools.

tool_choice Union[Literal['auto', 'none', 'required'], AssistantTool]
                                    The tool use behaviour for the run.
run Run

The OpenAI run object.

data Any

Any additional data associated with the run.

cancel_async async

Cancels the run.

refresh_async async

Refreshes the run.