How to Stream OpenAI API Responses in a Flask App
Вставка
- Опубліковано 25 сер 2024
- In this video I'll demonstrate how to stream OpenAI API responses in your Flask apps using JavaScript.
Need one-on-one help with your project? I can help through my coaching program. Learn more here: prettyprinted....
Get the code here: prettyprinted....
Github: github.com/pre...
Twitter: / pretty_printed
You are a life saver with this video. Was looking for how to stream like this forever. Thanks so much!
Thanks!
Great video, would love to see one using the new streaming with the assistants api
I'll look into that and I'll see what I can do. My next video should also be an OpenAI API video.
Very helpful video!
I have found that when I stream output, the translation from markdown to HTML is sometimes applied incorrectly on list items (especially nested and ordered ones). I think that this could be due to some chunks lacking the full context needed for the HTML tags to be applied correctly. Do you have any ideas/ways to approach handling this?
Thanks bro,.....it really helped .....I was looking for implementation with flask..pls make another video on how to use these streaming api in python backend code with request module as well
What an opportunity for HTMX
Yup, HTMX would work well with this. Thanks for watching!
Cool!! I couldn't get this working in FastAPI
Thanks for watching!
Good example for an HTMX use case.
I'll consider using HTMX for this in a video. Thanks for watching!
I love your videos !! Can you make the same tutorial in node.js through I work in both flask and node.js but would really love to learn it in node !!
If I made more videos, I'd definitely do a Node version, but given my output these days, it's more likely to be either Django or FastAPI. Thanks for watching though!
Hi Great video, do already have it working for the assistent api, because my heads exploding. maybe you know. I have it in react, but want it in flask java
May you make a video where we can do an api using async ?
Do you mean this library with async? I don't think the streaming would well with an async approach (assuming your goal is to call the API multiple times)
Awesome
Thanks for watching!
Can you do how to set up rabitmq on flask
I'll consider that as a video. Thanks for watching!
❤
Thanks for watching!