Bot Response • Rust AI Agent SDK
BotResponse: A bot response.
BotResponse
Defined in the protocols module.
Rust AI Agent SDK
A bot response.
Fields
| Name | Type | Description |
|---|---|---|
content | String | Response content |
reply_to | Option<String> | Reply to message ID |
attachments | Vec<BotAttachment> | Attachments |
actions | Vec<BotAction> | Actions/buttons |
Methods
text
fn text(content: impl Into<String>) -> SelfCreate a simple text response
Parameters:
| Name | Type |
|---|---|
content | impl Into<String> |
reply_to
fn reply_to(mut self, message_id: impl Into<String>) -> SelfSet reply to
Parameters:
| Name | Type |
|---|---|
message_id | impl Into<String> |
attachment
fn attachment(mut self, attachment: BotAttachment) -> SelfAdd an attachment
Parameters:
| Name | Type |
|---|---|
attachment | BotAttachment |
action
fn action(mut self, action: BotAction) -> SelfAdd an action
Parameters:
| Name | Type |
|---|---|
action | BotAction |
Source
View on GitHubpraisonai/src/protocols/mod.rs at line 421