Neutrome SDK reference
    Preparing search index...

    Function decodeToolCall

    • Decodes one tool call fragment.

      Parameters

      Returns ToolCall | null

      The decoded fragment, or null when the instruction is not a tool delta.

      ToolCallError when the payload is present but malformed.

      for (const instruction of chunk.code) {
      const call = delta.decodeToolCall(instruction);
      if (call?.name) console.log(call.name);
      }