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
Parameter | Type |
---|---|
messages | ChatMessage [] |
options | ChatOptions |
Returns
Promise
<void
>
chatSync()
chatSync: (messages, options) => Promise<ChatReply>;
Parameters
Parameter | Type |
---|---|
messages | ChatMessage [] |
options | Omit <ChatOptions , "onReply" > |
Returns
Promise
<ChatReply
>
generateImage()
generateImage: (options) => Promise<GenerateImageResult>;
Parameters
Parameter | Type |
---|---|
options | GenerateImageOptions |
Returns
Promise
<GenerateImageResult
>
isReady()
isReady: () => boolean;
Returns
boolean