Tool Call Data • Rust AI Agent SDK

ToolCallData: Tool call data for streaming events.

ToolCallData

Defined in the streaming module.

Rust AI Agent SDK

Tool call data for streaming events.

Diagram

uses

returns

Agent

Tool: ToolCallData

Result

Fields

NameTypeDescription
nameStringTool name
argumentsStringTool arguments (partial JSON)
idOption<String>Tool call ID
indexOption<usize>Index in the tool calls array

Methods

new

rust
fn new(name: impl Into<String>) -> Self

Create new tool call data

Parameters:

NameType
nameimpl Into&lt;String&gt;

arguments

rust
fn arguments(mut self, args: impl Into<String>) -> Self

Set arguments

Parameters:

NameType
argsimpl Into&lt;String&gt;

id

rust
fn id(mut self, id: impl Into<String>) -> Self

Set ID

Parameters:

NameType
idimpl Into&lt;String&gt;

Source

View on GitHub

praisonai/src/streaming/mod.rs at line 78


Related Documentation