Open nkma1989 opened 2 months ago
Hey @nkma1989, I'm encountering a similar issue and wanted to share my thoughts. I believe the problem isn't with the Azure app service, but rather with the Docker container itself, as the same issue occurs even with a local build.
This issue is for a: (mark with an
x
)Description We have deployed a docker container with a FastAPI backend, that uses Azure OpenAI service to generate streaming responses. It's used as a part of a larger setup with a frontend to enable users to interact with OpenAI LLM's. When running to FastAPI locally it works as intended and streams the response, but when deploying to Azure Web App it does not.
Minimal steps to reproduce
1) Setup Azure Web App 2) Setup simple FastAPI app with a streamingresponse endpoint 3) Deploy simple FastAPI app in docker container to Azure Web App 4) Send a request to endpoint
Any log messages given by the failure
Logs seem to behave as intended, it looks like it's actually performing the streaming steps, however no payload is returned until it finishes.
Expected/desired behavior
Expects a streaming response, but waits for the entire payload. Screenshots Examples of local behavior vs Azure web app: Local streaming, indicating the number of chunks/elements recieved:![image](https://github.com/Azure/static-web-apps/assets/24934325/4f881cb8-848a-4390-89c5-bba9ab00da4f)
Now using the same request, but sending to the Azure Web App(contains multiple elements, but in one chunk):![image](https://github.com/Azure/static-web-apps/assets/24934325/26312777-e56f-44ab-97fa-b49004ef68a7)
Select Web App settings:
Docker image:
Poetry dependencies: