Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dabit3/nextjs-chatgpt-plugin-starter
ChatGPT plugin starter project using Next.js
https://github.com/dabit3/nextjs-chatgpt-plugin-starter
chatgpt chatgpt-plugin chatgpt-plugins gpt openai
Last synced: about 1 month ago
JSON representation
ChatGPT plugin starter project using Next.js
- Host: GitHub
- URL: https://github.com/dabit3/nextjs-chatgpt-plugin-starter
- Owner: dabit3
- Created: 2023-04-11T12:54:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-25T06:18:18.000Z (over 1 year ago)
- Last Synced: 2024-06-01T00:40:42.177Z (3 months ago)
- Topics: chatgpt, chatgpt-plugin, chatgpt-plugins, gpt, openai
- Language: TypeScript
- Homepage:
- Size: 94.7 KB
- Stars: 209
- Watchers: 6
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - dabit3/nextjs-chatgpt-plugin-starter - ChatGPT plugin starter project using Next.js (TypeScript)
- awesome-ChatGPT-repositories - nextjs-chatgpt-plugin-starter - ChatGPT plugin starter project using Next.js (Browser-extensions)
README
## Next.js Boilerplate for a simple ChatGPT Plugin
This is essentially the JavaScript version of the Python app documented in the OpenAI Chat GPT docs.
I originally had trouble getting the headers and cors working properly so I figured I'd document how to do this here.
### Prerequisites
This app has no user interface, instead it's meant to use with GhatGPT's UI so therefore you must have access to ChatGPT plugins, which at the moment are still in beta.
### Project setup
1. Clone the repo, install depdendencies:
```sh
git clone [email protected]:dabit3/nextjs-chatgpt-starter.gitcd nextjs-chatgpt-starter
yarn # or npm install, pnpm
```2. Run the server
```sh
npm run buildnpm start
# If you run this in dev mode, the memory may not persist well as the server will randomly restart sometimes
```3. Set up your GPT Plugin in the ChatGPT Plugin UI.
When prompted for your website domain, type in 'http://localhost:3000'
### Usage
Ask for your list of todos:
```sh
what are my todos?
# or anything like that
```Add a todo:
```sh
add book flight to my todos
```Summarize todos:
```
How many todos do I have left?
```Or any other questions you might have.
### Configuration
To add more routes:
1. Create new route in `pages/api` directory.
2. Update `openapi.yaml` with new path
3. Update `openapi.yaml` with schema for any data model coming back or being passed in.