MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

Enable streaming for promptflow deployed to azure app service #124039

Closed Krish054 closed 2 months ago

Krish054 commented 2 months ago

I have deployed promptflow to app service with the help of this and this. Now I have an endpoint which looks something like - https://<app_name>.azurewebsites.net/score.

The endpoint works perfectly fine when it generates response without streaming. I want to enable streaming and I referred to this. I changed the 'content-type' and 'accept' values in the header as suggested, but still the endpoint fails and returns this as a response -

{
  "error": {
    "code": "UserError",
    "message": "Media type text/event-stream in Accept header is not acceptable. Supported media type(s) - application/json"
  }
}

For reference this is what my POST request looks like

POST https://<app_name>.azurewebsites.net/score
Content-Type: application/json
Authorization: Bearer <promptflow_api_key>
Accept: text/event-stream

{
    "question": "Hello",
    "chat_history": []
}

I also did notice that endpoint type is different in the documentation (i.e. https://<your-endpoint>.inference.ml.azure.com/score) but I have to deploy my promptflow to app service. Kindly advise on what can be done?


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

TPavanBalaji commented 2 months ago

@Krish054 Thanks for your feedback! We will investigate and update as appropriate.

Naveenommi-MSFT commented 2 months ago

Hello @Krish054 Thank you for your feedback! for your issue, I'd recommend working closer with our support team via an Azure support request. Or you can leverage our Q&A forum by posting your issue there so our community, and MVPs can further assist you in troubleshooting this issue or finding potential workarounds. Teams Q&A forum for technical questions about the configuration and administration of Microsoft Teams on Windows. Microsoft Teams Community forum