Skip to main content

BotProtocol

Defined in the protocols module.
Rust AI Agent SDK Bot protocol for chat integrations.

Methods

name

fn name(&self) -> &str
Get bot name

on_message

async fn on_message(&self, message: BotMessage) -> Result<BotResponse>
Handle incoming message Parameters:
NameType
messageBotMessage

on_command

async fn on_command(&self, command: &str, args: &[&str]) -> Result<BotResponse>
Handle command Parameters:
NameType
command&str
args&[&str]

start

async fn start(&mut self) -> Result<()>
Start the bot

stop

async fn stop(&mut self) -> Result<()>
Stop the bot

Source

View on GitHub

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