Generate content for you with OpenAI
require
node >= 14
npm i -g aigc
The library needs to be configured with your account's secret key which is available on the website. Set it as the OPENAI_API_KEY
environment variable before using the library:
export OPENAI_API_KEY='sk-...'
This library additionally provides an aigc
command-line utility which makes it easy to interact with the API from your terminal. Run aigc -h
for usage.
# list models
aigc list-models
# create a completion
aigc --prompt "Write unit test for the code below" path/to/your/codeFile
# create image
aigc image "cute cat"
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.