langchain.js
    Preparing search index...
    • Extracts the tool call ID from a namespace path.

      Namespaces follow the pattern: ["tools:call_abc123", "model_request:xyz", ...] This function extracts "call_abc123" from the first "tools:" segment.

      Parameters

      • namespace: undefined | string[]

        The namespace array from stream events

      Returns undefined | string

      The tool call ID, or undefined if not found