Skip to content

@ralphschuler.ai function caller.index.<internal>.ClientOptions

github-actions edited this page Nov 26, 2023 · 1 revision

Interface: ClientOptions

index.<internal>.ClientOptions

Table of contents

Properties

Properties

apiKey

Optional apiKey: string

Defaults to process.env['OPENAI_API_KEY'].

Defined in

node_modules/openai/index.d.ts:11


baseURL

Optional baseURL: string

Override the default base URL for the API, e.g., "https://api.example.com/v2/"

Defined in

node_modules/openai/index.d.ts:19


dangerouslyAllowBrowser

Optional dangerouslyAllowBrowser: boolean

By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. Only set this option to true if you understand the risks and have appropriate mitigations in place.

Defined in

node_modules/openai/index.d.ts:67


defaultHeaders

Optional defaultHeaders: Headers

Default headers to include with every request to the API.

These can be removed in individual requests by explicitly setting the header to undefined or null in request options.

Defined in

node_modules/openai/index.d.ts:55


defaultQuery

Optional defaultQuery: DefaultQuery

Default query parameters to include with every request to the API.

These can be removed in individual requests by explicitly setting the param to undefined in request options.

Defined in

node_modules/openai/index.d.ts:62


fetch

Optional fetch: Fetch

Specify a custom fetch function implementation.

If not provided, we use node-fetch on Node.js and otherwise expect that fetch is defined globally.

Defined in

node_modules/openai/index.d.ts:41


httpAgent

Optional httpAgent: Agent

An HTTP agent used to manage HTTP(S) connections.

If not provided, an agent will be constructed by default in the Node.js environment, otherwise no agent is used.

Defined in

node_modules/openai/index.d.ts:34


maxRetries

Optional maxRetries: number

The maximum number of times that the client will retry a request in case of a temporary failure, like a network error or a 5XX error from the server.

Default

2

Defined in

node_modules/openai/index.d.ts:48


organization

Optional organization: null | string

Defaults to process.env['OPENAI_ORG_ID'].

Defined in

node_modules/openai/index.d.ts:15


timeout

Optional timeout: number

The maximum amount of time (in milliseconds) that the client should wait for a response from the server before timing out a single request.

Note that request timeouts are retried by default, so in a worst-case scenario you may wait much longer than this timeout before the promise succeeds or fails.

Defined in

node_modules/openai/index.d.ts:27

Typescript Libraries

Modules

Namespaces

Clone this wiki locally