Skip to main content

BotResponse

Defined in the protocols module.
Rust AI Agent SDK A bot response.

Fields

NameTypeDescription
contentStringResponse content
reply_toOption<String>Reply to message ID
attachmentsVec<BotAttachment>Attachments
actionsVec<BotAction>Actions/buttons

Methods

text

fn text(content: impl Into<String>) -> Self
Create a simple text response Parameters:
NameType
contentimpl Into&lt;String&gt;

reply_to

fn reply_to(mut self, message_id: impl Into<String>) -> Self
Set reply to Parameters:
NameType
message_idimpl Into&lt;String&gt;

attachment

fn attachment(mut self, attachment: BotAttachment) -> Self
Add an attachment Parameters:
NameType
attachmentBotAttachment

action

fn action(mut self, action: BotAction) -> Self
Add an action Parameters:
NameType
actionBotAction

Source

View on GitHub

praisonai/src/protocols/mod.rs at line 421