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
-
↳
HeliconeOpenAIApiConfiguration
Constructors
constructor
• new HeliconeOpenAIApiConfiguration(«destructured»?
): HeliconeOpenAIApiConfiguration
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | {} |
› baseUrl? | string | "https://oai.hconeai.com/v1" |
› customCallHeaders? | CustomHeaderProvider | undefined |
› heliconeApiKey? | string | undefined |
› openAIApiKey? | string | undefined |
› retry? | RetryFunction | undefined |
› throttle? | ThrottleFunction | undefined |
Returns
HeliconeOpenAIApiConfiguration
Overrides
BaseUrlApiConfiguration.constructor
Defined in
packages/modelfusion/src/observability/helicone/HeliconeOpenAIApiConfiguration.ts:8
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