Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/uploads.ts

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
import * as openai from "https://deno.land/x/openai@v4.58.1/uploads.ts";

Variables

The BlobLike type omits arrayBuffer() because @types/node-fetch@^2.6.4 lacks it; but this check adds the arrayBuffer() method type because it is available and used at runtime

Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. Otherwise returns the request as is.

Functions

Helper for creating a File to pass to an SDK upload method from a variety of different data formats

Interfaces

Intended to match web.Blob, node.Blob, node-fetch.Blob, etc.

Intended to match web.File, node.File, node-fetch.File, etc.

Intended to match web.Response, node.Response, node-fetch.Response, etc.

Type Aliases

Typically, this is a native "File" class.