gpt3_utils is a set of tools for working with OpenAI's GPT3 API. It is implemented in TypeScript for Deno.
Set an environment variable called OPENAI_API_KEY
with your API key. Then run
the example:
deno run \
--allow-env=OPENAI_API_KEY \
--allow-net=api.openai.com \
https://raw.githubusercontent.com/eibens/gpt3_utils/v1.0.0-alpha.3/example.ts \
rainbow
Warning: Running the example will use some of your API resources. See
example.ts and completions.ts for details on the
TypeScript API. Import gpt3_utils from GitHub, where ref
is a Git ref name
such as main
or a version tag:
import * as openai from "https://raw.githubusercontent.com/eibens/gpt3_utils/{ref}/mod.ts";
Note on tokenize.ts
The mod.ts module exports all other modules, except for tokenize.ts. The reason is that the dependencies of the latter are quite large (~1.5 MB).