DEV Community

Add00
Add00

Posted on

DocBot the Documenting Bot

Greetings,

For an open source course I'm taking we had to develop a Large Language Model CLI tool. This was quite exciting for me as I had not previously worked with AI models before.

For this assignment I opted to make a Documentation bot which would document and comment code in JSDoc style. To make this tool I used JS libraries yargs to handle interacting with the terminal and ollama for interacting with AI models.

With the tools decided I then got to work developing the application. Originally, I wanted to use the llama2 model however, my computer did not have enough RAM to use the model and run my program at the same time. So I ended up swapping to Gemmni2b a much smaller but still perform model.

With the model working via ollama I wrote a simple yargs script to handle the command line arguments this included the standard help and version flags. As well as an output file flag, and model switch flag. Depending on the flag it would parse the output from ollama differently.

This is but a short description of the bot I ended up making for release 0.1 and I look forwards to the potential features of release 0.2.

Top comments (0)