Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Summarization Sync/Streaming API #22132

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

wangyuantao
Copy link
Member

@wangyuantao wangyuantao commented Jan 10, 2023

Data Plane API - Pull Request

Design doc, hero scenarios and core concepts
https://microsoft.sharepoint.com/:p:/t/TextAnalyticsTeam/EaHfvJU41pFAvcTSfHrEXcYBLS4XOOMquE6s1zngQZhJJA?e=hM2IOQ

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your engagement record.

  • Link to engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous Open API document (swagger) if applicable, and the root paths that have been updated.

  • Design Document:
  • Previous Open API Doc:
  • Updated paths:

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

fix #22181

@openapi-workflow-bot
Copy link

Hi, @wangyuantao Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jan 10, 2023

    Swagger Validation Report

    ️❌BreakingChange: 1 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    generate.json 2023-04-01(6b9c089) 2023-04-01(main)
    Rule Message
    1038 - AddedPath The new version is adding a path that was not found in the old version.
    New: cognitiveservices/data-plane/Language/generate.json#L28:5
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️❌LintDiff: 2 Errors, 6 Warnings failed [Detail]
    compared tags (via openapi-validator v2.0.0) new version base version
    release_2023-04-01 release_2023-04-01(6b9c089) release_2023-04-01(main)

    [must fix]The following errors/warnings are introduced by current PR:

    Rule Message Related RPC [For API reviewers]
    HostParametersValidation The host parameter must be called 'endpoint'.
    Location: cognitiveservices/data-plane/Language/generate.json#L22
    HostParametersValidation The host parameter must be typed 'type 'string', format 'url''.
    Location: cognitiveservices/data-plane/Language/generate.json#L22
    ⚠️ ErrorResponse Error response should contain a x-ms-error-code header.
    Location: cognitiveservices/data-plane/Language/generate.json#L44
    ⚠️ AdditionalPropertiesAndProperties Don't specify additionalProperties as a sibling of properties.
    Location: cognitiveservices/data-plane/Language/generate.json#L46
    ⚠️ OperationId OperationId should be of the form 'Noun_Verb'
    Location: cognitiveservices/data-plane/Language/generate.json#L53
    ⚠️ ParameterDescription Parameter should have a description.
    Location: cognitiveservices/data-plane/Language/generate.json#L61
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: cognitiveservices/data-plane/Language/generate.json#L89
    ⚠️ PropertyDescription Property should have a description.
    Location: cognitiveservices/data-plane/Language/generate.json#L147
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️️✔️~[Staging] ServiceAPIReadinessTest succeeded [Detail] [Expand]
    Validation passes for ServiceAPIReadinessTest.
    ️❌SwaggerAPIView: 0 Errors, 1 Warnings failed [Detail]
    Rule Message
    ⚠️ Failed to generate swagger APIView. The readme file format is invalid and the tag is not defined. Use the provided readme template for guidance readme template. For more details, please check the detail log. "How to fix":"Check the readme file and make sure the readme file format is valid and the tag is defined. Use the provided readme template"
    ️️✔️CadlAPIView succeeded [Detail] [Expand]
    ️❌ModelValidation: 4 Errors, 0 Warnings failed [Detail]
    Rule Message
    INVALID_REQUEST_PARAMETER api-version 2023-05-01 is not equal to swagger version
    Url: cognitiveservices/data-plane/Language/generate.json#L29:15
    ExampleUrl: Language/examples/generate/SuccessfulExtractiveSummarizationRequest.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2023-05-01 is not equal to swagger version
    Url: cognitiveservices/data-plane/Language/generate.json#L29:15
    ExampleUrl: Language/examples/generate/SuccessfulAbstractiveSummarizationRequest.json#L2:17
    INVALID_REQUEST_PARAMETER api-version 2023-05-01 is not equal to swagger version
    Url: cognitiveservices/data-plane/Language/generate.json#L29:15
    ExampleUrl: Language/examples/generate/SuccessfulConversationSummarizationRequest.json#L2:17
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: conversationItems
    Url: cognitiveservices/data-plane/Language/generate.json#L164:38
    ExampleUrl: Language/examples/generate/SuccessfulConversationSummarizationRequest.json#L6:13
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jan 10, 2023

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking

    ️⚠️ azure-sdk-for-net-track2 warning [Detail]
    • ⚠️Warning [Logs] Generate from 477d4a4ec7a03ab234f6f4918e7881de2be4c313. SDK Automation 14.0.0
      command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
      command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
      warn	No file changes detected after generation
      warn	Skip detect changed packages
    ️⚠️ azure-sdk-for-python warning [Detail]
    • ⚠️Warning [Logs] Generate from 477d4a4ec7a03ab234f6f4918e7881de2be4c313. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh]
      cmderr	[automation_generate.sh] npm notice New major version of npm available! 8.19.3 -> 9.4.1
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.4.1>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
      warn	No file changes detected after generation
      warn	No package detected after generation
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jan 10, 2023

    Swagger pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.

    @ghost ghost added the Cognitive Services label Jan 10, 2023
    @openapi-workflow-bot
    Copy link

    NewApiVersionRequired reason:

    A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support.

    EXAMPLE: if a customer calls a service in the public cloud using api-version=2020-07-27, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features.

    @@ -30,6 +30,7 @@ input-file:
    - analyzeconversations-authoring.json
    - questionanswering.json
    - questionanswering-authoring.json
    - generate.json
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Is this file name temporary? Will this be going into another file, or is there a more descriptive file name that would be more obvious e.g., "summarization.json"?

    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I will create a feature branch for generative skills, and create another PR target against that feature branch to add summarization specific sync/stream API. The current PR mixed 2 purposes.

    },
    "SummarizationTask": {
    "type": "object",
    "description": "The summarization task.",
    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    describe this is abstract

    @ruowan
    Copy link
    Member

    ruowan commented Feb 2, 2023

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @konrad-jamrozik konrad-jamrozik added VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required and removed NewApiVersionRequired labels Mar 11, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Cognitive Services VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [Azure Cognitive service for language] API Review
    6 participants