Skip to main content

@ai16z/eliza v0.1.6-alpha.4 / generateObject

Function: generateObject()

generateObject(options): Promise<GenerateObjectResult<unknown>>

Generates structured objects from a prompt using specified AI models and configuration options.

Parameters

options: GenerationOptions

Configuration options for generating objects.

Returns

Promise<GenerateObjectResult<unknown>>

  • A promise that resolves to an array of generated objects.

Throws

  • Throws an error if the provider is unsupported or if generation fails.

Defined in

packages/core/src/generation.ts:1266