All Bundles
Message
Create messages within threads
Derived from: EndPoint
Operations
Create
Loads a message
function : Create(role:String, content:String, thread:API.OpenAI.Thread, token:String) ~ API.OpenAI.Message
Parameters
Name | Type | Description |
---|
role | String | role of the entity that is creating the message |
content | String | content of the message. |
thread | Thread | thread associated with message |
token | String | API token |
Return
Type | Description |
---|
Message | loaded Message |
Create a message.
function : Create(role:String, content:String, thread:API.OpenAI.Thread, files:Vector<API.OpenAI.File>, token:String) ~ API.OpenAI.Message
Parameters
Name | Type | Description |
---|
role | String | role of the entity that is creating the message |
content | String | content of the message. |
thread | Thread | thread associated with message |
files | File<> | list to attach to the message |
token | String | API token |
Return
Type | Description |
---|
Message | newly created message |
GetContents
Get the content of the message
method : public : GetContents() ~ Contents
Return
Type | Description |
---|
Contents | list of messages with roles |
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 |
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 |
GetRole
Get the role of the entity that is creating the message
method : public : GetRole() ~ String
Return
Type | Description |
---|
String | role of the entity that is creating the message |
GetThreadId
Get the ID of the thread associated with message
method : public : GetThreadId() ~ String
Return
Type | Description |
---|
String | thread ID |
ListMessages
Loads a messages associated with thread
function : ListMessages(thread:API.OpenAI.Thread, token:String) ~ Vector<API.OpenAI.Message>
Parameters
Name | Type | Description |
---|
thread | Thread | thread associated with message |
token | String | API token |
Return
Type | Description |
---|
Message<> | messages associated with thread |
Load
Loads a message
function : Load(id:String, thread:API.OpenAI.Thread, token:String) ~ API.OpenAI.Message
Parameters
Name | Type | Description |
---|
id | String | message ID |
thread | Thread | thread associated with message |
token | String | API token |
Return
Type | Description |
---|
Message | loaded Message |
ToString
String representation of the object
method : public : ToString() ~ String
Return
Type | Description |
---|
String | string representation |