Calling a workflow

Once your workflow is merged and deployed, you can call it from within your application. Install the Lleverage JavaScript SDK to simplify integration into your application.

import Lleverage from 'lleverage';

const lleverage = new Lleverage();

async function main() {
  const execution = await lleverage.workflow.execute({
    path: 'content-writer',
    inputs: {
      subject: 'Why Silicon deserves a seventh season.',
      audience: 'Boomers'
    },
  });
  
  console.log(execution.response.text);
}

main();

{{ STREAMING_EXAMPLE }}

Last updated