https://github.com/eibens/gpt3_utils
https://github.com/eibens/gpt3_utils
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eibens/gpt3_utils
- Owner: eibens
- License: mit
- Created: 2021-08-25T18:47:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-30T23:25:48.000Z (about 3 years ago)
- Last Synced: 2025-01-22T13:48:00.602Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpt3_utils
[gpt3_utils] is a set of tools for working with OpenAI's GPT3 API. It is
implemented in TypeScript for Deno.[![License][license-shield]](LICENSE) [![Github
tag][github-shield]][github]
[![Build][build-shield]][build] [![Code
coverage][coverage-shield]][coverage]# Getting Started
Set an environment variable called `OPENAI_API_KEY` with your API key. Then run
the example:```sh
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](example.ts) and [completions.ts](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:```ts
import * as openai from "https://raw.githubusercontent.com/eibens/gpt3_utils/{ref}/mod.ts";
```# Note on [tokenize.ts](tokenize.ts)
The [mod.ts](mod.ts) module exports all other modules, except for
[tokenize.ts](tokenize.ts). The reason is that the dependencies of the latter
are quite large (~1.5 MB).[gpt3_utils]: #
[deno third party]: https://deno.land/x/
[deno standard]: https://deno.land/std/[github]: https://github.com/eibens/gpt3_utils
[github-shield]: https://img.shields.io/github/v/tag/eibens/gpt3_utils?label&logo=github
[coverage-shield]: https://img.shields.io/codecov/c/github/eibens/gpt3_utils?logo=codecov&label
[license-shield]: https://img.shields.io/github/license/eibens/gpt3_utils?color=informational
[coverage]: https://codecov.io/gh/eibens/gpt3_utils
[build]: https://github.com/eibens/gpt3_utils/actions/workflows/ci.yml
[build-shield]: https://img.shields.io/github/workflow/status/eibens/gpt3_utils/ci?logo=github&label
[deno-land]: https://deno.land/x/gpt3_utils
[deno-land-shield]: https://img.shields.io/badge/x/module__url-informational?logo=deno&label