Skip to content

Example of real time response stream using OpenAI API and Flask

Notifications You must be signed in to change notification settings

thevarunaditya/gptStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPTStream: Live GPT Responses

GPTStream is a personal project I made to show an example of how a real time response stream from the OpenAI Python API would look like. This is a very basic python app written on the Flask Web Framework.

How to use

  1. Change the .env file to use your OpenAI API Key.

  2. Review the code to understand how it works. It may seem insignificant, but learning how to use OpenAI stream in Flask isnt as simple as it seems.

Why I made this

I had a lot of trouble finding how to make a real time stream work, so I've made sure to add a lot of comments in the code files to make it easy for a beginner to understand how to use and modify it.

If this helped you, I'd appreciate a star!

About

Example of real time response stream using OpenAI API and Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published