Build bots in Python
script.py
file, as specified under the “main” property in the botspec.json
file. When your bot is executed it will look for an exported main
function in that file and call it.
The main
function can be asyncrounous (to let you use await inside) and recieves the three following arguments:
inputs
(object) - the inputs passed to your bot by the user.params
(object) - the parameters configured by the the user for your bot.accounts
(array) - an array containing all the requested account credentials for your bot to use.main
function will look like this:
script.py
file. When your bot is executed, the runtime will automatically install all the packages you imported using pip
and make them available to your bot.
Lil’bots uses pipreqs to automatically detect the packages you use and install them.