最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to stop StreamingHttpResponse in Django on Google Cloud Run? - Stack Overflow

programmeradmin7浏览0评论

We have integrated the GPT API in our Django application running on Google Cloud Run. When a user makes a request, we send them a response using StreamingHttpResponse from django.http, enabling real-time streaming.

However, we currently do not have a way for users to stop an ongoing StreamingHttpResponse. We are looking for a solution to terminate the stream early if needed—without using WebSockets and without relying on Redis or other services that require VPC connectors, as they are costly for us at the moment.

Is there a way to achieve this within our existing Google Cloud Run setup?

发布评论

评论列表(0)

  1. 暂无评论