Class: BaseUrlApiConfigurationWithDefaults
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
-
↳
BaseUrlApiConfigurationWithDefaults
↳↳
Automatic1111ApiConfiguration
↳↳
HuggingFaceApiConfiguration
Constructors
constructor
• new BaseUrlApiConfigurationWithDefaults(«destructured»
): BaseUrlApiConfigurationWithDefaults
Parameters
Name | Type |
---|---|
«destructured» | { baseUrlDefaults : UrlParts } & Omit <BaseUrlPartsApiConfigurationOptions , "baseUrl" > & { baseUrl? : string | Partial <UrlParts > } |
Returns
BaseUrlApiConfigurationWithDefaults
Overrides
BaseUrlApiConfiguration.constructor
Defined in
packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:72
Methods
assembleUrl
▸ assembleUrl(path
): string
Parameters
Name | Type |
---|---|
path | string |
Returns
string
Inherited from
BaseUrlApiConfiguration.assembleUrl
Defined in
packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:47
fixedHeaders
▸ fixedHeaders(): Record
<string
, string
>
Returns
Record
<string
, string
>
Inherited from
BaseUrlApiConfiguration.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
BaseUrlApiConfiguration.headers
Defined in
packages/modelfusion/src/core/api/AbstractApiConfiguration.ts:31
Properties
baseUrl
• Readonly
baseUrl: UrlParts
Inherited from
BaseUrlApiConfiguration.baseUrl
Defined in
packages/modelfusion/src/core/api/BaseUrlApiConfiguration.ts:27
retry
• Optional
Readonly
retry: RetryFunction
Inherited from
Defined in
packages/modelfusion/src/core/api/AbstractApiConfiguration.ts:7
throttle
• Optional
Readonly
throttle: ThrottleFunction
Inherited from
BaseUrlApiConfiguration.throttle
Defined in
packages/modelfusion/src/core/api/AbstractApiConfiguration.ts:8