Skip to main content

Module cli_chatbot

Module cli_chatbot 

Source
Expand description

A terminal chat loop over an agent. A terminal chat loop over an agent.

use rig_agent::{Agent, agent::StreamToStdoutError, integrations::cli_chatbot::ChatBot};
async fn chat(agent: Agent) -> Result<(), StreamToStdoutError> {
    ChatBot::new(agent).max_turns(3).run().await
}

Structsยง

ChatBot
A terminal chat loop over an Agent that streams each answer as it is produced; see ChatBot::run.