Run
Represents an execution run on a thread
Operations
- Create
- GetCreatedAt
- GetFunctionCall
- GetId
- GetObject
- GetStatus
- IsFunctionCall
- Load
- Refresh
- SubmitToolOutputs
- ToString
Create
Create a run
function : Create(assistant:API.OpenAI.Assistant, thread:API.OpenAI.Thread, token:String) ~ API.OpenAI.Run
Parameters
Name | Type | Description |
---|---|---|
assistant | API.OpenAI.Assistant | the assistant to use to execute this run |
thread | API.OpenAI.Thread | thread to run |
token | String | API token |
Return
Type | Description |
---|---|
API.OpenAI.Run | newly created Run |
GetCreatedAt
Unix timestamp (in seconds) of when the object instance was created
method : public : GetCreatedAt() ~ Int
Return
Type | Description |
---|---|
Int | time with the object instance was created |
GetFunctionCall
Get function callback information
method : public : GetFunctionCall() ~ Collection.Tuple.Triplet<String,String,String>
Return
Type | Description |
---|---|
CollectionTupleTriplet<String,String,String> | pair function name and calling parameters in JSON format |
GetId
Get object instance API ID
method : public : GetId() ~ String
Return
Type | Description |
---|---|
String | instance ID |
GetObject
Get the object type
method : public : GetObject() ~ String
Return
Type | Description |
---|---|
String | object 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
Name | Type | Description |
---|---|---|
id | String | run ID |
thread | API.OpenAI.Thread | instance associated with run |
token | String | API token |
Return
Type | Description |
---|---|
API.OpenAI.Run | loaded Run |
Refresh
Refreshed the run's data such as status
method : public : Refresh(token:String) ~ Bool
Parameters
Name | Type | Description |
---|---|---|
token | String | API token |
Return
Type | Description |
---|---|
Bool | newly created Run |
SubmitToolOutputs
Submits a tool's response
method : public : SubmitToolOutputs(func_response_json:JsonElement, func_callback_id:String, token:String) ~ Bool
Parameters
Name | Type | Description |
---|---|---|
func_response_json | JsonElement | response in JSON format |
func_callback_id | String | function callback ID |
token | String | API token |
Return
Type | Description |
---|---|
Bool | true if successful, false otherwise |
ToString
String representation of the object
method : public : ToString() ~ String
Return
Type | Description |
---|---|
String | string representation |