Skip to main content

Class: HeliconeOpenAIApiConfiguration

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 HeliconeOpenAIApiConfiguration(«destructured»?): HeliconeOpenAIApiConfiguration

Parameters

NameTypeDefault value
«destructured»Object{}
› baseUrl?string"https://oai.hconeai.com/v1"
› customCallHeaders?CustomHeaderProviderundefined
› heliconeApiKey?stringundefined
› openAIApiKey?stringundefined
› retry?RetryFunctionundefined
› throttle?ThrottleFunctionundefined

Returns

HeliconeOpenAIApiConfiguration

Overrides

BaseUrlApiConfiguration.constructor

Defined in

packages/modelfusion/src/observability/helicone/HeliconeOpenAIApiConfiguration.ts:8

Methods

assembleUrl

assembleUrl(path): string

Parameters

NameType
pathstring

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

NameType
paramsHeaderParameters

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

BaseUrlApiConfiguration.retry

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