The Complete Guide to Python/Django Web Service Development with React (Based on Django 4.2)
Solidify your foundation in Python/Django web service development. Learning Django takes time, but you can maximize your productivity through iterative development. Turn your imagination into reality.
677 learners
Level Basic
Course period Unlimited

We share a Django sample project that leverages the OpenAI Realtime API.
A little while ago, a video testing the OpenAI Realtime API was uploaded to Teddy Note YouTube .
He showed me the code from the https://github.com/langchain-ai/react-voice-agent repository as is. The code in this repository is written based on Starlette and langchain.
I ported this to django/channels + langchain version. ;-)
https://github.com/pyhub-kr/pyhub-django-react-voice-agent
It is functionally identical to the react-voice-agent project. Just set the OPENAI_API_KEY environment variable and access the http://localhost:8000 page to make it work.
If you haven't seen the Teddy Note video above, watch it first, then try turning the code.
I used AsyncWebsocketConsumer from django channels.
#openai #realtime




