Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GAE Flex streaming response with Django

We have a Django application for chatting. 
UI: Built in HTML, CSS, JS
Backend: ChatGPT API integrated in Python using below option to get word to word responses

 

 

stream = True

 

 

The flow is as follows:
An XMLHttpRequest is triggered on a button click from JavaScript which further calls an endpoint in Django which returns a word to word response(StreamingHttpResponse) from ChatGPT the UI is also parallelly updated with word to word approach. The word to word response works fine in local.

Problem:
When we try to host it in Google App Engine Flexible or Standard it waits for the whole response rather than showing it word to word, can anyone help me out with this ?

0 1 312
1 REPLY 1

You may want to try the serverless part of the forum. This has been posted to Apigee, for API Management

https://www.googlecloudcommunity.com/gc/Serverless/bd-p/cloud_serverless