fleet/website/scripts/test-ai-compile.js
Mike McNeil 94aa200424
More ai helpers (#29027)
I will upstream these ahead of next week into sails-hook-organics.
2025-05-12 17:01:43 -05:00

27 lines
775 B
JavaScript
Vendored

module.exports = {
friendlyName: 'Test ai compile',
description: '',
fn: async function () {
sails.log('Running custom shell script... (`sails run test-ai-compile`)');
let goal1 = 'Fibonnacci: Respond with an array of a fibonacci sequence';
sails.log(await ƒ.compile(goal1, 'helper'));
let goal2 = 'Sign up: Handle a signup form.';
sails.log(await ƒ.compile(goal2));
let goal3 = 'Receive from Fleet: Handle a webhook sent by Fleet whenever a policy fails, such that, if the policy is critical, we send an email to the person\'s email. Reach out to the Fleet API as needed to map the incoming data\'s hostname to the human email identity using the originating host.';
sails.log(await sails.helpers.ai.compile(goal3));
}
};