Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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
```