Skip to main content
Module

x/openai/core.ts>APIClient#prepareRequest

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

Used as a callback for mutating the given RequestInit object.

This is useful for cases where you want to add certain headers based off of the request properties, e.g. method or url.

Parameters

request: RequestInit
unnamed 1: { url: string; options: FinalRequestOptions; }

Returns

Promise<void>