Skip to content

Latest commit

 

History

History
43 lines (22 loc) · 933 Bytes

generateText.md

File metadata and controls

43 lines (22 loc) · 933 Bytes

@elizaos/core v0.1.7 / generateText

Function: generateText()

generateText(opts): Promise<string>

Send a message to the model for a text generateText - receive a string back and parse how you'd like

Parameters

opts

The options for the generateText request.

opts.runtime: IAgentRuntime

opts.context: string

The context of the message to be completed.

opts.modelClass: string

opts.tools?: Record<string, Tool> = {}

opts.onStepFinish?

opts.maxSteps?: number = 1

opts.stop?: string[]

A list of strings to stop the generateText at.

opts.customSystemPrompt?: string

Returns

Promise<string>

The completed message.

Defined in

packages/core/src/generation.ts:170