Skip to content

Commit

Permalink
fix(product-assistant): use header to disable nginx buffering (#25907)
Browse files Browse the repository at this point in the history
  • Loading branch information
skoob13 authored Oct 30, 2024
1 parent adf806f commit 68ddb00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion posthog/api/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ def generate():
{"prompt": human_message.content, "response": last_message},
)

return StreamingHttpResponse(generate(), content_type=ServerSentEventRenderer.media_type)
return StreamingHttpResponse(
generate(), content_type=ServerSentEventRenderer.media_type, headers={"X-Accel-Buffering": "no"}
)

def handle_column_ch_error(self, error):
if getattr(error, "message", None):
Expand Down

0 comments on commit 68ddb00

Please sign in to comment.