Submitted by maktattengil t3_zwk4mg in MachineLearning

Hi all!

As most of you here, I've played around a bit with CHATGPT, but felt it was annoying to always have to log into their GUI to ask the questions.

To scratch my own itch and at the same time learn more about how to write my own command line interface, I created 'askai': https://github.com/maxvfischer/askai

It is a simple CLI integration with OpenAI’s GPT3 models. I’ve primarily used it to get quick answers to technical questions, like:

askai "How to mock user input when writing a Python pytest test?"
askai "How do I remove a conda environment?"

As I've found it quite helpful, I decided to spend some time to package it in a nicer way to share it with you. I've also uploaded it to PyPI to simplify the installation process.

'askai' enables you to:

  • Ask questions and get the answers straight into your terminal
  • Configure which model and model parameters you want to use
  • Overwrite saved configurations when you ask questions

Currently, it only supports OpenAI’s models, but my plan is to integrate more endpoints as soon as new capable NLP endpoints are popping up.

I hope some of you find it useful :)

18

Comments

You must log in or register to comment.

CriticalTemperature1 t1_j1vrfz6 wrote

This is a great idea! Maybe in future versions, when the user gets an error in the terminal with a command you can suggest the correct command with GPT-3

4

maktattengil OP t1_j1ycn19 wrote

You mean inside askai? Or more as a general idea for other CLI tools as well?

1

Visual_Collar_8893 t1_j1x4e91 wrote

Sweet! Been wondering about a CLI version.

Any chance there’s one for Alfred? That’ll make a stellar butler! :)

1

maktattengil OP t1_j1ycb65 wrote

Do you know if there's a public API to ask questions to? If so, please point me to it and I'll check it out :) Might be possible to integrate.

1

Visual_Collar_8893 t1_j1ydekl wrote

You mean for Alfred? I’m not sure but there are ways to add function on it on top of the standard power packs. I have Todoist within Alfred.

1

tbochristopher t1_j1x9e0s wrote

Cool, I just installed it and it's working. I'm sure this will be useful. Thanks!

1

maktattengil OP t1_j1ychna wrote

Haha it's my first CLI and I struggled quite a lot to get the setup.py file to work. So I'm glad that it works for you :)

1

Flannakis t1_j1xsknn wrote

Nice, you can really see this embedded everywhere

1

maktattengil OP t1_j1yc0dt wrote

Thanks! Yeah, might not be this CLI, but I think something similar will be heavily used by developers in the future.

1