Skip to content

Latest commit

 

History

History

genbot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Genbot engine

A simple GPT bot which can generate a shell script to perform the required task. The generated script is run within a docker container, with any files or directories it requires from the host mounted as read-only volumes.

genbot.mov

Dependencies

Installation

make install

This copies the bot's config as well as the bot script to the default config directory: ~/botmand-engines.

Edit ~/botmand-engines/genbot.yaml and set the OPENAI_API_KEY variable. Check OpenAI documentation on signing up for the API and retrieving your API key.

If botmand is already running, make it reload its engines:

pkill -HUP botmand

Usage

The bot only listens to messages directed at it in specific channels (by default, #genbot). See ~/botmand-engines/genbot.yaml after installation to configure this.

When issued an instruction to perform a specific task (eg., to monitor a specific file and print an alert when its contents change), the bot generates a shell script which it then runs by the user for confirmation. Once the user accepts the script, it generates a genbot (a docker image with the script) and runs it.

Currently running genbots can be listed by the command "genbot ls", which prints a list of running genbots along with their IDs. Any running genbot can be stopped by entering the command: "genbot stop ".