D-ID Client SDK - v3.0.0-0
    Preparing search index...

    Enumeration ToolCallEvent

    The tool-call events delivered to onToolEvent.

    Switch on the first argument of the handler to tell them apart: it narrows the second argument to the payload that event carries — see ToolEventCallback. The members' values are the wire strings the server sends, so compare against the enum rather than writing the string out. Expressive (V4) agents only.

    import { AgentManagerCallbacks, ToolCallEvent } from '@d-id/client-sdk';

    const callbacks: AgentManagerCallbacks = {
    onToolEvent(event, data) {
    if (event === ToolCallEvent.Started) {
    console.log('started', data.name, data.input);
    }
    },
    };
    Index
    Done: "tool-call/done"

    A tool call finished successfully; the payload is a ToolCallDonePayload, carrying the result the tool returned and how long the call took.

    Error: "tool-call/error"

    A tool call failed; the payload is a ToolCallErrorPayload, carrying the reason in error when the server gave one. The agent carries on with the conversation.

    Started: "tool-call/started"

    The agent has begun a tool call; the payload is a ToolCallStartedPayload, carrying the call's id, the tool's name and the arguments the agent's LLM produced.