Skip to main content

Variable: AI

const AI: object;

The core AI interface. Use this to call AI features programatically.

Type declaration

chat()

chat: (messages, options) => Promise<void>;

Parameters

ParameterType
messagesChatMessage[]
optionsChatOptions

Returns

Promise<void>

chatSync()

chatSync: (messages, options) => Promise<ChatReply>;

Parameters

ParameterType
messagesChatMessage[]
optionsOmit<ChatOptions, "onReply">

Returns

Promise<ChatReply>

generateImage()

generateImage: (options) => Promise<GenerateImageResult>;

Parameters

ParameterType
optionsGenerateImageOptions

Returns

Promise<GenerateImageResult>

isReady()

isReady: () => boolean;

Returns

boolean