Skip to main content

@okcashpro/okai v0.1.7-alpha.1 / 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