This is a small project to test out the OpenAI API by building a CLI in JavaScript.
To interact with the OpenAI API you will need an OpenAI platform account. Once you have signed up, create an API key from your account dashboard.
Installation and usage is manual right now. To do so you should clone the repo and change into the new directory:
git clone https://github.com/philnash/asst.git
cd asst
Then install the dependencies:
npm install
You can then run the assistant with the command:
OPENAI_API_KEY=YOUR_OPENAI_API_KEY node index.js
You can also copy the .env.example
to .env
and enter your API key. Then you can use the following command to run the assistant:
npm start
You can now interact with your assistant. Start by giving the assistant a system instruction for how it should behave. Once you have done that, you can chat back and forth with the assistant on the command line.
- Fork it ( https://github.com/philnash/asst/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Everyone interacting in the asst project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
This code is available as open source under the terms of the MIT License.