Function isLegacyJsonBlob

  • Detect whether a stored blob is legacy JSON text or binary format. JSON blobs start with [ (0x5B); binary blobs start with raw float bytes.

    Parameters

    • blob: string | Buffer<ArrayBufferLike>

      The stored embedding data.

    Returns boolean

    True if the blob is legacy JSON-encoded text.