Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / GenerationOptions

Interface: GenerationOptions

Defined in: types.ts:303

The basic knobs and dials for controlling the AI's creative genius. These are the options that all providers understand.

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'.


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?


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.


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.


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.


stopSequences?

optional stopSequences: string[]

Defined in: types.ts:325

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


tools?

optional tools: Tool[]

Defined in: types.ts:327

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


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.

Released under the MIT License.