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
Agentthat streams each answer as it is produced; seeChatBot::run.