Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/formulahendry/openai-examples

Code Samples for OpenAI & ChatGPT API
https://github.com/formulahendry/openai-examples

Last synced: 4 days ago
JSON representation

Code Samples for OpenAI & ChatGPT API

Awesome Lists containing this project

README

        

# Code Samples for OpenAI & ChatGPT API

This repo contains code samples using the [OpenAI API](https://beta.openai.com/docs/introduction).

## Setup

1. If you don’t have Node.js installed, [install it from here](https://nodejs.org/en/)

1. Clone this repository

1. Install the requirements

```bash
$ npm install
```

1. Make a copy of the example environment variables file

On Linux systems:
```bash
$ cp .env.example .env
```
On Windows:
```powershell
$ copy .env.example .env
```
6. Add your [API key](https://beta.openai.com/account/api-keys) to the newly created `.env` file

7. Run the app

```bash
$ node xxx.js
```

## ChatGPT Bot Apps

* [ChatGPT WeChat Bot](https://github.com/formulahendry/chatgpt-wechat-bot)
* [ChatGPT Teams Bot](https://github.com/formulahendry/chatgpt-teams-bot)

## Reference

* [Documentation](https://beta.openai.com/docs/introduction)
* [Examples](https://beta.openai.com/examples)
* [Playground](https://beta.openai.com/playground)