@stackbit/utils
Version:
Stackbit utilities
42 lines • 1.43 kB
TypeScript
import { CustomActionModel } from '@stackbit/types';
export type GenerateContentFromPresetOptions = {
/**
* The label for the AI action.
* @default Generate content with AI
*/
label?: string;
/**
* The name of the field that contains the page's section.
* For example, 'sections', 'blocks', 'components'.
* Use `modelsConfig.mailListField` when setting root config actions.
*/
mainListField?: string;
/**
* Custom AI prompt.
* Use `modelsConfig.customPrompt` when setting root config actions.
*/
customPrompt?: string;
/**
* Allow content editor to change the custom prompt.
*/
allowOverrideCustomPrompt?: boolean;
/**
* Use `modelsConfig` when setting root config actions, and specify
* `mainListField` and `customPrompt` per model `name`.
*/
modelsConfig?: {
name: string;
mainListField?: string;
customPrompt?: string;
}[];
/**
* Temporary solution to connect the action with site related AI-knowledge.
*/
siteId?: string;
};
declare function GenerateContentFromPreset({ label, mainListField, customPrompt, allowOverrideCustomPrompt, modelsConfig, siteId }: GenerateContentFromPresetOptions): CustomActionModel;
export declare const Actions: {
GenerateContentFromPreset: typeof GenerateContentFromPreset;
};
export {};
//# sourceMappingURL=ai-actions.d.ts.map