Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / ProviderOptions

Interface: ProviderOptions ​

Defined in: types.ts:342

Base interface for provider-specific configuration options. Contains common options shared across all AI providers.

Extends ​

Extended by ​

Properties ​

model? ​

optional model: string

Defined in: types.ts:305

The specific model you want to use. e.g., 'gpt-4o' or 'claude-3-5-sonnet-20240620'.

Inherited from ​

GenerationOptions.model


maxOutputTokens? ​

optional maxOutputTokens: number

Defined in: types.ts:307

The maximum number of output tokens to generate. Don't want it to ramble on forever, do you?

Inherited from ​

GenerationOptions.maxOutputTokens


temperature? ​

optional temperature: number

Defined in: types.ts:313

The sampling temperature. Higher values (e.g., 0.8) make the output more random, while lower values (e.g., 0.2) make it more focused and deterministic. A bit like adjusting the chaos knob.

Inherited from ​

GenerationOptions.temperature


topP? ​

optional topP: number

Defined in: types.ts:318

Top-p sampling. It's a way to control the randomness of the output by only considering the most likely tokens. It's like telling the AI to only pick from the top of the deck.

Inherited from ​

GenerationOptions.topP


topK? ​

optional topK: number

Defined in: types.ts:323

Top-k sampling. Similar to top-p, but it considers a fixed number of top tokens. Not all providers support this, because life isn't fair.

Inherited from ​

GenerationOptions.topK


stopSequences? ​

optional stopSequences: string[]

Defined in: types.ts:325

A list of sequences that will stop the generation. A safe word, if you will.

Inherited from ​

GenerationOptions.stopSequences


tools? ​

optional tools: Tool[]

Defined in: types.ts:327

The list of tools you're making available to the model.

Inherited from ​

GenerationOptions.tools


toolChoice? ​

optional toolChoice: { name: string; } | "auto" | "required" | "none"

Defined in: types.ts:335

How the model should choose which tool to use. 'auto': The model decides. 'required': The model must use a tool. 'none': The model can't use any tools. { name: 'my_tool' }: Force the model to use a specific tool.

Inherited from ​

GenerationOptions.toolChoice


apiKey? ​

optional apiKey: string

Defined in: types.ts:344

API key for authentication with the provider.


baseURL? ​

optional baseURL: string

Defined in: types.ts:346

Custom base URL for the API endpoint.


timeout? ​

optional timeout: number

Defined in: types.ts:348

Request timeout in milliseconds.


maxRetries? ​

optional maxRetries: number

Defined in: types.ts:350

Maximum number of retry attempts for failed requests.


mutateHeaders()? ​

optional mutateHeaders: (headers) => void

Defined in: types.ts:356

A function that allows you to modify the headers before a request is sent. This is useful for adding custom headers or modifying existing ones.

Parameters ​

headers ​

Record<string, string>

The original headers object to mutate directly.

Returns ​

void

Released under the MIT License.