-
Notifications
You must be signed in to change notification settings - Fork 0
@ralphschuler.ai function caller.index.<internal>.APIClient
index.<internal>.APIClient
- baseURL
- calculateContentLength
- calculateDefaultRetryTimeoutMillis
- fetch
- getUserAgent
- httpAgent
- idempotencyHeader
- makeRequest
- maxRetries
- methodRequest
- retryRequest
- shouldRetry
- timeout
- authHeaders
- buildRequest
- buildURL
- defaultHeaders
- defaultIdempotencyKey
- defaultQuery
- delete
- fetchWithTimeout
- get
- getAPIList
- getRequestClient
- makeStatusError
- parseHeaders
- patch
- post
- prepareRequest
- put
- request
- requestAPIList
- stringifyQuery
- validateHeaders
• new APIClient(«destructured»): APIClient
| Name | Type |
|---|---|
«destructured» |
Object |
› baseURL
|
string |
› fetch
|
undefined | Fetch
|
› httpAgent
|
undefined | Agent
|
› maxRetries?
|
number |
› timeout
|
undefined | number
|
node_modules/openai/core.d.ts:68
• baseURL: string
node_modules/openai/core.d.ts:62
• Private calculateContentLength: any
node_modules/openai/core.d.ts:99
• Private calculateDefaultRetryTimeoutMillis: any
node_modules/openai/core.d.ts:126
• Private fetch: any
node_modules/openai/core.d.ts:66
• Private getUserAgent: any
node_modules/openai/core.d.ts:127
• httpAgent: undefined | Agent
node_modules/openai/core.d.ts:65
• Protected Optional idempotencyHeader: string
node_modules/openai/core.d.ts:67
• Private makeRequest: any
node_modules/openai/core.d.ts:118
• maxRetries: number
node_modules/openai/core.d.ts:63
• Private methodRequest: any
node_modules/openai/core.d.ts:97
• Private retryRequest: any
node_modules/openai/core.d.ts:125
• Private shouldRetry: any
node_modules/openai/core.d.ts:124
• timeout: number
node_modules/openai/core.d.ts:64
▸ authHeaders(opts): Headers
| Name | Type |
|---|---|
opts |
FinalRequestOptions<Readable | Record<string, unknown>> |
node_modules/openai/core.d.ts:76
▸ buildRequest<Req>(options): Object
| Name | Type |
|---|---|
Req |
extends Object
|
| Name | Type |
|---|---|
options |
FinalRequestOptions<Req> |
Object
| Name | Type |
|---|---|
req |
RequestInit |
timeout |
number |
url |
string |
node_modules/openai/core.d.ts:100
▸ buildURL<Req>(path, query): string
| Name | Type |
|---|---|
Req |
extends Record<string, unknown> |
| Name | Type |
|---|---|
path |
string |
query |
undefined | null | Req
|
string
node_modules/openai/core.d.ts:120
▸ defaultHeaders(opts): Headers
Override this to add your own default headers, for example:
{ ...super.defaultHeaders(), Authorization: 'Bearer 123', }
| Name | Type |
|---|---|
opts |
FinalRequestOptions<Readable | Record<string, unknown>> |
node_modules/openai/core.d.ts:85
▸ defaultIdempotencyKey(): string
string
node_modules/openai/core.d.ts:91
▸ defaultQuery(): undefined | DefaultQuery
undefined | DefaultQuery
node_modules/openai/core.d.ts:86
▸ delete<Req, Rsp>(path, opts?): APIPromise<Rsp>
| Name | Type |
|---|---|
Req |
extends Object
|
Rsp |
Rsp |
| Name | Type |
|---|---|
path |
string |
opts? |
PromiseOrValue<RequestOptions<Req>> |
APIPromise<Rsp>
node_modules/openai/core.d.ts:96
▸ fetchWithTimeout(url, init, ms, controller): Promise<Response>
| Name | Type |
|---|---|
url |
RequestInfo |
init |
undefined | RequestInit
|
ms |
number |
controller |
AbortController |
Promise<Response>
node_modules/openai/core.d.ts:122
▸ get<Req, Rsp>(path, opts?): APIPromise<Rsp>
| Name | Type |
|---|---|
Req |
extends Object
|
Rsp |
Rsp |
| Name | Type |
|---|---|
path |
string |
opts? |
PromiseOrValue<RequestOptions<Req>> |
APIPromise<Rsp>
node_modules/openai/core.d.ts:92
▸ getAPIList<Item, PageClass>(path, Page, opts?): PagePromise<PageClass, Item>
| Name | Type |
|---|---|
Item |
Item |
PageClass |
extends AbstractPage<Item> = AbstractPage<Item> |
| Name | Type |
|---|---|
path |
string |
Page |
(...args: any[]) => PageClass
|
opts? |
RequestOptions<any> |
PagePromise<PageClass, Item>
node_modules/openai/core.d.ts:98
▸ getRequestClient(): RequestClient
node_modules/openai/core.d.ts:123
▸ makeStatusError(status, error, message, headers): APIError
| Name | Type |
|---|---|
status |
undefined | number
|
error |
undefined | Object
|
message |
undefined | string
|
headers |
undefined | Headers
|
node_modules/openai/core.d.ts:116
▸ parseHeaders(headers): Record<string, string>
| Name | Type |
|---|---|
headers |
undefined | null | HeadersInit
|
Record<string, string>
node_modules/openai/core.d.ts:115
▸ patch<Req, Rsp>(path, opts?): APIPromise<Rsp>
| Name | Type |
|---|---|
Req |
extends Object
|
Rsp |
Rsp |
| Name | Type |
|---|---|
path |
string |
opts? |
PromiseOrValue<RequestOptions<Req>> |
APIPromise<Rsp>
node_modules/openai/core.d.ts:94
▸ post<Req, Rsp>(path, opts?): APIPromise<Rsp>
| Name | Type |
|---|---|
Req |
extends Object
|
Rsp |
Rsp |
| Name | Type |
|---|---|
path |
string |
opts? |
PromiseOrValue<RequestOptions<Req>> |
APIPromise<Rsp>
node_modules/openai/core.d.ts:93
▸ 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.
| Name | Type |
|---|---|
request |
RequestInit |
«destructured» |
Object |
› options
|
FinalRequestOptions<Readable | Record<string, unknown>> |
› url
|
string |
Promise<void>
node_modules/openai/core.d.ts:111
▸ put<Req, Rsp>(path, opts?): APIPromise<Rsp>
| Name | Type |
|---|---|
Req |
extends Object
|
Rsp |
Rsp |
| Name | Type |
|---|---|
path |
string |
opts? |
PromiseOrValue<RequestOptions<Req>> |
APIPromise<Rsp>
node_modules/openai/core.d.ts:95
▸ request<Req, Rsp>(options, remainingRetries?): APIPromise<Rsp>
| Name | Type |
|---|---|
Req |
extends Object
|
Rsp |
Rsp |
| Name | Type |
|---|---|
options |
PromiseOrValue<FinalRequestOptions<Req>> |
remainingRetries? |
null | number
|
APIPromise<Rsp>
node_modules/openai/core.d.ts:117
▸ requestAPIList<Item, PageClass>(Page, options): PagePromise<PageClass, Item>
| Name | Type |
|---|---|
Item |
unknown |
PageClass |
extends AbstractPage<Item> = AbstractPage<Item> |
| Name | Type |
|---|---|
Page |
(...args: [client: APIClient, response: Response, body: unknown, options: FinalRequestOptions<Readable | Record<string, unknown>>]) => PageClass
|
options |
FinalRequestOptions<Readable | Record<string, unknown>> |
PagePromise<PageClass, Item>
node_modules/openai/core.d.ts:119
▸ stringifyQuery(query): string
| Name | Type |
|---|---|
query |
Record<string, unknown> |
string
node_modules/openai/core.d.ts:121
▸ validateHeaders(headers, customHeaders): void
Override this to add your own headers validation:
| Name | Type |
|---|---|
headers |
Headers |
customHeaders |
Headers |
void
node_modules/openai/core.d.ts:90
- @ralphschuler/ai-function-caller
- index
- types/AIFunction
- types/Message
- @ralphschuler/assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- assert
- error
- index
- util
- @ralphschuler/better-map
- @ralphschuler/better-set
- @ralphschuler/binary-serializer
- @ralphschuler/bit-mask
- @ralphschuler/complex-compare
- @ralphschuler/i811n
- @ralphschuler/logger
- Color
- ColorMap
- Logger
- animations/BallonAnimation
- animations/BaseAnimation
- animations/BombAnimation
- animations/BouncingBallAnimation
- animations/ClockAnimation
- animations/DotsAnimation
- animations/HorizontalBarAnimation
- animations/PongAnimation
- animations/ProgressAnimation
- animations/ProgressBarAnimation
- animations/SpinnerAnimation
- animations/VerticalBarAnimation
- enums/LogLevel
- index
- interfaces/IColor
- interfaces/IMessage
- types/ColorName
- types/Colors
- @ralphschuler/lsystem
- @ralphschuler/mixin-class-factory
- @ralphschuler/neuronal-network
- @ralphschuler/parser-combinator
- index
- inputTypes
- parser
- unicode
- @ralphschuler/prom-metrics-decorator
- @ralphschuler/prom-metrics-parser
- @ralphschuler/random
- PseudoRandomItemSelector
- PseudoRandomNumberGenerator
- Seed
- index
- strategies
- strategy
- strategy
- strategy
- strategy
- strategy
- strategy
- types
- type
- type
- type
- @ralphschuler/safe-array
- @ralphschuler/slot-mashine
- @ralphschuler/state-store
- StateStore
- index
- type
- type
- type
- type
- type
- type
- type
- type
- util
- @ralphschuler/stats-tracker
- @ralphschuler/ts-error
- error
- index
- type
- util
- util
- util
- util
- @ralphschuler/webgl-sand-engine
- index
- pixel-renderer
- @ralphschuler/webgl-shader-factory
- "node:stream/consumers"
- "node:stream/promises"
- ChatCompletionSnapshot
- Choice
- Message
- ToolCall
- EventEmitter
- FormData
- OpenAI
- OpenAI
- Audio
- Speech
- Transcriptions
- Translations
- Beta
- Assistants
- Assistant
- AssistantCreateParams
- AssistantUpdateParams
- Files
- Chat
- Threads
- Messages
- Files
- MessageContentImageFile
- MessageContentText
- Text
- FileCitation
- FilePath
- Runs
- RequiredActionFunctionToolCall
- Run
- RequiredAction
- RunCreateParams
- RunSubmitToolOutputsParams
- Steps
- CodeToolCall
- CodeInterpreter
- Image
- FunctionToolCall
- MessageCreationStepDetails
- RunStep
- ThreadCreateAndRunParams
- Thread
- ThreadCreateParams
- Chat
- Completions
- ChatCompletion
- ChatCompletionAssistantMessageParam
- ChatCompletionChunk
- Choice
- Delta
- ToolCall
- ChatCompletionContentPartImage
- ChatCompletionCreateParams
- ChatCompletionMessage
- ChatCompletionMessageToolCall
- ChatCompletionNamedToolChoice
- Completions
- CompletionChoice
- CompletionCreateParams
- Edits
- Edit
- Embeddings
- CreateEmbeddingResponse
- Files
- FineTunes
- FineTune
- FineTuneCreateParams
- FineTuneListEventsParams
- FineTuning
- Jobs
- FineTuningJob
- JobCreateParams
- Images
- Models
- Moderations
- Moderation
- internal
- finished
- pipeline
- "node:stream/consumers"
- "node:stream/promises"
- EventEmitter
- internal
- finished
- pipeline
- Counter
- Gauge
- Histogram
- Summary