ai 0.4.0

Simple to use LLM library for Rust with streaming, tool calling, OAuth helpers, and a lightweight agent loop
Documentation
#[derive(Debug, thiserror::Error)]
pub enum AgentError {
    #[error(transparent)]
    Ai(#[from] crate::Error),

    #[error("agent is already processing")]
    AlreadyProcessing,

    #[error("no messages to continue from")]
    NoMessagesToContinue,

    #[error("cannot continue from message role: assistant")]
    CannotContinueFromAssistant,

    #[error("tool {0} not found")]
    ToolNotFound(String),

    #[error("operation aborted")]
    Aborted,

    #[error("agent event stream closed before producing final messages")]
    StreamClosed,

    #[error("{0}")]
    Other(String),
}

pub type AgentResult<T> = std::result::Result<T, AgentError>;