Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/formulahendry/openai-examples
- Owner: formulahendry
- Created: 2023-01-04T04:51:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-02T20:51:14.000Z (over 1 year ago)
- Last Synced: 2024-11-01T14:36:58.384Z (11 days ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-gpt - Code Samples for OpenAI & Azure OpenAI
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` file7. 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)