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

x/openai/core.ts>maybeMultipartFormRequestOptions

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Go to Latest
variable maybeMultipartFormRequestOptions
import { maybeMultipartFormRequestOptions } from "https://deno.land/x/openai@v4.61.1/core.ts";

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.

type

<T = Record<string, unknown>>(opts: RequestOptions<T>) => Promise<RequestOptions<T | MultipartBody>>