Bundle OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai.
Thread
Create threads that assistants can interact with
Inherits: EndPoint
Operations
Create # function
Creates a thread
function : Create(token:String) ~ API.OpenAI.ThreadParameters
| Name | Type | Description |
|---|---|---|
| token | String | API token |
Return
| Type | Description |
|---|---|
| Thread | newly created thread |
Delete # function
Loads an existing thread
function : Delete(id:String, token:String) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| id | String | ID of the model to use |
| token | String | API token |
Return
| Type | Description |
|---|---|
| Bool | loaded thread |
GetCreatedAt #
Unix timestamp (in seconds) of when the object instance was created
method : public : GetCreatedAt() ~ IntReturn
| Type | Description |
|---|---|
| Int | time with the object instance was created |
GetId #
Get object instance API ID
method : public : GetId() ~ StringReturn
| Type | Description |
|---|---|
| String | instance ID |
GetObject #
Get the object type
method : public : GetObject() ~ StringReturn
| Type | Description |
|---|---|
| String | object type |