Skip to main content

@okcashpro/okai v0.1.7-alpha.1 / generateShouldRespond

Function: generateShouldRespond()

generateShouldRespond(opts): Promise<"RESPOND" | "IGNORE" | "STOP" | null>

Sends a message to the model to determine if it should respond to the given context.

Parameters

opts

The options for the generateText request

opts.runtime: IAgentRuntime

opts.context: string

The context to evaluate for response

opts.modelClass: string

Returns

Promise<"RESPOND" | "IGNORE" | "STOP" | null>

Promise resolving to "RESPOND", "IGNORE", "STOP" or null

Defined in

packages/core/src/generation.ts:626