Class: TogetherAIApiConfiguration
Configuration for the Together.ai API.
It calls the API at https://api.together.xyz/v1 and uses the TOGETHER_API_KEY
api key environment variable.
See
https://docs.together.ai/docs/openai-api-compatibility
Hierarchy
-
BaseUrlApiConfigurationWithDefaults
↳
TogetherAIApiConfiguration
Implements
Constructors
constructor
• new TogetherAIApiConfiguration(settings?
): TogetherAIApiConfiguration
Parameters
Name | Type |
---|---|
settings | Omit <BaseUrlPartsApiConfigurationOptions , "baseUrl" > & { baseUrl? : string | Partial <UrlParts > } & { apiKey? : string } |
Returns
Overrides
BaseUrlApiConfigurationWithDefaults.constructor
Defined in
packages/modelfusion/src/model-provider/openai-compatible/TogetherAIApiConfiguration.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
Name | Type |
---|---|
path | string |
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
Name | Type | Description |
---|---|---|
params | HeaderParameters | Parameters 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-togetherai"
Implementation of
OpenAICompatibleApiConfiguration.provider
Defined in
packages/modelfusion/src/model-provider/openai-compatible/TogetherAIApiConfiguration.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