Skip to main content

@elizaos/core v1.0.6 / v2 / GenerateTextParams

Type Alias: GenerateTextParams

GenerateTextParams: object

Parameters for generating text using a language model. This structure is typically passed to AgentRuntime.useModel when the modelType is one of ModelType.TEXT_SMALL, ModelType.TEXT_LARGE, ModelType.TEXT_REASONING_SMALL, ModelType.TEXT_REASONING_LARGE, or ModelType.TEXT_COMPLETION. It includes essential information like the prompt, model type, and various generation controls.

Type declaration​

runtime​

runtime: IAgentRuntime

The AgentRuntime instance, providing access to models and other services.

prompt​

prompt: string

The input string or prompt that the language model will use to generate text.

modelType​

modelType: ModelTypeName

Specifies the type of text generation model to use (e.g., TEXT_LARGE, REASONING_SMALL).

maxTokens?​

optional maxTokens: number

Optional. The maximum number of tokens to generate in the response.

temperature?​

optional temperature: number

Optional. Controls randomness (0.0-1.0). Lower values are more deterministic, higher are more creative.

frequencyPenalty?​

optional frequencyPenalty: number

Optional. Penalizes new tokens based on their existing frequency in the text so far.

presencePenalty?​

optional presencePenalty: number

Optional. Penalizes new tokens based on whether they appear in the text so far.

stopSequences?​

optional stopSequences: string[]

Optional. A list of sequences at which the model will stop generating further tokens.

Defined in​

packages/core/src/specs/v2/types.ts:1376