MicrosoftDocs / azure-docs

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

Python SDK sample code out-dated for summarization #100597

Closed wangyuantao closed 1 year ago

wangyuantao commented 2 years ago

On this page: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/cognitive-services/language-service/summarization/includes/quickstarts/python-sdk.md

The sample code is legacy tasks format

            "tasks": [
                {
                    "taskName": "analyze 1",
                    "kind": "ConversationalSummarizationTask",
                    "parameters": {
                        "summaryAspects": ["Issue, Resolution"]
                    }
                }
            ]

The legacy format still works for back compat, but no longer recommended.

Please update to the latest format in this document: https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/summarization/quickstart?tabs=conversation-summarization&pivots=rest-api#conversation-issue-and-resolution-summarization

  "tasks": [
    {
      "taskName": "Conversation Task 1",
      "kind": "ConversationalSummarizationTask",
      "parameters": {
        "summaryAspects": ["issue"]
      }
    },
    {
      "taskName": "Conversation Task 2",
      "kind": "ConversationalSummarizationTask",
      "parameters": {
        "summaryAspects": ["resolution"],
        "sentenceCount": 1
      }
    }
  ]

Split aspects into multiple tasks is better to control the parameters, for example only resolution summary support sentenceCount parameter since 2022-10-01-preview.

Document Details

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

AjayBathini-MSFT commented 2 years ago

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

Naveenommi-MSFT commented 2 years ago

@jboback Could you please review this and update as appropriate.

Naveenommi-MSFT commented 2 years ago

@wangyuantao Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

wangyuantao commented 2 years ago

Can you please sync doc with this python SDK fix? https://github.com/Azure/azure-sdk-for-python/pull/27122

jboback commented 1 year ago

@wangyuantao I've added this bit of code to an upcoming PR. Marking as completed.

jboback commented 1 year ago

please-close