Skip to main content

Class: FireworksAIApiConfiguration

Configuration for the Fireworks.ai API.

It calls the API at https://api.fireworks.ai/inference/v1 and uses the FIREWORKS_API_KEY api key environment variable.

See

https://readme.fireworks.ai/docs/openai-compatibility

Hierarchy

Implements

Constructors

constructor

new FireworksAIApiConfiguration(settings?): FireworksAIApiConfiguration

Parameters

NameType
settingsOmit<BaseUrlPartsApiConfigurationOptions, "baseUrl"> & { baseUrl?: string | Partial<UrlParts> } & { apiKey?: string }

Returns

FireworksAIApiConfiguration

Overrides

BaseUrlApiConfigurationWithDefaults.constructor

Defined in

packages/modelfusion/src/model-provider/openai-compatible/FireworksAIApiConfiguration.ts:19

Methods

assembleUrl

assembleUrl(path): string

Creates a full URL given a inner path.

The inner path always starts with a slash, e.g. /generate.

Parameters

NameType
pathstring

Returns

string

Implementation of

OpenAICompatibleApiConfiguration.assembleUrl

Inherited from

BaseUrlApiConfigurationWithDefaults.assembleUrl

Defined in

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


fixedHeaders

fixedHeaders(): Record<string, string>

Returns

Record<string, string>

Inherited from

BaseUrlApiConfigurationWithDefaults.fixedHeaders

Defined in

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


headers

headers(params): Record<string, string>

Returns the headers that should be included in every request to the API. This is intended for authentication headers and proxy settings.

The model may add additional headers, in particular "Content-Type"."

Parameters

NameTypeDescription
paramsHeaderParametersParameters that can be used to create the headers.

Returns

Record<string, string>

Implementation of

OpenAICompatibleApiConfiguration.headers

Inherited from

BaseUrlApiConfigurationWithDefaults.headers

Defined in

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

Properties

baseUrl

Readonly baseUrl: UrlParts

Inherited from

BaseUrlApiConfigurationWithDefaults.baseUrl

Defined in

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


provider

Readonly provider: "openaicompatible-fireworksai"

Implementation of

OpenAICompatibleApiConfiguration.provider

Defined in

packages/modelfusion/src/model-provider/openai-compatible/FireworksAIApiConfiguration.ts:42


retry

Optional Readonly retry: RetryFunction

Defines how failed API calls should be retried.

Implementation of

OpenAICompatibleApiConfiguration.retry

Inherited from

BaseUrlApiConfigurationWithDefaults.retry

Defined in

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


throttle

Optional Readonly throttle: ThrottleFunction

Defines how API calls should be rate limited.

Implementation of

OpenAICompatibleApiConfiguration.throttle

Inherited from

BaseUrlApiConfigurationWithDefaults.throttle

Defined in

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