All Bundles

Run

Represents an execution run on a thread

Derived from: EndPoint

Operations

Create

Create a run

function : Create(assistant:API.OpenAI.Assistant, thread:API.OpenAI.Thread, token:String) ~ API.OpenAI.Run
Parameters
NameTypeDescription
assistantAssistantthe assistant to use to execute this run
threadThreadthread to run
tokenStringAPI token

Return
TypeDescription
Runnewly created Run

GetCreatedAt

Unix timestamp (in seconds) of when the object instance was created

method : public : GetCreatedAt() ~ Int
Return
TypeDescription
Inttime with the object instance was created

GetId

Get object instance API ID

method : public : GetId() ~ String
Return
TypeDescription
Stringinstance ID

GetObject

Get the object type

method : public : GetObject() ~ String
Return
TypeDescription
Stringobject type

GetStatus

The status of the run, which can be either: 'queued', 'in_progress', 'requires_action', 'cancelling', 'cancelled', 'failed', 'completed', or 'expired'.

method : public : GetStatus() ~ String

Load

Loads a run

function : Load(id:String, thread:API.OpenAI.Thread, token:String) ~ API.OpenAI.Run
Parameters
NameTypeDescription
idStringrun ID
threadThreadinstance associated with run
tokenStringAPI token

Return
TypeDescription
Runloaded Run

Refresh

Refreshed the run's data such as status

method : public : Refresh(token:String) ~ Bool
Parameters
NameTypeDescription
tokenStringAPI token

Return
TypeDescription
Boolnewly created Run

ToString

String representation of the object

method : public : ToString() ~ String
Return
TypeDescription
Stringstring representation