본문으로 건너뛰기

Class: AzureOpenAI

Hierarchy

  • OpenAI

    AzureOpenAI

Constructors

constructor

new AzureOpenAI(«destructured»?): AzureOpenAI

API Client for interfacing with the OpenAI API.

Parameters

NameType
«destructured»ClientOptions

Returns

AzureOpenAI

Inherited from

OrigOpenAI.constructor

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:96

Properties

apiKey

apiKey: string

Inherited from

OrigOpenAI.apiKey

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:77


audio

audio: Audio

Inherited from

OrigOpenAI.audio

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:102


baseURL

baseURL: string

Inherited from

OrigOpenAI.baseURL

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:62


batches

batches: Batches

Inherited from

OrigOpenAI.batches

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:107


beta

beta: Beta

Inherited from

OrigOpenAI.beta

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:106


chat

chat: Chat

Inherited from

OrigOpenAI.chat

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:98


completions

completions: Completions

Inherited from

OrigOpenAI.completions

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:97


embeddings

embeddings: Embeddings

Inherited from

OrigOpenAI.embeddings

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:99


files

files: Files

Inherited from

OrigOpenAI.files

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:100


fineTuning

fineTuning: FineTuning

Inherited from

OrigOpenAI.fineTuning

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:105


httpAgent

httpAgent: undefined | Agent

Inherited from

OrigOpenAI.httpAgent

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:65


idempotencyHeader

Protected Optional idempotencyHeader: string

Inherited from

OrigOpenAI.idempotencyHeader

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:67


images

images: Images

Inherited from

OrigOpenAI.images

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:101


maxRetries

maxRetries: number

Inherited from

OrigOpenAI.maxRetries

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:63


models

models: Models

Inherited from

OrigOpenAI.models

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:104


moderations

moderations: Moderations

Inherited from

OrigOpenAI.moderations

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:103


organization

organization: null | string

Inherited from

OrigOpenAI.organization

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:78


project

project: null | string

Inherited from

OrigOpenAI.project

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:79


timeout

timeout: number

Inherited from

OrigOpenAI.timeout

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:64


APIConnectionError

Static APIConnectionError: typeof APIConnectionError

Inherited from

OrigOpenAI.APIConnectionError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:114


APIConnectionTimeoutError

Static APIConnectionTimeoutError: typeof APIConnectionTimeoutError

Inherited from

OrigOpenAI.APIConnectionTimeoutError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:115


APIError

Static APIError: typeof APIError

Inherited from

OrigOpenAI.APIError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:113


APIUserAbortError

Static APIUserAbortError: typeof APIUserAbortError

Inherited from

OrigOpenAI.APIUserAbortError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:116


AuthenticationError

Static AuthenticationError: typeof AuthenticationError

Inherited from

OrigOpenAI.AuthenticationError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:121


BadRequestError

Static BadRequestError: typeof BadRequestError

Inherited from

OrigOpenAI.BadRequestError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:120


ConflictError

Static ConflictError: typeof ConflictError

Inherited from

OrigOpenAI.ConflictError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:118


InternalServerError

Static InternalServerError: typeof InternalServerError

Inherited from

OrigOpenAI.InternalServerError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:122


NotFoundError

Static NotFoundError: typeof NotFoundError

Inherited from

OrigOpenAI.NotFoundError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:117


OpenAI

Static OpenAI: typeof OpenAI

Inherited from

OrigOpenAI.OpenAI

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:111


OpenAIError

Static OpenAIError: typeof OpenAIError

Inherited from

OrigOpenAI.OpenAIError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:112


PermissionDeniedError

Static PermissionDeniedError: typeof PermissionDeniedError

Inherited from

OrigOpenAI.PermissionDeniedError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:123


RateLimitError

Static RateLimitError: typeof RateLimitError

Inherited from

OrigOpenAI.RateLimitError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:119


UnprocessableEntityError

Static UnprocessableEntityError: typeof UnprocessableEntityError

Inherited from

OrigOpenAI.UnprocessableEntityError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:124


fileFromPath

Static fileFromPath: (path: string, options?: FileFromPathOptions) => Promise<File>(path: string, filename?: string, options?: FileFromPathOptions) => Promise<File>

Type declaration

▸ (path, options?): Promise<File>

Parameters
NameType
pathstring
options?FileFromPathOptions
Returns

Promise<File>

▸ (path, filename?, options?): Promise<File>

Parameters
NameType
pathstring
filename?string
options?FileFromPathOptions
Returns

Promise<File>

Inherited from

OrigOpenAI.fileFromPath

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:126


toFile

Static toFile: (value: ToFileInput | PromiseLike<ToFileInput>, name?: null | string, options?: FilePropertyBag) => Promise<FileLike>

Type declaration

▸ (value, name?, options?): Promise<FileLike>

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

Parameters
NameTypeDescription
valueToFileInput | PromiseLike<ToFileInput>the raw content of the file. Can be an Uploadable, BlobLikePart, or AsyncIterable of BlobLikeParts
name?null | stringthe name of the file. If omitted, toFile will try to determine a file name from bits if possible
options?FilePropertyBagadditional properties
Returns

Promise<FileLike>

a File with the given properties

Inherited from

OrigOpenAI.toFile

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:125

Methods

authHeaders

authHeaders(): Object

Returns

Object

NameType
api-keystring

Overrides

OrigOpenAI.authHeaders

Defined in

packages/core/src/llm/openai.ts:47


buildRequest

buildRequest<Req>(options): Object

Type parameters

Name
Req

Parameters

NameType
optionsFinalRequestOptions<Req>

Returns

Object

NameType
reqRequestInit
timeoutnumber
urlstring

Inherited from

