openai-text-completions
A simple command-line tool for generating text using the OpenAI text completion API.
Installation
npm install -g openai-text-completions
Usage
First, you will need to obtain an API key from OpenAI. Once you have your key, you can set it using the key
command:
openai-text-completions key <your-api-key>
You can then use the generate
command to generate text, optionally specifying a model and temperature:
openai-text-completions generate <prompt> [model] [temperature]
If you have a file containing text that you would like to use as a prompt, you can use the generate-from-file
command:
openai-text-completions generate-from-file <file> [model] [temperature]
License
MIT