Skip to main content

Class: BaseUrlApiConfiguration

An API configuration that uses different URL parts and a set of headers.

You can use it to configure custom APIs for models, e.g. your own internal OpenAI proxy with custom headers.

Hierarchy

Constructors

constructor

new BaseUrlApiConfiguration(«destructured»): BaseUrlApiConfiguration

Parameters

NameType
«destructured»BaseUrlPartsApiConfigurationOptions

Returns

BaseUrlApiConfiguration

Overrides

AbstractApiConfiguration.constructor

Defined in

packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:31

Methods

assembleUrl

assembleUrl(path): string

Parameters

NameType
pathstring

Returns

string

Overrides

AbstractApiConfiguration.assembleUrl

Defined in

packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:47


fixedHeaders

fixedHeaders(): Record<string, string>

Returns

Record<string, string>

Overrides

AbstractApiConfiguration.fixedHeaders

Defined in

packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:43


headers

headers(params): Record<string, string>

Parameters

NameType
paramsHeaderParameters

Returns

Record<string, string>

Inherited from

AbstractApiConfiguration.headers

Defined in

packages/modelfusion/src/core/api/AbstractApiConfiguration.ts:31

Properties

baseUrl

Readonly baseUrl: UrlParts

Defined in

packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:27


retry

Optional Readonly retry: RetryFunction

Inherited from

AbstractApiConfiguration.retry

Defined in

packages/modelfusion/src/core/api/AbstractApiConfiguration.ts:7


throttle

Optional Readonly throttle: ThrottleFunction

Inherited from

AbstractApiConfiguration.throttle

Defined in

packages/modelfusion/src/core/api/AbstractApiConfiguration.ts:8