https://github.com/paulkinlan/openai-breadboard-kit
https://github.com/paulkinlan/openai-breadboard-kit
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/paulkinlan/openai-breadboard-kit
- Owner: PaulKinlan
- License: apache-2.0
- Created: 2023-08-14T17:47:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-04T20:48:10.000Z (about 1 year ago)
- Last Synced: 2025-04-01T16:59:21.677Z (about 2 months ago)
- Language: TypeScript
- Size: 92.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# "Google Labs Breadboard" Kit for the OpenAI API
The OpenAI Breadboard Kit is a collection of [Breadboard](https://github.com/google/labs-prototypes/tree/main/seeds/breadboard) nodes that are helpful for building LLM-based (Generative AI) applications using the OpenAI API.
## Installing
OpenAI Breadboard Kit requires Node version >=v19.0.0. To install:
```sh
npm install @paulkinlan/openai-breadboard-kit
```## Node Types
Here are all node handlers that are included in the OpenAI Breadboard Kit
### The `generateCompletion` node
This is an [OpenAI API](https://platform.openai.com/docs) text completion node. To produce useful output, the node needs an `OPENAI_API_KEY` input and the `text` input and the `model` to run it against.
#### Example:
Given this input:
```json
{
"OPENAI_API_KEY": "",
"text": "How much wood can a woodchuck chuck?"
}
```The node will produce this output:
```json
{
"completion": "The exact amount a woodchuck can chuck is unknown, but it is believed that they can chuck about 700 pounds of wood in a day."
}
```#### Inputs:
- `OPENAI_API_KEY` required, must contain the OpenAI API key.
- `text` required, sent as the prompt for the completion.
- `model` the name of the model OpenAI that you want to use.#### Outputs:
- `completion` - result of the OpenAI API text completion.