openai-text-completions
A global npm package for generating text completions using the OpenAI API.
Installation
To install the package globally, run the following command:
npm install -g openai-text-completions
Usage
To generate a text completion, run the following command:
openai-text-completions "The quick brown fox"
This will generate a text completion based on the provided prompt and the default model and temperature and print it to the terminal.
To set the API key, run the following command:
openai-text-completions key YOUR_API_KEY
To check if the API key has been set correctly, run the following command:
openai-text-completions check-key
Options
-k, --key <key>
: Specify a new API key.
License
This package is released under the ISC license.