Tool Call Result • Rust AI Agent SDK
ToolCallResult: Result of a tool call during evaluation.
ToolCallResult
Defined in the eval module.
Rust AI Agent SDK
Result of a tool call during evaluation.
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%
graph LR
agent["Agent"] -- "uses" --> tool["Tool: ToolCallResult"]
tool -- "returns" --> result["Result"]
style tool fill:#189AB4,color:#fff
style agent fill:#8B0000,color:#fff
style result fill:#8B0000,color:#fffFields
| Name | Type | Description |
|---|---|---|
name | String | Tool name |
expected | bool | Whether the call was expected |
called | bool | Whether the call was made |
arguments | Option<serde_json::Value> | Arguments used |
result | Option<serde_json::Value> | Result returned |
Methods
new
fn new(name: impl Into<String>, expected: bool, called: bool) -> SelfCreate a new tool call result.
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
expected | bool |
called | bool |
is_correct
fn is_correct(&self) -> boolCheck if correct (expected == called).
Source
View on GitHubpraisonai/src/eval/mod.rs at line 146