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
-
AbstractApiConfiguration
↳
BaseUrlApiConfiguration
Constructors
constructor
• new BaseUrlApiConfiguration(«destructured»
): BaseUrlApiConfiguration
Parameters
Name | Type |
---|---|
«destructured» | BaseUrlPartsApiConfigurationOptions |
Returns
Overrides
AbstractApiConfiguration.constructor
Defined in
packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:31
Methods
assembleUrl
▸ assembleUrl(path
): string
Parameters
Name | Type |
---|---|
path | string |
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
Name | Type |
---|---|
params | HeaderParameters |
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