Class: AzureOpenAI
Extends
OpenAI
Constructors
new AzureOpenAI()
new AzureOpenAI(
__namedParameters
?):AzureOpenAI
API Client for interfacing with the OpenAI API.
Parameters
• __namedParameters?: ClientOptions
Returns
Inherited from
OrigOpenAI.constructor
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:96
Properties
apiKey
apiKey:
string
Inherited from
OrigOpenAI.apiKey
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:77
audio
audio:
Audio
Inherited from
OrigOpenAI.audio
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:102
baseURL
baseURL:
string
Inherited from
OrigOpenAI.baseURL
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:63
batches
batches:
Batches
Inherited from
OrigOpenAI.batches
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:107
beta
beta:
Beta
Inherited from
OrigOpenAI.beta
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:106
chat
chat:
Chat
Inherited from
OrigOpenAI.chat
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:98
completions
completions:
Completions
Inherited from
OrigOpenAI.completions
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:97
embeddings
embeddings:
Embeddings
Inherited from
OrigOpenAI.embeddings
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:99
files
files:
Files
Inherited from
OrigOpenAI.files
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:100
fineTuning
fineTuning:
FineTuning
Inherited from
OrigOpenAI.fineTuning
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:105
httpAgent
httpAgent:
undefined
|Agent
Inherited from
OrigOpenAI.httpAgent
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:66
idempotencyHeader?
protected
optional
idempotencyHeader:string
Inherited from
OrigOpenAI.idempotencyHeader
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:68
images
images:
Images
Inherited from
OrigOpenAI.images
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:101
maxRetries
maxRetries:
number
Inherited from
OrigOpenAI.maxRetries
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:64
models
models:
Models
Inherited from
OrigOpenAI.models
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:104
moderations
moderations:
Moderations
Inherited from
OrigOpenAI.moderations
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:103
organization
organization:
null
|string
Inherited from
OrigOpenAI.organization
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:78
project
project:
null
|string
Inherited from
OrigOpenAI.project
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:79
timeout
timeout:
number
Inherited from
OrigOpenAI.timeout
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:65
APIConnectionError
static
APIConnectionError: typeofAPIConnectionError
Inherited from
OrigOpenAI.APIConnectionError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:114
APIConnectionTimeoutError
static
APIConnectionTimeoutError: typeofAPIConnectionTimeoutError
Inherited from
OrigOpenAI.APIConnectionTimeoutError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:115
APIError
static
APIError: typeofAPIError
Inherited from
OrigOpenAI.APIError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:113
APIUserAbortError
static
APIUserAbortError: typeofAPIUserAbortError
Inherited from
OrigOpenAI.APIUserAbortError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:116
AuthenticationError
static
AuthenticationError: typeofAuthenticationError
Inherited from
OrigOpenAI.AuthenticationError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:121
BadRequestError
static
BadRequestError: typeofBadRequestError
Inherited from
OrigOpenAI.BadRequestError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:120
ConflictError
static
ConflictError: typeofConflictError
Inherited from
OrigOpenAI.ConflictError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:118
InternalServerError
static
InternalServerError: typeofInternalServerError
Inherited from
OrigOpenAI.InternalServerError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:122
NotFoundError
static
NotFoundError: typeofNotFoundError
Inherited from
OrigOpenAI.NotFoundError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:117
OpenAI
static
OpenAI: typeofOpenAI
Inherited from
OrigOpenAI.OpenAI
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:111
OpenAIError
static
OpenAIError: typeofOpenAIError
Inherited from
OrigOpenAI.OpenAIError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:112
PermissionDeniedError
static
PermissionDeniedError: typeofPermissionDeniedError
Inherited from
OrigOpenAI.PermissionDeniedError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:123
RateLimitError
static
RateLimitError: typeofRateLimitError
Inherited from
OrigOpenAI.RateLimitError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:119
UnprocessableEntityError
static
UnprocessableEntityError: typeofUnprocessableEntityError
Inherited from
OrigOpenAI.UnprocessableEntityError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:124
fileFromPath()
static
fileFromPath: (path
,options
?) =>Promise
<File
>(path
,filename
?,options
?) =>Promise
<File
>
Parameters
• path: string
• options?: FileFromPathOptions
Returns
Promise
<File
>
Parameters
• path: string
• filename?: string
• options?: FileFromPathOptions
Returns
Promise
<File
>
Inherited from
OrigOpenAI.fileFromPath
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:126
toFile()
static
toFile: (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
• value: ToFileInput
| PromiseLike
<ToFileInput
>
the raw content of the file. Can be an Uploadable, BlobLikePart, or AsyncIterable of BlobLikeParts
• name?: null
| string
the name of the file. If omitted, toFile will try to determine a file name from bits if possible
• options?: FilePropertyBag
additional properties
Returns
Promise
<FileLike
>
a File with the given properties
Inherited from
OrigOpenAI.toFile
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:125
Methods
authHeaders()
protected
authHeaders():object
Returns
object
api-key
api-key:
string
Overrides
OrigOpenAI.authHeaders
Source
packages/core/src/llm/openai.ts:47
buildRequest()
buildRequest<
Req
>(options
):object
Type parameters
• Req
Parameters
• options: FinalRequestOptions
<Req
>
Returns
object
req
req:
RequestInit
timeout
timeout:
number
url
url:
string
Inherited from
OrigOpenAI.buildRequest
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:101
buildURL()
buildURL<
Req
>(path
,query
):string
Type parameters
• Req
Parameters
• path: string
• query: undefined
| null
| Req
Returns
string
Inherited from
OrigOpenAI.buildURL
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:126
defaultHeaders()
protected
defaultHeaders(opts
):Headers
Parameters
• opts: FinalRequestOptions
<unknown
>
Returns
Headers
Inherited from
OrigOpenAI.defaultHeaders
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:109
defaultIdempotencyKey()
protected
defaultIdempotencyKey():string
Returns
string
Inherited from
OrigOpenAI.defaultIdempotencyKey
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:92
defaultQuery()
protected
defaultQuery():undefined
|DefaultQuery
Returns
undefined
| DefaultQuery
Inherited from
OrigOpenAI.defaultQuery
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/index.d.mts:108
delete()
delete<
Req
,Rsp
>(path
,opts
?):APIPromise
<Rsp
>
Type parameters
• Req
• Rsp
Parameters
• path: string
• opts?: PromiseOrValue
<RequestOptions
<Req
>>
Returns
APIPromise
<Rsp
>
Inherited from
OrigOpenAI.delete
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:97
fetchWithTimeout()
fetchWithTimeout(
url
,init
,ms
,controller
):Promise
<Response
>
Parameters
• url: RequestInfo
• init: undefined
| RequestInit
• ms: number
• controller: AbortController
Returns
Promise
<Response
>
Inherited from
OrigOpenAI.fetchWithTimeout
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:128
get()
get<
Req
,Rsp
>(path
,opts
?):APIPromise
<Rsp
>
Type parameters
• Req
• Rsp
Parameters
• path: string
• opts?: PromiseOrValue
<RequestOptions
<Req
>>
Returns
APIPromise
<Rsp
>
Inherited from
OrigOpenAI.get
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:93
getAPIList()
getAPIList<
Item
,PageClass
>(path
,Page
,opts
?):PagePromise
<PageClass
,Item
>
Type parameters
• Item
• PageClass extends AbstractPage
<Item
> = AbstractPage
<Item
>
Parameters
• path: string
• Page
• opts?: RequestOptions
<any
>
Returns
PagePromise
<PageClass
, Item
>
Inherited from
OrigOpenAI.getAPIList
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:99
getRequestClient()
protected
getRequestClient():RequestClient
Returns
RequestClient
Inherited from
OrigOpenAI.getRequestClient
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:129
makeStatusError()
protected
makeStatusError(status
,error
,message
,headers
):APIError
Parameters
• status: undefined
| number
• error: undefined
| Object
• message: undefined
| string
• headers: undefined
| Headers
Returns
APIError
Inherited from
OrigOpenAI.makeStatusError
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:122
parseHeaders()
protected
parseHeaders(headers
):Record
<string
,string
>
Parameters
• headers: undefined
| null
| HeadersInit
Returns
Record
<string
, string
>
Inherited from
OrigOpenAI.parseHeaders
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:121
patch()
patch<
Req
,Rsp
>(path
,opts
?):APIPromise
<Rsp
>
Type parameters
• Req
• Rsp
Parameters
• path: string
• opts?: PromiseOrValue
<RequestOptions
<Req
>>
Returns
APIPromise
<Rsp
>
Inherited from
OrigOpenAI.patch
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:95
post()
post<
Req
,Rsp
>(path
,opts
?):APIPromise
<Rsp
>
Type parameters
• Req
• Rsp
Parameters
• path: string
• opts?: PromiseOrValue
<RequestOptions
<Req
>>
Returns
APIPromise
<Rsp
>
Inherited from
OrigOpenAI.post
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:94
prepareOptions()
protected
prepareOptions(options
):Promise
<void
>
Used as a callback for mutating the given FinalRequestOptions
object.
Parameters
• options: FinalRequestOptions
<unknown
>
Returns
Promise
<void
>
Inherited from
OrigOpenAI.prepareOptions
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:110
prepareRequest()
protected
prepareRequest(request
,__namedParameters
):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
• request: RequestInit
• __namedParameters
• __namedParameters.options: FinalRequestOptions
<unknown
>
• __namedParameters.url: string
Returns
Promise
<void
>
Inherited from
OrigOpenAI.prepareRequest
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:117
put()
put<
Req
,Rsp
>(path
,opts
?):APIPromise
<Rsp
>
Type parameters
• Req
• Rsp
Parameters
• path: string
• opts?: PromiseOrValue
<RequestOptions
<Req
>>
Returns
APIPromise
<Rsp
>
Inherited from
OrigOpenAI.put
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:96
request()
request<
Req
,Rsp
>(options
,remainingRetries
?):APIPromise
<Rsp
>
Type parameters
• Req
• Rsp
Parameters
• options: PromiseOrValue
<FinalRequestOptions
<Req
>>
• remainingRetries?: null
| number
Returns
APIPromise
<Rsp
>
Inherited from
OrigOpenAI.request
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:123
requestAPIList()
requestAPIList<
Item
,PageClass
>(Page
,options
):PagePromise
<PageClass
,Item
>
Type parameters
• Item = unknown
• PageClass extends AbstractPage
<Item
> = AbstractPage
<Item
>
Parameters
• Page
• options: FinalRequestOptions
<unknown
>
Returns
PagePromise
<PageClass
, Item
>
Inherited from
OrigOpenAI.requestAPIList
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:125
stringifyQuery()
protected
stringifyQuery(query
):string
Parameters
• query: Record
<string
, unknown
>
Returns
string
Inherited from
OrigOpenAI.stringifyQuery
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:127
validateHeaders()
protected
validateHeaders(headers
,customHeaders
):void
Override this to add your own headers validation:
Parameters
• headers: Headers
• customHeaders: Headers
Returns
void
Inherited from
OrigOpenAI.validateHeaders
Source
node_modules/.pnpm/openai@4.50.0_encoding@0.1.13/node_modules/openai/core.d.ts:91