https://github.com/humanloop/humanloop-quickstart-node
https://github.com/humanloop/humanloop-quickstart-node
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/humanloop/humanloop-quickstart-node
- Owner: humanloop
- Created: 2022-08-30T14:57:43.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T22:36:00.000Z (over 3 years ago)
- Last Synced: 2025-01-09T06:45:19.203Z (over 1 year ago)
- Language: JavaScript
- Size: 84 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenAI API Quickstart - Node.js example app
This is an example pet name generator app used in the OpenAI API [quickstart tutorial](https://beta.openai.com/docs/quickstart). It uses the [Next.js](https://nextjs.org/) framework with [React](https://reactjs.org/). Check out the tutorial or follow the instructions below to get set up.
## Setup
1. If you don’t have Node.js installed, [install it from here](https://nodejs.org/en/)
2. Clone this repository
3. Navigate into the project directory
```bash
$ cd openai-quickstart-node
```
4. Install the requirements
```bash
$ npm install
```
5. Make a copy of the example environment variables file
```bash
$ cp .env.example .env
```
6. Add your OpenAI [API key](https://beta.openai.com/account/api-keys) to the newly created `.env` as `OPEN_API_KEY=...` and add your Humanloop [API key](https://app.humanloop.com/llama/settings) as `HUMANLOOP_API_KEY=...`
7. Run the app
```bash
$ npm run dev
```
You should now be able to access the app at [http://localhost:3000](http://localhost:3000)! For the full context behind this example app, check out the [tutorial](https://beta.openai.com/docs/quickstart).