OrigOpenAI.buildRequest

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:100


buildURL

buildURL<Req>(path, query): string

Type parameters

Name
Req

Parameters

NameType
pathstring
queryundefined | null | Req

Returns

string

Inherited from

OrigOpenAI.buildURL

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:125


defaultHeaders

defaultHeaders(opts): Headers

Parameters

NameType
optsFinalRequestOptions<unknown>

Returns

Headers

Inherited from

OrigOpenAI.defaultHeaders

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:109


defaultIdempotencyKey

defaultIdempotencyKey(): string

Returns

string

Inherited from

OrigOpenAI.defaultIdempotencyKey

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:91


defaultQuery

defaultQuery(): undefined | DefaultQuery

Returns

undefined | DefaultQuery

Inherited from

OrigOpenAI.defaultQuery

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/index.d.mts:108


delete

delete<Req, Rsp>(path, opts?): APIPromise<Rsp>

Type parameters

Name
Req
Rsp

Parameters

NameType
pathstring
opts?PromiseOrValue<RequestOptions<Req>>

Returns

APIPromise<Rsp>

Inherited from

OrigOpenAI.delete

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:96


fetchWithTimeout

fetchWithTimeout(url, init, ms, controller): Promise<Response>

Parameters

NameType
urlRequestInfo
initundefined | RequestInit
msnumber
controllerAbortController

Returns

Promise<Response>

Inherited from

OrigOpenAI.fetchWithTimeout

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:127


get

get<Req, Rsp>(path, opts?): APIPromise<Rsp>

Type parameters

Name
Req
Rsp

Parameters

NameType
pathstring
opts?PromiseOrValue<RequestOptions<Req>>

Returns

APIPromise<Rsp>

Inherited from

OrigOpenAI.get

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:92


getAPIList

getAPIList<Item, PageClass>(path, Page, opts?): PagePromise<PageClass, Item>

Type parameters

NameType
ItemItem
PageClassextends AbstractPage<Item> = AbstractPage<Item>

Parameters

NameType
pathstring
Page(...args: any[]) => PageClass
opts?RequestOptions<any>

Returns

PagePromise<PageClass, Item>

Inherited from

OrigOpenAI.getAPIList

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:98


getRequestClient

getRequestClient(): RequestClient

Returns

RequestClient

Inherited from

OrigOpenAI.getRequestClient

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:128


makeStatusError

makeStatusError(status, error, message, headers): APIError

Parameters

NameType
statusundefined | number
errorundefined | Object
messageundefined | string
headersundefined | Headers

Returns

APIError

Inherited from

OrigOpenAI.makeStatusError

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:121


parseHeaders

parseHeaders(headers): Record<string, string>

Parameters

NameType
headersundefined | null | HeadersInit

Returns

Record<string, string>

Inherited from

OrigOpenAI.parseHeaders

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:120


patch

patch<Req, Rsp>(path, opts?): APIPromise<Rsp>

Type parameters

Name
Req
Rsp

Parameters

NameType
pathstring
opts?PromiseOrValue<RequestOptions<Req>>

Returns

APIPromise<Rsp>

Inherited from

OrigOpenAI.patch

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:94


post

post<Req, Rsp>(path, opts?): APIPromise<Rsp>

Type parameters

Name
Req
Rsp

Parameters

NameType
pathstring
opts?PromiseOrValue<RequestOptions<Req>>

Returns

APIPromise<Rsp>

Inherited from

OrigOpenAI.post

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:93


prepareOptions

prepareOptions(options): Promise<void>

Used as a callback for mutating the given FinalRequestOptions object.

Parameters

NameType
optionsFinalRequestOptions<unknown>

Returns

Promise<void>

Inherited from

OrigOpenAI.prepareOptions

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:109


prepareRequest

prepareRequest(request, «destructured»): Promise<void>

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

NameType
requestRequestInit
«destructured»Object
› optionsFinalRequestOptions<unknown>
› urlstring

Returns

Promise<void>

Inherited from

OrigOpenAI.prepareRequest

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:116


put

put<Req, Rsp>(path, opts?): APIPromise<Rsp>

Type parameters

Name
Req
Rsp

Parameters

NameType
pathstring
opts?PromiseOrValue<RequestOptions<Req>>

Returns

APIPromise<Rsp>

Inherited from

OrigOpenAI.put

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:95


request

request<Req, Rsp>(options, remainingRetries?): APIPromise<Rsp>

Type parameters

Name
Req
Rsp

Parameters

NameType
optionsPromiseOrValue<FinalRequestOptions<Req>>
remainingRetries?null | number

Returns

APIPromise<Rsp>

Inherited from

OrigOpenAI.request

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:122


requestAPIList

requestAPIList<Item, PageClass>(Page, options): PagePromise<PageClass, Item>

Type parameters

NameType
Itemunknown
PageClassextends AbstractPage<Item> = AbstractPage<Item>

Parameters

NameType
Page(...args: [client: APIClient, response: Response, body: unknown, options: FinalRequestOptions<unknown>]) => PageClass
optionsFinalRequestOptions<unknown>

Returns

PagePromise<PageClass, Item>

Inherited from

OrigOpenAI.requestAPIList

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:124


stringifyQuery

stringifyQuery(query): string

Parameters

NameType
queryRecord<string, unknown>

Returns

string

Inherited from

OrigOpenAI.stringifyQuery

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:126


validateHeaders

validateHeaders(headers, customHeaders): void

Override this to add your own headers validation:

Parameters

NameType
headersHeaders
customHeadersHeaders

Returns

void

Inherited from

OrigOpenAI.validateHeaders

Defined in

node_modules/.pnpm/openai@4.38.3/node_modules/openai/core.d.ts:90