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

GetFunctionCall

Get function callback information

method : public : GetFunctionCall() ~ Collection.Tuple.Triplet<String,String,String>
Return
TypeDescription
Triplet<String,String,String>pair function name and calling parameters in JSON format

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

IsFunctionCall

Get function callback information

method : public : IsFunctionCall() ~ Bool

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

SubmitToolOutputs

Submits a tool's response

method : public : SubmitToolOutputs(func_response_json:JsonElement, func_callback_id:String, token:String) ~ Bool
Parameters
NameTypeDescription
func_response_jsonJsonElementresponse in JSON format
func_callback_idStringfunction callback ID
tokenStringAPI token

Return
TypeDescription
Booltrue if successful, false otherwise

ToString

String representation of the object

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