Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyzyla/chatgpt-nextjs-stream
Example of integrating of ChatGPT with "typing" effect to your Next.JS app using streaming response
https://github.com/hyzyla/chatgpt-nextjs-stream
Last synced: 1 day ago
JSON representation
Example of integrating of ChatGPT with "typing" effect to your Next.JS app using streaming response
- Host: GitHub
- URL: https://github.com/hyzyla/chatgpt-nextjs-stream
- Owner: hyzyla
- License: mit
- Created: 2023-03-19T11:34:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-19T13:45:32.000Z (almost 2 years ago)
- Last Synced: 2025-01-16T03:19:27.425Z (4 days ago)
- Language: TypeScript
- Size: 2.53 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example of ChatGPT integration with Next.JS
This is an example of how to integrate ChatGPT with Next.JS and make "typing" effect
by streaming the response from the OpenAI API.Main logic is in [pages/index.tsx](./src/pages/index.tsx) and [pages/api/chat.tsx](./src/pages/api/chat.ts) and everything else is just a
boilerplate code generated by Next.JS![Demo](./docs/demo.gif)
## How to run
```shell
npm install
npm run dev
```