All Bundles
Conversation
Chat conversation assistant
Operations
New
Constructor
New(assistant:Assistant, enable_spinner:Bool, token:String)
Parameters
Name | Type | Description |
---|
assistant | Assistant | assistant |
enable_spinner | Bool | true to enable console spinner, false to disable |
token | String | API token |
Constructor
New(assistant:Assistant, token:String)
Parameters
Name | Type | Description |
---|
assistant | Assistant | assistant |
token | String | API token |
AddFunction
Maps an OpenAI function call (via webhooks)
method : public : AddFunction(name:String, func:(JsonElement)~JsonElement) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Close
Closes the chat session
method : public : Close() ~ Bool
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Send
Sends a message to the assistant
method : public : Send(query:String, user:String) ~ Message
Parameters
Name | Type | Description |
---|
query | String | message to send |
user | String | user name |
Return
Type | Description |
---|
Message | response message, Nil of error |