All Bundles

Assistant

Builds assistants that can call models and use tools to perform tasks

Derived from: EndPoint

Operations

AddFile

Adds a file to assistant

method : public : AddFile(file:API.OpenAI.File) ~ Bool
Parameters
NameTypeDescription
fileFilefile to add to assistant

Return
TypeDescription
Booltrue if successful, false otherwise

Create

Create an assistant with a model and instructions

function : Create(model:String, token:String) ~ API.OpenAI.Assistant
Parameters
NameTypeDescription
modelStringID of the model to use
tokenStringAPI token

Return
TypeDescription
Assistantassistant

Create an assistant with a model and instructions

function : Create(model:String, name:String, description:String, instructions:String, token:String) ~ API.OpenAI.Assistant
Parameters
NameTypeDescription
modelStringID of the model to use
nameStringname to use
descriptionStringdescription of the assistant.
instructionsStringthe system instructions that the assistant uses
tokenStringAPI token

Return
TypeDescription
Assistantnewly created assistant

Creates an assistant with a model and instructions

function : Create(model:String, name:String, description:String, instructions:String, tools:Vector<String>, files:Vector<API.OpenAI.File>, token:String) ~ API.OpenAI.Assistant
Parameters
NameTypeDescription
modelStringID of the model to use
nameStringname to use
descriptionStringdescription of the assistant.
instructionsStringthe system instructions that the assistant uses
toolsVector<String>list of tool enabled on the assistant
filesFile<>list of file IDs attached to this assistant
tokenStringAPI token

Return
TypeDescription
Assistantnewly created assistant

Creates an assistant with a model and instructions

function : Create(model:String, name:String, description:String, instructions:String, tools:Vector<String>, files:Vector<API.OpenAI.File>, funcs:Vector<FunctionType>, token:String) ~ API.OpenAI.Assistant
Parameters
NameTypeDescription
modelStringID of the model to use
nameStringname to use
descriptionStringdescription of the assistant.
instructionsStringthe system instructions that the assistant uses
toolsVector<String>list of tool enabled on the assistant
filesFile<>list of file IDs attached to this assistant
funcsVector<FunctionType>list of callback function definitions
tokenStringAPI token

Return
TypeDescription
Assistantnewly created assistant

Delete

Deletes an assistant with a model and instructions

function : Delete(id:String, token:String) ~ Bool
Parameters
NameTypeDescription
idStringmodel ID
tokenStringAPI token

Return
TypeDescription
Booltrue if successful, false otherwise

DeleteAll

Deletes all assistants

function : DeleteAll(token:String) ~ Bool
Parameters
NameTypeDescription
tokenStringAPI token

Return
TypeDescription
Booltrue if successful, false otherwise

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

GetDescription

Description of the assistant

method : public : GetDescription() ~ String
Return
TypeDescription
Stringdescription of the assistant

GetId

Get object instance API ID

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

GetInstructions

System instructions that the assistant uses

method : public : GetInstructions() ~ String
Return
TypeDescription
Stringsystem instructions

GetModel

ID of the model to use

method : public : GetModel() ~ String
Return
TypeDescription
StringID of the model to use

GetName

Name of the assistant

method : public : GetName() ~ String
Return
TypeDescription
Stringname of the assistant

GetObject

Get the object type

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

GetVectorStores

List of vector stores associated with the assistant

method : public : GetVectorStores() ~ Vector<String>
Return
TypeDescription
Vector<String>vector stores associated with the assistant

ListAssistants

Returns a list of assistants

function : ListAssistants(token:String) ~ Vector<API.OpenAI.Assistant>
Parameters
NameTypeDescription
tokenStringAPI token

Return
TypeDescription
Assistant<>list of assistants

Load

Loads an assistant with a model and instructions

function : Load(id:String, token:String) ~ API.OpenAI.Assistant
Parameters
NameTypeDescription
idStringmodel ID of the model to use
tokenStringAPI token

Return
TypeDescription
Assistantloaded assistant

LoadByName

Loads or creates an OpenAI file from the local filesystem

function : LoadByName(name:String, token:String) ~ API.OpenAI.Assistant
Parameters
NameTypeDescription
nameStringname lookup
tokenStringAPI token

Return
TypeDescription
Assistantfile reference

ToString

String representation of the object

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