Bot Response • Rust AI Agent SDK

BotResponse: A bot response.

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

rust
fn text(content: impl Into<String>) -> Self

Create a simple text response

Parameters:

NameType
contentimpl Into&lt;String&gt;

reply_to

rust
fn reply_to(mut self, message_id: impl Into<String>) -> Self

Set reply to

Parameters:

NameType
message_idimpl Into&lt;String&gt;

attachment

rust
fn attachment(mut self, attachment: BotAttachment) -> Self

Add an attachment

Parameters:

NameType
attachmentBotAttachment

action

rust
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


Related Documentation