Creating Plot Twists
    Preparing search index...

    Type Alias AISource

    AISource:
        | {
            type: "source";
            sourceType: "url";
            id: string;
            url: string;
            title?: string;
        }
        | {
            type: "source";
            sourceType: "document";
            id: string;
            mediaType: string;
            title: string;
            filename?: string;
        }

    A source that has been used as input to generate the response.

    Type Declaration

    • { type: "source"; sourceType: "url"; id: string; url: string; title?: string }
      • type: "source"
      • sourceType: "url"

        A URL source. This is returned by web search RAG models.

      • id: string

        The ID of the source.

      • url: string

        The URL of the source.

      • Optionaltitle?: string

        The title of the source.

    • {
          type: "source";
          sourceType: "document";
          id: string;
          mediaType: string;
          title: string;
          filename?: string;
      }
      • type: "source"
      • sourceType: "document"

        The type of source - document sources reference files/documents.

      • id: string

        The ID of the source.

      • mediaType: string

        IANA media type of the document (e.g., 'application/pdf').

      • title: string

        The title of the document.

      • Optionalfilename?: string

        Optional filename of the document.