llm-stack 0.7.0

Core traits, types, and tools for the llm-stack SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Tool error types.

/// Error returned by tool execution.
#[derive(Debug, thiserror::Error)]
#[error("{message}")]
pub struct ToolError {
    /// Human-readable error description.
    pub message: String,
}

impl ToolError {
    /// Creates a new tool error with the given message.
    pub fn new(message: impl Into<String>) -> Self {
        Self {
            message: message.into(),
        }
    }
}