1.1.16 • Published 1 year ago

openai-text-completions v1.1.16

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

openai-text-completions

A Node.js module for interacting with the OpenAI text completion API.

Installation

npm install openai-text-completions

Usage

First, you'll 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 check that your key is valid using the check-key command:

openai-text-completions check-key

To generate text, you can use the generate or generate-from-file commands. The generate command takes a string prompt as its first argument, and the generate-from-file command takes a path to a file containing the prompt as its first argument. Both commands also accept an optional model argument (default: text-davinci-002) and an optional temperature argument (default: 0.5).

Here's an example of using the generate command:

openai-text-completions generate "The quick brown fox jumps over the lazy dog."

And here's an example of using the generate-from-file command:

openai-text-completions generate-from-file prompt.txt

License

MIT

1.1.16

1 year ago

1.1.15

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.4.0

1 year ago

1.33.7

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago