LogoPixi’VN
indexNamespacesaiFunctions

Function: init()

> init(options?): Promise<void>

Defined in: src/ai.ts:35

Initialize Pixi'VN AI. Call this once, typically at application startup, before using ai.text.generateDialog, ai.image.generateBackground or ai.image.generateElement.

When neither option is given, a small local WebLLM model is downloaded and used for dialogue generation (no image support).

Parameters

options?

The AI SDK models to use.

imageProvider?

ImageModel

Image model used for ai.image.generateBackground and ai.image.generateElement.

textProvider?

LanguageModel

Language model used for ai.text.generateDialog, and as a fallback for image generation on multimodal models (e.g. Gemini image generation).

Returns

Promise<void>

On this page