メインコンテンツまでスキップ

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

OpenAI.constructor

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:90

Properties

apiKey

apiKey: string

Inherited from

OpenAI.apiKey

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:73


audio

audio: Audio

Inherited from

OpenAI.audio

Defined in

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


baseURL

baseURL: string

Inherited from

OpenAI.baseURL

Defined in

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


beta

beta: Beta

Inherited from

OpenAI.beta

Defined in

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


chat

chat: Chat

Inherited from

OpenAI.chat

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:92


completions

completions: Completions

Inherited from

OpenAI.completions

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:91


embeddings

embeddings: Embeddings

Inherited from

OpenAI.embeddings

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:93


files

files: Files

Inherited from

OpenAI.files

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:94


fineTuning

fineTuning: FineTuning

Inherited from

OpenAI.fineTuning

Defined in

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


httpAgent

httpAgent: undefined | Agent

Inherited from

OpenAI.httpAgent

Defined in

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


idempotencyHeader

Protected Optional idempotencyHeader: string

Inherited from

OpenAI.idempotencyHeader

Defined in

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


images

images: Images

Inherited from

OpenAI.images

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:95


maxRetries

maxRetries: number

Inherited from

OpenAI.maxRetries

Defined in

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


models

models: Models

Inherited from

OpenAI.models

Defined in

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


moderations

moderations: Moderations

Inherited from

OpenAI.moderations

Defined in

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


organization

organization: null | string

Inherited from

OpenAI.organization

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:74


timeout

timeout: number

Inherited from

OpenAI.timeout

Defined in

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


APIConnectionError

Static APIConnectionError: typeof APIConnectionError

Inherited from

OpenAI.APIConnectionError

Defined in

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


APIConnectionTimeoutError

Static APIConnectionTimeoutError: typeof APIConnectionTimeoutError

Inherited from

OpenAI.APIConnectionTimeoutError

Defined in

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


APIError

Static APIError: typeof APIError

Inherited from

OpenAI.APIError

Defined in

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


APIUserAbortError

Static APIUserAbortError: typeof APIUserAbortError

Inherited from

OpenAI.APIUserAbortError

Defined in

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


AuthenticationError

Static AuthenticationError: typeof AuthenticationError

Inherited from

OpenAI.AuthenticationError

Defined in

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


BadRequestError

Static BadRequestError: typeof BadRequestError

Inherited from

OpenAI.BadRequestError

Defined in

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


ConflictError

Static ConflictError: typeof ConflictError

Inherited from

OpenAI.ConflictError

Defined in

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


InternalServerError

Static InternalServerError: typeof InternalServerError

Inherited from

OpenAI.InternalServerError

Defined in

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


NotFoundError

Static NotFoundError: typeof NotFoundError

Inherited from

OpenAI.NotFoundError

Defined in

node_modules/.pnpm/openai@4.26.1/node_modules/openai/index.d.mts:110


OpenAI

Static OpenAI: typeof OpenAI

Inherited from

OpenAI.OpenAI

Defined in

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


OpenAIError

Static OpenAIError: typeof OpenAIError

Inherited from

OpenAI.OpenAIError

Defined in

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


PermissionDeniedError

Static PermissionDeniedError: typeof PermissionDeniedError

Inherited from

OpenAI.PermissionDeniedError

Defined in

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


RateLimitError

Static RateLimitError: typeof RateLimitError

Inherited from

OpenAI.RateLimitError

Defined in

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


UnprocessableEntityError

Static UnprocessableEntityError: typeof UnprocessableEntityError

Inherited from

OpenAI.UnprocessableEntityError

Defined in

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

Methods

authHeaders

authHeaders(): Object

Returns

Object

NameType
api-keystring

Overrides

OpenAI.authHeaders

Defined in

packages/core/src/llm/open_ai.ts:7


buildRequest

buildRequest<Req>(options): Object

Type parameters

Name
Req

Parameters

NameType
optionsFinalRequestOptions<Req>

Returns

Object

NameType
reqRequestInit
timeoutnumber
urlstring

Inherited from

OpenAI.buildRequest

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.buildURL

Defined in

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


defaultHeaders

defaultHeaders(opts): Headers

Parameters

NameType
optsFinalRequestOptions<unknown>

Returns

Headers

Inherited from

OpenAI.defaultHeaders

Defined in

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


defaultIdempotencyKey

defaultIdempotencyKey(): string

Returns

string

Inherited from

OpenAI.defaultIdempotencyKey

Defined in

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


defaultQuery

defaultQuery(): undefined | DefaultQuery

Returns

undefined | DefaultQuery

Inherited from

OpenAI.defaultQuery

Defined in

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


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

OpenAI.delete

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.fetchWithTimeout

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.get

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.getAPIList

Defined in

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


getRequestClient

getRequestClient(): RequestClient

Returns

RequestClient

Inherited from

OpenAI.getRequestClient

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.makeStatusError

Defined in

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


parseHeaders

parseHeaders(headers): Record<string, string>

Parameters

NameType
headersundefined | null | HeadersInit

Returns

Record<string, string>

Inherited from

OpenAI.parseHeaders

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.patch

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.post

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.prepareOptions

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.prepareRequest

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.put

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.request

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.requestAPIList

Defined in

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


stringifyQuery

stringifyQuery(query): string

Parameters

NameType
queryRecord<string, unknown>

Returns

string

Inherited from

OpenAI.stringifyQuery

Defined in

node_modules/.pnpm/openai@4.26.1/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

OpenAI.validateHeaders

Defined in

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