AAI SDK
    Preparing search index...

    Function fetchJson

    • GET a URL and return its parsed JSON.

      Returns { error, url } rather than throwing on an HTTP failure or an oversized body, matching what the model-facing builtin returns — a tool that hands the result straight back to the model then says something useful instead of failing the turn.

      Type Parameters

      • T = any

      Parameters

      • url: string | { headers?: Record<string, string>; url: string } & CallOptions
      • Optionaloptions: { headers?: Record<string, string> } & CallOptions

      Returns Promise<T>