From df9d0611dbe8092ed559b37e354424a96c26874b Mon Sep 17 00:00:00 2001 From: Jose Arriaga Maldonado <45773732+joseharriaga@users.noreply.github.com> Date: Mon, 14 Nov 2022 17:36:44 -0800 Subject: [PATCH] [Text Analytics] Add support for abstractive summarization (#32402) - Added `TextAnalyticsActions.AbstractSummaryActions` to perform abstractive summarization in a batch of actions. - Added `TextAnalyticsClient.StartAbstractSummary` and `StartAbstractSummaryAsync` to perform abstractive summarization on a collection of documents. --- .../Azure.AI.TextAnalytics/CHANGELOG.md | 2 + .../Azure.AI.TextAnalytics.netstandard2.0.cs | 84 ++++- .../src/AbstractSummaryAction.cs | 61 ++++ .../src/AbstractSummaryActionResult.cs | 49 +++ .../src/AbstractSummaryOperation.cs | 301 ++++++++++++++++++ .../src/AbstractSummaryOptions.cs | 30 ++ .../src/AbstractSummaryResult.cs | 62 ++++ .../src/AbstractSummaryResultCollection.cs | 81 +++++ .../src/AbstractiveSummary.cs | 37 +++ .../src/AnalyzeActionsResult.cs | 10 +- ...onResultBaseDocumentsItem.Serialization.cs | 6 +- ...iveSummarizationResultBaseDocumentsItem.cs | 4 +- ...tiveSummaryDocumentResult.Serialization.cs | 6 +- .../AbstractiveSummaryDocumentResult.cs | 6 +- ...stractiveSummaryInternal.Serialization.cs} | 12 +- ...mmary.cs => AbstractiveSummaryInternal.cs} | 14 +- ...> SummaryContextInternal.Serialization.cs} | 6 +- ...ryContext.cs => SummaryContextInternal.cs} | 6 +- .../Internal/AbstractiveSummaryInternal.cs | 12 + .../src/Internal/SummaryContextInternal.cs | 12 + .../ServiceClients/LanguageServiceClient.cs | 108 +++++++ .../src/ServiceClients/LegacyServiceClient.cs | 4 + .../src/ServiceClients/ServiceClient.cs | 16 + .../src/SummaryContext.cs | 29 ++ .../src/TextAnalyticsActions.cs | 5 + .../src/TextAnalyticsClient.cs | 282 +++++++++++++--- .../src/TextAnalyticsModelFactory.cs | 134 +++++++- .../Azure.AI.TextAnalytics/src/Transforms.cs | 82 ++++- .../tests/AbstractSummaryTests.cs | 277 ++++++++++++++++ .../tests/AnalyzeOperationTests.cs | 40 +++ .../AbstractSummaryBatchConvenienceTest.json | 253 +++++++++++++++ ...tractSummaryBatchConvenienceTestAsync.json | 291 +++++++++++++++++ ...aryBatchConvenienceWithStatisticsTest.json | 268 ++++++++++++++++ ...tchConvenienceWithStatisticsTestAsync.json | 268 ++++++++++++++++ .../AbstractSummaryBatchTest.json | 291 +++++++++++++++++ .../AbstractSummaryBatchTestAsync.json | 291 +++++++++++++++++ .../AbstractSummaryBatchWithErrorTest.json | 212 ++++++++++++ ...bstractSummaryBatchWithErrorTestAsync.json | 212 ++++++++++++ ...bstractSummaryBatchWithStatisticsTest.json | 268 ++++++++++++++++ ...ctSummaryBatchWithStatisticsTestAsync.json | 268 ++++++++++++++++ .../AbstractSummaryWithAADTest.json | 253 +++++++++++++++ .../AbstractSummaryWithAADTestAsync.json | 253 +++++++++++++++ .../AnalyzeOperationAbstractSummary.json | 161 ++++++++++ .../AnalyzeOperationAbstractSummaryAsync.json | 200 ++++++++++++ .../tests/TextAnalyticsModelFactoryTests.cs | 10 +- 45 files changed, 5194 insertions(+), 83 deletions(-) create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryAction.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryActionResult.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOperation.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOptions.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResult.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResultCollection.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractiveSummary.cs rename sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/{AbstractiveSummary.Serialization.cs => AbstractiveSummaryInternal.Serialization.cs} (75%) rename sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/{AbstractiveSummary.cs => AbstractiveSummaryInternal.cs} (74%) rename sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/{SummaryContext.Serialization.cs => SummaryContextInternal.Serialization.cs} (82%) rename sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/{SummaryContext.cs => SummaryContextInternal.cs} (88%) create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/AbstractiveSummaryInternal.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/SummaryContextInternal.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/src/SummaryContext.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/AbstractSummaryTests.cs create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTest.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTestAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTest.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTestAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTest.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTestAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTest.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTestAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTest.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTestAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTest.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTestAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummary.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummaryAsync.json diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md b/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md index fa7042fe90740..0e06f3a5b1e2f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md @@ -9,6 +9,8 @@ - Added `WellKnownFhirVersion` and `HealthcareDocumentType` enums. - Added `TextAnalyticsActions.ExtractSummaryActions` to perform extractive summarization in a batch of actions. - Added `TextAnalyticsClient.StartExtractSummary` and `StartExtractSummaryAsync` to perform extractive summarization on a collection of documents. +- Added `TextAnalyticsActions.AbstractSummaryActions` to perform abstractive summarization in a batch of actions. +- Added `TextAnalyticsClient.StartAbstractSummary` and `StartAbstractSummaryAsync` to perform abstractive summarization on a collection of documents. - Added `Script` property to `DetectedLanguage`. - Added `ScriptKind` enum. - Added the `CategorizedEntity.Resolutions` property. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs index c28ee015a83f2..00017f59a9250 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs @@ -1,5 +1,67 @@ namespace Azure.AI.TextAnalytics { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AbstractiveSummary + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public System.Collections.Generic.IReadOnlyCollection Contexts { get { throw null; } } + public string Text { get { throw null; } } + } + public partial class AbstractSummaryAction + { + public AbstractSummaryAction() { } + public AbstractSummaryAction(Azure.AI.TextAnalytics.AbstractSummaryOptions options) { } + public string ActionName { get { throw null; } set { } } + public bool? DisableServiceLogs { get { throw null; } set { } } + public int? MaxSentenceCount { get { throw null; } set { } } + public string ModelVersion { get { throw null; } set { } } + } + public partial class AbstractSummaryActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionResult + { + internal AbstractSummaryActionResult() { } + public Azure.AI.TextAnalytics.AbstractSummaryResultCollection DocumentsResults { get { throw null; } } + } + public partial class AbstractSummaryOperation : Azure.PageableOperation + { + protected AbstractSummaryOperation() { } + public AbstractSummaryOperation(string operationId, Azure.AI.TextAnalytics.TextAnalyticsClient client) { } + public virtual System.DateTimeOffset CreatedOn { get { throw null; } } + public virtual string DisplayName { get { throw null; } } + public virtual System.DateTimeOffset? ExpiresOn { get { throw null; } } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public virtual System.DateTimeOffset LastModified { get { throw null; } } + public virtual Azure.AI.TextAnalytics.TextAnalyticsOperationStatus Status { get { throw null; } } + public virtual void Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Pageable GetValues(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.AsyncPageable GetValuesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask>> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask>> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AbstractSummaryOptions : Azure.AI.TextAnalytics.TextAnalyticsRequestOptions + { + public AbstractSummaryOptions() { } + public string DisplayName { get { throw null; } set { } } + public int? MaxSentenceCount { get { throw null; } set { } } + } + public partial class AbstractSummaryResult : Azure.AI.TextAnalytics.TextAnalyticsResult + { + internal AbstractSummaryResult() { } + public System.Collections.Generic.IReadOnlyCollection Summaries { get { throw null; } } + public System.Collections.Generic.IReadOnlyCollection Warnings { get { throw null; } } + } + public partial class AbstractSummaryResultCollection : System.Collections.ObjectModel.ReadOnlyCollection + { + internal AbstractSummaryResultCollection() : base (default(System.Collections.Generic.IList)) { } + public string ModelVersion { get { throw null; } } + public Azure.AI.TextAnalytics.TextDocumentBatchStatistics Statistics { get { throw null; } } + } public partial class AgeResolution : Azure.AI.TextAnalytics.BaseResolution { internal AgeResolution() { } @@ -63,6 +125,7 @@ public AnalyzeActionsOptions() { } public partial class AnalyzeActionsResult { internal AnalyzeActionsResult() { } + public System.Collections.Generic.IReadOnlyCollection AbstractSummaryResults { get { throw null; } } public System.Collections.Generic.IReadOnlyCollection AnalyzeHealthcareEntitiesResults { get { throw null; } } public System.Collections.Generic.IReadOnlyCollection AnalyzeSentimentResults { get { throw null; } } public System.Collections.Generic.IReadOnlyCollection ExtractKeyPhrasesResults { get { throw null; } } @@ -1295,6 +1358,13 @@ internal SpeedResolution() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SummaryContext + { + private readonly int _dummyPrimitive; + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SummarySentence { private readonly object _dummy; @@ -1418,6 +1488,7 @@ internal TextAnalyticsActionResult() { } public partial class TextAnalyticsActions { public TextAnalyticsActions() { } + public System.Collections.Generic.IReadOnlyCollection AbstractSummaryActions { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyCollection AnalyzeHealthcareEntitiesActions { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyCollection AnalyzeSentimentActions { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } @@ -1508,6 +1579,10 @@ public TextAnalyticsClient(System.Uri endpoint, Azure.Core.TokenCredential crede public virtual Azure.Response RecognizePiiEntitiesBatch(System.Collections.Generic.IEnumerable documents, string language = null, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RecognizePiiEntitiesBatchAsync(System.Collections.Generic.IEnumerable documents, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RecognizePiiEntitiesBatchAsync(System.Collections.Generic.IEnumerable documents, string language = null, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AI.TextAnalytics.AbstractSummaryOperation StartAbstractSummary(System.Collections.Generic.IEnumerable documents, Azure.AI.TextAnalytics.AbstractSummaryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AI.TextAnalytics.AbstractSummaryOperation StartAbstractSummary(System.Collections.Generic.IEnumerable documents, string language = null, Azure.AI.TextAnalytics.AbstractSummaryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAbstractSummaryAsync(System.Collections.Generic.IEnumerable documents, Azure.AI.TextAnalytics.AbstractSummaryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAbstractSummaryAsync(System.Collections.Generic.IEnumerable documents, string language = null, Azure.AI.TextAnalytics.AbstractSummaryOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AI.TextAnalytics.AnalyzeActionsOperation StartAnalyzeActions(System.Collections.Generic.IEnumerable documents, Azure.AI.TextAnalytics.TextAnalyticsActions actions, Azure.AI.TextAnalytics.AnalyzeActionsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AI.TextAnalytics.AnalyzeActionsOperation StartAnalyzeActions(System.Collections.Generic.IEnumerable documents, Azure.AI.TextAnalytics.TextAnalyticsActions actions, string language = null, Azure.AI.TextAnalytics.AnalyzeActionsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartAnalyzeActionsAsync(System.Collections.Generic.IEnumerable documents, Azure.AI.TextAnalytics.TextAnalyticsActions actions, Azure.AI.TextAnalytics.AnalyzeActionsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1596,6 +1671,12 @@ internal TextAnalyticsInput() { } } public static partial class TextAnalyticsModelFactory { + public static Azure.AI.TextAnalytics.AbstractiveSummary AbstractiveSummary(string text, System.Collections.Generic.IList contexts) { throw null; } + public static Azure.AI.TextAnalytics.AbstractSummaryActionResult AbstractSummaryActionResult(Azure.AI.TextAnalytics.AbstractSummaryResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.AbstractSummaryActionResult AbstractSummaryActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.AbstractSummaryResult AbstractSummaryResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, System.Collections.Generic.IList summaries, System.Collections.Generic.IList warnings = null) { throw null; } + public static Azure.AI.TextAnalytics.AbstractSummaryResult AbstractSummaryResult(string id, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.AbstractSummaryResultCollection AbstractSummaryResultCollection(System.Collections.Generic.IList results, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } public static Azure.AI.TextAnalytics.AgeResolution AgeResolution(Azure.AI.TextAnalytics.AgeUnit unit, double value) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AI.TextAnalytics.AnalyzeActionsResult AnalyzeActionsResult(System.Collections.Generic.IEnumerable extractKeyPhrasesActionResult, System.Collections.Generic.IEnumerable recognizeEntitiesActionResults, System.Collections.Generic.IEnumerable recognizePiiEntitiesActionResults, System.Collections.Generic.IEnumerable recognizeLinkedEntitiesActionsResults, System.Collections.Generic.IEnumerable analyzeSentimentActionsResults) { throw null; } @@ -1603,7 +1684,7 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.AnalyzeActionsResult AnalyzeActionsResult(System.Collections.Generic.IEnumerable extractKeyPhrasesActionResults, System.Collections.Generic.IEnumerable recognizeEntitiesActionResults, System.Collections.Generic.IEnumerable recognizePiiEntitiesActionResults, System.Collections.Generic.IEnumerable recognizeLinkedEntitiesActionResults, System.Collections.Generic.IEnumerable analyzeSentimentActionResults, System.Collections.Generic.IEnumerable recognizeCustomEntitiesActionResults, System.Collections.Generic.IEnumerable singleLabelClassifyActionResults, System.Collections.Generic.IEnumerable multiLabelClassifyActionResults) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AI.TextAnalytics.AnalyzeActionsResult AnalyzeActionsResult(System.Collections.Generic.IEnumerable extractKeyPhrasesActionResults, System.Collections.Generic.IEnumerable recognizeEntitiesActionResults, System.Collections.Generic.IEnumerable recognizePiiEntitiesActionResults, System.Collections.Generic.IEnumerable recognizeLinkedEntitiesActionResults, System.Collections.Generic.IEnumerable analyzeSentimentActionResults, System.Collections.Generic.IEnumerable recognizeCustomEntitiesActionResults, System.Collections.Generic.IEnumerable singleLabelClassifyActionResults, System.Collections.Generic.IEnumerable multiLabelClassifyActionResults, System.Collections.Generic.IEnumerable analyzeHealthcareEntitiesActionResults) { throw null; } - public static Azure.AI.TextAnalytics.AnalyzeActionsResult AnalyzeActionsResult(System.Collections.Generic.IEnumerable extractKeyPhrasesActionResults, System.Collections.Generic.IEnumerable recognizeEntitiesActionResults, System.Collections.Generic.IEnumerable recognizePiiEntitiesActionResults, System.Collections.Generic.IEnumerable recognizeLinkedEntitiesActionResults, System.Collections.Generic.IEnumerable analyzeSentimentActionResults, System.Collections.Generic.IEnumerable recognizeCustomEntitiesActionResults, System.Collections.Generic.IEnumerable singleLabelClassifyActionResults, System.Collections.Generic.IEnumerable multiLabelClassifyActionResults, System.Collections.Generic.IEnumerable analyzeHealthcareEntitiesActionResults, System.Collections.Generic.IEnumerable extractSummaryActionResults) { throw null; } + public static Azure.AI.TextAnalytics.AnalyzeActionsResult AnalyzeActionsResult(System.Collections.Generic.IEnumerable extractKeyPhrasesActionResults, System.Collections.Generic.IEnumerable recognizeEntitiesActionResults, System.Collections.Generic.IEnumerable recognizePiiEntitiesActionResults, System.Collections.Generic.IEnumerable recognizeLinkedEntitiesActionResults, System.Collections.Generic.IEnumerable analyzeSentimentActionResults, System.Collections.Generic.IEnumerable recognizeCustomEntitiesActionResults, System.Collections.Generic.IEnumerable singleLabelClassifyActionResults, System.Collections.Generic.IEnumerable multiLabelClassifyActionResults, System.Collections.Generic.IEnumerable analyzeHealthcareEntitiesActionResults, System.Collections.Generic.IEnumerable extractSummaryActionResults, System.Collections.Generic.IEnumerable abstractSummaryActionResults) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesActionResult AnalyzeHealthcareEntitiesActionResult(Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesActionResult AnalyzeHealthcareEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1731,6 +1812,7 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.SingleLabelClassifyActionResult SingleLabelClassifyActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.SingleLabelClassifyActionResult SingleLabelClassifyActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.SpeedResolution SpeedResolution(Azure.AI.TextAnalytics.SpeedUnit unit, double value) { throw null; } + public static Azure.AI.TextAnalytics.SummaryContext SummaryContext(int offset, int length) { throw null; } public static Azure.AI.TextAnalytics.SummarySentence SummarySentence(string text, double rankScore, int offset, int length) { throw null; } public static Azure.AI.TextAnalytics.SummarySentenceCollection SummarySentenceCollection(System.Collections.Generic.IList sentences, System.Collections.Generic.IList warnings = null) { throw null; } public static Azure.AI.TextAnalytics.TargetSentiment TargetSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double negativeScore, int offset, int length) { throw null; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryAction.cs new file mode 100644 index 0000000000000..5e23f746cb617 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryAction.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// A set of options used to configure abstractive summarization, including the model version to use, the maximum + /// number of sentences that the resulting summary can have, and more. + /// + public class AbstractSummaryAction + { + /// + /// Initializes a new instance of the class. + /// + public AbstractSummaryAction() + { + } + + /// + /// Initializes a new instance of the class based on the given + /// . It sets the , + /// , and properties. + /// + public AbstractSummaryAction(AbstractSummaryOptions options) + { + ModelVersion = options.ModelVersion; + DisableServiceLogs = options.DisableServiceLogs; + MaxSentenceCount = options.MaxSentenceCount; + } + + /// + /// The version of the text analytics model that will be used to generate the result. To learn more about the + /// supported model versions for each feature, see + /// . + /// + public string ModelVersion { get; set; } + + /// + /// Indicates whether the service logs your input text for 48 hours, which is solely to allow for + /// troubleshooting, if needed. Setting this property to true disables input logging and may limit our + /// ability to investigate any issues that occur. If not set, the service default is used. + /// + /// Please see the Cognitive Services Compliance and Privacy notes at + /// for additional details, and the Microsoft Responsible AI + /// principles at . + /// + /// + public bool? DisableServiceLogs { get; set; } + + /// + /// The name of this action. If not set, the service will generate one. + /// + public string ActionName { get; set; } + + /// + /// The maximum number of sentences that the resulting summaries can have. If not set, the service default is + /// used. + /// + public int? MaxSentenceCount { get; set; } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryActionResult.cs new file mode 100644 index 0000000000000..ab5d7b285bd4c --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryActionResult.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.AI.TextAnalytics.Models; + +namespace Azure.AI.TextAnalytics +{ + /// + /// A representation of the result of performing an on a given set of + /// documents. + /// + public class AbstractSummaryActionResult : TextAnalyticsActionResult + { + private readonly AbstractSummaryResultCollection _documentsResults; + + /// + /// Initializes a successful . + /// + internal AbstractSummaryActionResult( + AbstractSummaryResultCollection result, string actionName, DateTimeOffset completedOn) + : base(actionName, completedOn) + { + _documentsResults = result; + } + + /// + /// Initializes an with an error. + /// + internal AbstractSummaryActionResult(string actionName, DateTimeOffset completedOn, Error error) + : base(actionName, completedOn, error) { } + + /// + /// The collection of results corresponding to each given document. + /// + public AbstractSummaryResultCollection DocumentsResults + { + get + { + if (HasError) + { + throw new InvalidOperationException( + $"Cannot access the results of this action, due to error {Error.ErrorCode}: {Error.Message}"); + } + return _documentsResults; + } + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOperation.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOperation.cs new file mode 100644 index 0000000000000..dc802328d9f55 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOperation.cs @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure.AI.TextAnalytics.Models; +using Azure.AI.TextAnalytics.ServiceClients; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.TextAnalytics +{ + /// + /// A representation of abstractive summarization being performed on a given set of documents as a pageable, + /// long-running operation. + /// + public class AbstractSummaryOperation + : PageableOperation, IOperation> + { + internal readonly IDictionary _idToIndexMap; + + private readonly bool? _showStats; + private readonly string _jobId; + private readonly ServiceClient _serviceClient; + private readonly ClientDiagnostics _diagnostics; + private readonly OperationInternal> _operationInternal; + + private TextAnalyticsOperationStatus _status; + private DateTimeOffset? _expiresOn; + private DateTimeOffset _lastModified; + private DateTimeOffset _createdOn; + private string _displayName; + private Page _firstPage; + + /// + /// The identifier of the long-running operation, which can be used to poll its current status. + /// + public override string Id { get; } + + /// + /// The display name of the long-running operation. + /// + public virtual string DisplayName => _displayName; + + /// + /// The time when the long-running operation was created. + /// + public virtual DateTimeOffset CreatedOn => _createdOn; + + /// + /// The time when the long-running operation will expire. + /// + public virtual DateTimeOffset? ExpiresOn => _expiresOn; + + /// + /// The time when the long-running operation was last modified. + /// + public virtual DateTimeOffset LastModified => _lastModified; + + /// + /// The status of the long-running operation. + /// + public virtual TextAnalyticsOperationStatus Status => _status; + + /// + /// Indicates whether the long-running operation has completed. + /// + public override bool HasCompleted => _operationInternal.HasCompleted; + + /// + /// Indicates whether the long-running operation has completed successfully and produced a final result. + /// + public override bool HasValue => _operationInternal.HasValue; + + /// + /// Initializes a new instance of the class. + /// + /// The identifier of the long-running operation. + /// The client used to check for completion. + /// + /// is an empty string or does not represent a valid continuation token from the + /// property returned on the original operation. + /// + /// + /// or is null. + /// + public AbstractSummaryOperation(string operationId, TextAnalyticsClient client) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + Argument.AssertNotNull(client, nameof(client)); + + try + { + OperationContinuationToken token = OperationContinuationToken.Deserialize(operationId); + + _jobId = token.JobId; + _showStats = token.ShowStats; + _idToIndexMap = token.InputDocumentOrder; + } + catch (Exception e) + { + throw new ArgumentException($"Invalid value. Please use the {nameof(AbstractSummaryOperation)}.{nameof(Id)} property value.", nameof(operationId), e); + } + + Id = operationId; + _serviceClient = client.ServiceClient; + _diagnostics = _serviceClient.Diagnostics; + _operationInternal = new(_diagnostics, this, rawResponse: null); + } + + /// + /// Initializes a new instance of the class. + /// + internal AbstractSummaryOperation( + ServiceClient serviceClient, + ClientDiagnostics diagnostics, + string operationLocation, + IDictionary idToIndexMap, + bool? showStats = default) + { + _serviceClient = serviceClient; + _diagnostics = diagnostics; + _idToIndexMap = idToIndexMap; + _showStats = showStats; + _operationInternal = new(_diagnostics, this, rawResponse: null); + + _jobId = operationLocation.Split('/').Last().Split('?')[0]; + + Id = OperationContinuationToken.Serialize(_jobId, idToIndexMap, showStats); + } + + /// + /// Initializes a new instance of the class. This constructor is only + /// intended for mocking. + /// + protected AbstractSummaryOperation() + { + } + + /// + /// Gets the last HTTP response received from the server associated with this long-running operation. + /// + /// + /// An instance of sends requests to a server in UpdateStatusAsync, UpdateStatus, and other methods. + /// Responses from these requests can be accessed using GetRawResponse. + /// + public override Response GetRawResponse() => _operationInternal.RawResponse; + + /// + /// Updates the status of the long-running operation. + /// + /// + /// This operation will update the value returned by and might also update + /// , , and . + /// + /// The controlling the lifetime of the request. + /// The HTTP response received from the server. + public override Response UpdateStatus(CancellationToken cancellationToken = default) => + _operationInternal.UpdateStatus(cancellationToken); + + /// + /// Updates the status of the long-running operation. + /// + /// + /// This operation will update the value returned by and might also update + /// , , and . + /// + /// The controlling the lifetime of the request. + /// The HTTP response received from the server. + public override async ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => + await _operationInternal.UpdateStatusAsync(cancellationToken).ConfigureAwait(false); + + /// + /// Monitors the status of the long-running operation until it completes. + /// + /// + /// This method will periodically call until is + /// true. It will then return the final result of the operation. + /// + /// The controlling the lifetime of the request. + /// The HTTP response received from the server. + public override async ValueTask>> WaitForCompletionAsync(CancellationToken cancellationToken = default) => + await _operationInternal.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + + /// + /// Monitors the status of the long-running operation until it completes. + /// + /// This method will periodically call until is + /// true. It will then return the final result of the operation. + /// + /// The interval between status requests sent to the server. Note that this behavior can be overriden by the + /// server if it explicitly communicates to the client that it should wait a specific amount of time before + /// polling again. + /// + /// The controlling the lifetime of the request. + /// The HTTP response received from the server. + public override async ValueTask>> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => + await _operationInternal.WaitForCompletionAsync(pollingInterval, cancellationToken).ConfigureAwait(false); + + /// + /// Cancels the long-running operation, provided that it is still pending or running. + /// + /// The controlling the lifetime of the request. + public virtual void Cancel(CancellationToken cancellationToken = default) => + _serviceClient.CancelAnalyzeActionsJob(_jobId, cancellationToken); + + /// + /// Cancels the long-running operation, provided that it is still pending or running. + /// + /// The controlling the lifetime of the request. + public virtual async Task CancelAsync(CancellationToken cancellationToken = default) => + await _serviceClient.CancelAnalyzeActionsJobAsync(_jobId, cancellationToken).ConfigureAwait(false); + + /// + /// Gets the final result of the long-running operation. + /// + /// + /// The operation must have completed successfully (i.e., is true). + /// + /// The controlling the lifetime of the request. + public override Pageable GetValues(CancellationToken cancellationToken = default) + { + // Validates that the operation has completed successfully. + _ = _operationInternal.Value; + + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + var response = _serviceClient.AnalyzeTextJobStatusNextPage(nextLink, pageSizeHint, _idToIndexMap, cancellationToken); + return Page.FromValues(new List() { Transforms.ConvertToAbstractSummaryResultCollection(response.Value, _idToIndexMap) }, response.Value.NextLink, response.GetRawResponse()); + } + + return PageableHelpers.CreateEnumerable(_ => _firstPage, NextPageFunc); + } + + /// + /// Gets the final result of the long-running operation. + /// + /// + /// The operation must have completed successfully (i.e., is true). + /// + /// The controlling the lifetime of the request. + public override AsyncPageable GetValuesAsync(CancellationToken cancellationToken = default) + { + // Validates that the operation has completed successfully. + _ = _operationInternal.Value; + return CreateOperationValueAsync(cancellationToken); + } + + private AsyncPageable CreateOperationValueAsync(CancellationToken cancellationToken = default) + { + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + var response = await _serviceClient.AnalyzeTextJobStatusNextPageAsync(nextLink, pageSizeHint, _idToIndexMap, cancellationToken).ConfigureAwait(false); + return Page.FromValues(new List() { Transforms.ConvertToAbstractSummaryResultCollection(response.Value, _idToIndexMap) }, response.Value.NextLink, response.GetRawResponse()); + } + + return PageableHelpers.CreateAsyncEnumerable(_ => Task.FromResult(_firstPage), NextPageFunc); + } + + async ValueTask>> IOperation>.UpdateStateAsync(bool async, CancellationToken cancellationToken) + { + Response response = async + ? await _serviceClient.AnalyzeTextJobStatusAsync(_jobId, _showStats, null, null, _idToIndexMap, cancellationToken).ConfigureAwait(false) + : _serviceClient.AnalyzeTextJobStatus(_jobId, _showStats, null, null, _idToIndexMap, cancellationToken); + + _displayName = response.Value.DisplayName; + _createdOn = response.Value.CreatedDateTime; + _expiresOn = response.Value.ExpirationDateTime; + _lastModified = response.Value.LastUpdatedDateTime; + _status = response.Value.Status; + + Response rawResponse = response.GetRawResponse(); + + if (response.Value.Status == TextAnalyticsOperationStatus.Succeeded) + { + string nextLink = response.Value.NextLink; + _firstPage = Page.FromValues(new List() { Transforms.ConvertToAbstractSummaryResultCollection(response.Value, _idToIndexMap) }, nextLink, rawResponse); + + return OperationState>.Success(rawResponse, CreateOperationValueAsync(CancellationToken.None)); + } + else if (response.Value.Status == TextAnalyticsOperationStatus.Running || response.Value.Status == TextAnalyticsOperationStatus.NotStarted || response.Value.Status == TextAnalyticsOperationStatus.Cancelling) + { + return OperationState>.Pending(rawResponse); + } + else if (response.Value.Status == TextAnalyticsOperationStatus.Cancelled) + { + return OperationState>.Failure(rawResponse, + new RequestFailedException("The operation was canceled so no value is available.")); + } + + RequestFailedException requestFailedException = await ClientCommon + .CreateExceptionForFailedOperationAsync(async, _diagnostics, rawResponse, response.Value.Errors) + .ConfigureAwait(false); + + return OperationState>.Failure(rawResponse, requestFailedException); + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOptions.cs new file mode 100644 index 0000000000000..957bfbf45bd8c --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryOptions.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// A set of options used to configure abstractive summarization, including the display name to use, the maximum + /// number of sentences that the resulting summary can have, and more. + /// + public class AbstractSummaryOptions : TextAnalyticsRequestOptions + { + /// + /// Initializes a new instance of the class. + /// + public AbstractSummaryOptions() + { + } + + /// + /// The optional display name of the operation. + /// + public string DisplayName { get; set; } + + /// + /// The maximum number of sentences that the resulting summaries can have. If not set, the service default is + /// used. + /// + public int? MaxSentenceCount { get; set; } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResult.cs new file mode 100644 index 0000000000000..f557b11084064 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResult.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Azure.AI.TextAnalytics +{ + /// + /// A representation of the result of performing abstractive summarization on a given document. + /// + public partial class AbstractSummaryResult : TextAnalyticsResult + { + private readonly IReadOnlyCollection _summaries; + + /// + /// Initializes a successful . + /// + internal AbstractSummaryResult( + string id, + TextDocumentStatistics statistics, + IList summaries, + IList warnings) + : base(id, statistics) + { + _summaries = (summaries is not null) + ? new ReadOnlyCollection(summaries) + : new List(); + + Warnings = (warnings is not null) + ? new ReadOnlyCollection(warnings) + : new List(); + } + + /// + /// Initializes an with an error. + /// + internal AbstractSummaryResult(string id, TextAnalyticsError error) : base(id, error) { } + + /// + /// The warnings the resulted from processing the document. + /// + public IReadOnlyCollection Warnings { get; } = new List(); + + /// + /// The collection of resulting summaries for the given document. + /// + public IReadOnlyCollection Summaries + { + get + { + if (HasError) + { + throw new InvalidOperationException( + $"Cannot access result for document {Id}, due to error {Error.ErrorCode}: {Error.Message}"); + } + return _summaries; + } + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResultCollection.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResultCollection.cs new file mode 100644 index 0000000000000..d2948389c06e4 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractSummaryResultCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Linq; + +namespace Azure.AI.TextAnalytics +{ + /// + /// A collection of the results of performing abstractive summarization on a given set of documents. + /// + [DebuggerTypeProxy(typeof(AbstractSummaryResultCollectionDebugView))] + public class AbstractSummaryResultCollection : ReadOnlyCollection + { + /// + /// Initializes a new instance of the class. + /// + internal AbstractSummaryResultCollection( + IList list, TextDocumentBatchStatistics statistics, string modelVersion) + : base(list) + { + Statistics = statistics; + ModelVersion = modelVersion; + } + + /// + /// The statistics associated with the results and how they were produced by the service. The value is null + /// unless or + /// was used to explicitly request that these were + /// included as part of the results. + /// + public TextDocumentBatchStatistics Statistics { get; } + + /// + /// The version of the text analytics model that was used to generate the results. To learn more about the + /// supported model versions for each feature, see + /// . + /// + public string ModelVersion { get; } + + /// + /// A debugger proxy for the class. + /// + internal class AbstractSummaryResultCollectionDebugView + { + private AbstractSummaryResultCollection BaseCollection { get; } + + public AbstractSummaryResultCollectionDebugView(AbstractSummaryResultCollection collection) + { + BaseCollection = collection; + } + + [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] + public List Items + { + get + { + return BaseCollection.ToList(); + } + } + + public TextDocumentBatchStatistics Statistics + { + get + { + return BaseCollection.Statistics; + } + } + + public string ModelVersion + { + get + { + return BaseCollection.ModelVersion; + } + } + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractiveSummary.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractiveSummary.cs new file mode 100644 index 0000000000000..fcac75bafd955 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AbstractiveSummary.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using Azure.AI.TextAnalytics.Models; + +namespace Azure.AI.TextAnalytics +{ + /// + /// A summary produced by the service from a given document. + /// + public readonly struct AbstractiveSummary + { + internal AbstractiveSummary(AbstractiveSummaryInternal summary) + { + Text = summary.Text; + + List contexts = new(); + foreach (SummaryContextInternal context in summary.Contexts) + { + contexts.Add(new SummaryContext(context)); + } + Contexts = contexts; + } + + /// + /// The text of the summary. + /// + public string Text { get; } + + /// + /// The collection of objects that reference the text that was used as context by + /// the service to produce the summary. + /// + public IReadOnlyCollection Contexts { get; } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsResult.cs index 001c382e50f7a..3e2e92e9d9f05 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsResult.cs @@ -21,7 +21,8 @@ internal AnalyzeActionsResult( IReadOnlyCollection singleLabelClassifyActionResults, IReadOnlyCollection multiLabelClassifyActionResults, IReadOnlyCollection analyzeHealthcareEntitiesActionResults, - IReadOnlyCollection extractSummaryActionResults + IReadOnlyCollection extractSummaryActionResults, + IReadOnlyCollection abstractSummaryActionResults ) { ExtractKeyPhrasesResults = extractKeyPhrasesActionResults; @@ -34,6 +35,7 @@ IReadOnlyCollection extractSummaryActionResults MultiLabelClassifyResults = multiLabelClassifyActionResults; AnalyzeHealthcareEntitiesResults = analyzeHealthcareEntitiesActionResults; ExtractSummaryResults = extractSummaryActionResults; + AbstractSummaryResults = abstractSummaryActionResults; } internal AnalyzeActionsResult( @@ -54,6 +56,7 @@ IReadOnlyCollection analyzeSentimentActionResults RecognizeCustomEntitiesResults = Array.Empty(); AnalyzeHealthcareEntitiesResults = Array.Empty(); ExtractSummaryResults = Array.Empty(); + AbstractSummaryResults = Array.Empty(); } /// @@ -105,5 +108,10 @@ IReadOnlyCollection analyzeSentimentActionResults /// Determines the collection of . /// public IReadOnlyCollection ExtractSummaryResults { get; } + + /// + /// Determines the collection of . + /// + public IReadOnlyCollection AbstractSummaryResults { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.Serialization.cs index 561e4fd4a8b1e..2e8430e116be0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.Serialization.cs @@ -49,7 +49,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static AbstractiveSummarizationResultBaseDocumentsItem DeserializeAbstractiveSummarizationResultBaseDocumentsItem(JsonElement element) { Optional detectedLanguage = default; - IList summaries = default; + IList summaries = default; string id = default; IList warnings = default; Optional statistics = default; @@ -67,10 +67,10 @@ internal static AbstractiveSummarizationResultBaseDocumentsItem DeserializeAbstr } if (property.NameEquals("summaries")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AbstractiveSummary.DeserializeAbstractiveSummary(item)); + array.Add(AbstractiveSummaryInternal.DeserializeAbstractiveSummaryInternal(item)); } summaries = array; continue; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.cs index c52e5057d464c..d5f2660f4f9ad 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummarizationResultBaseDocumentsItem.cs @@ -20,7 +20,7 @@ internal partial class AbstractiveSummarizationResultBaseDocumentsItem : Abstrac /// Warnings encountered while processing document. /// A list of abstractive summaries. /// , or is null. - public AbstractiveSummarizationResultBaseDocumentsItem(string id, IEnumerable warnings, IEnumerable summaries) : base(id, warnings, summaries) + public AbstractiveSummarizationResultBaseDocumentsItem(string id, IEnumerable warnings, IEnumerable summaries) : base(id, warnings, summaries) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); @@ -33,7 +33,7 @@ public AbstractiveSummarizationResultBaseDocumentsItem(string id, IEnumerable if showStats=true was specified in the request this field will contain information about the document payload. /// A list of abstractive summaries. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - internal AbstractiveSummarizationResultBaseDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList summaries, DetectedLanguageInternal? detectedLanguage) : base(id, warnings, statistics, summaries) + internal AbstractiveSummarizationResultBaseDocumentsItem(string id, IList warnings, TextDocumentStatistics? statistics, IList summaries, DetectedLanguageInternal? detectedLanguage) : base(id, warnings, statistics, summaries) { DetectedLanguage = detectedLanguage; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs index 7ab1a973fa870..725193971436d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.Serialization.cs @@ -43,7 +43,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static AbstractiveSummaryDocumentResult DeserializeAbstractiveSummaryDocumentResult(JsonElement element) { - IList summaries = default; + IList summaries = default; string id = default; IList warnings = default; Optional statistics = default; @@ -51,10 +51,10 @@ internal static AbstractiveSummaryDocumentResult DeserializeAbstractiveSummaryDo { if (property.NameEquals("summaries")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AbstractiveSummary.DeserializeAbstractiveSummary(item)); + array.Add(AbstractiveSummaryInternal.DeserializeAbstractiveSummaryInternal(item)); } summaries = array; continue; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs index 94fb43b976fcc..95302541dea81 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryDocumentResult.cs @@ -21,7 +21,7 @@ internal partial class AbstractiveSummaryDocumentResult : DocumentResult /// Warnings encountered while processing document. /// A list of abstractive summaries. /// , or is null. - public AbstractiveSummaryDocumentResult(string id, IEnumerable warnings, IEnumerable summaries) : base(id, warnings) + public AbstractiveSummaryDocumentResult(string id, IEnumerable warnings, IEnumerable summaries) : base(id, warnings) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); @@ -35,12 +35,12 @@ public AbstractiveSummaryDocumentResult(string id, IEnumerable /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// A list of abstractive summaries. - internal AbstractiveSummaryDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList summaries) : base(id, warnings, statistics) + internal AbstractiveSummaryDocumentResult(string id, IList warnings, TextDocumentStatistics? statistics, IList summaries) : base(id, warnings, statistics) { Summaries = summaries; } /// A list of abstractive summaries. - public IList Summaries { get; } + public IList Summaries { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummary.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs similarity index 75% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummary.Serialization.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs index 99e187d720107..e1173fa470476 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummary.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.AI.TextAnalytics.Models { - internal partial class AbstractiveSummary : IUtf8JsonSerializable + internal partial class AbstractiveSummaryInternal : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -31,10 +31,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AbstractiveSummary DeserializeAbstractiveSummary(JsonElement element) + internal static AbstractiveSummaryInternal DeserializeAbstractiveSummaryInternal(JsonElement element) { string text = default; - Optional> contexts = default; + Optional> contexts = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text")) @@ -49,16 +49,16 @@ internal static AbstractiveSummary DeserializeAbstractiveSummary(JsonElement ele property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SummaryContext.DeserializeSummaryContext(item)); + array.Add(SummaryContextInternal.DeserializeSummaryContextInternal(item)); } contexts = array; continue; } } - return new AbstractiveSummary(text, Optional.ToList(contexts)); + return new AbstractiveSummaryInternal(text, Optional.ToList(contexts)); } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummary.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs similarity index 74% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummary.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs index 3ecc4d299a9b7..edb8d410d9d14 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummary.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AbstractiveSummaryInternal.cs @@ -12,23 +12,23 @@ namespace Azure.AI.TextAnalytics.Models { /// An object representing a single summary with context for given document. - internal partial class AbstractiveSummary + internal partial class AbstractiveSummaryInternal { - /// Initializes a new instance of AbstractiveSummary. + /// Initializes a new instance of AbstractiveSummaryInternal. /// The text of the summary. /// is null. - public AbstractiveSummary(string text) + public AbstractiveSummaryInternal(string text) { Argument.AssertNotNull(text, nameof(text)); Text = text; - Contexts = new ChangeTrackingList(); + Contexts = new ChangeTrackingList(); } - /// Initializes a new instance of AbstractiveSummary. + /// Initializes a new instance of AbstractiveSummaryInternal. /// The text of the summary. /// The context list of the summary. - internal AbstractiveSummary(string text, IList contexts) + internal AbstractiveSummaryInternal(string text, IList contexts) { Text = text; Contexts = contexts; @@ -37,6 +37,6 @@ internal AbstractiveSummary(string text, IList contexts) /// The text of the summary. public string Text { get; set; } /// The context list of the summary. - public IList Contexts { get; } + public IList Contexts { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContext.Serialization.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs similarity index 82% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContext.Serialization.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs index 5aab42f21fb50..9dd1ed39d7929 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContext.Serialization.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.AI.TextAnalytics.Models { - internal partial class SummaryContext : IUtf8JsonSerializable + internal partial class SummaryContextInternal : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static SummaryContext DeserializeSummaryContext(JsonElement element) + internal static SummaryContextInternal DeserializeSummaryContextInternal(JsonElement element) { int offset = default; int length = default; @@ -39,7 +39,7 @@ internal static SummaryContext DeserializeSummaryContext(JsonElement element) continue; } } - return new SummaryContext(offset, length); + return new SummaryContextInternal(offset, length); } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContext.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs similarity index 88% rename from sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContext.cs rename to sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs index c8bb002a53d25..002275fecb282 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContext.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/SummaryContextInternal.cs @@ -8,12 +8,12 @@ namespace Azure.AI.TextAnalytics.Models { /// The context of the summary. - internal partial class SummaryContext + internal partial class SummaryContextInternal { - /// Initializes a new instance of SummaryContext. + /// Initializes a new instance of SummaryContextInternal. /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. - public SummaryContext(int offset, int length) + public SummaryContextInternal(int offset, int length) { Offset = offset; Length = length; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/AbstractiveSummaryInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/AbstractiveSummaryInternal.cs new file mode 100644 index 0000000000000..fbdd5ce47c21e --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/AbstractiveSummaryInternal.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.AI.TextAnalytics.Models +{ + [CodeGenModel("AbstractiveSummary")] + internal partial class AbstractiveSummaryInternal + { + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/SummaryContextInternal.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/SummaryContextInternal.cs new file mode 100644 index 0000000000000..93654765f7869 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Internal/SummaryContextInternal.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.AI.TextAnalytics.Models +{ + [CodeGenModel("SummaryContext")] + internal partial class SummaryContextInternal + { + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LanguageServiceClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LanguageServiceClient.cs index 96767128510ec..0a56ce6cdba1f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LanguageServiceClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LanguageServiceClient.cs @@ -10,6 +10,7 @@ using Azure.AI.TextAnalytics.Models; using Azure.Core; using Azure.Core.Pipeline; +using static System.Collections.Specialized.BitVector32; namespace Azure.AI.TextAnalytics.ServiceClients { @@ -1868,6 +1869,10 @@ private IList CreateTasks(TextAnalyticsActions actions) { analyzeTasks.AddRange(Transforms.ConvertFromExtractSummaryActionsToTasks(actions.ExtractSummaryActions)); } + if (actions.AbstractSummaryActions != null) + { + analyzeTasks.AddRange(Transforms.ConvertFromAbstractSummaryActionsToTasks(actions.AbstractSummaryActions)); + } // Validate supported version. if (actions.ExtractSummaryActions != null && actions.ExtractSummaryActions.Count > 0) @@ -2195,6 +2200,109 @@ private async Task StartExtractSummaryAsync(MultiLangua #endregion + #region Abstract Summary + + public override AbstractSummaryOperation StartAbstractSummary(IEnumerable documents, string language = default, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documents, nameof(documents)); + MultiLanguageAnalysisInput input = ConvertToMultiLanguageInputs(documents, language); + + return StartAbstractSummary(input, options, cancellationToken); + } + + public override AbstractSummaryOperation StartAbstractSummary(IEnumerable documents, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documents, nameof(documents)); + MultiLanguageAnalysisInput input = ConvertToMultiLanguageInputs(documents); + + return StartAbstractSummary(input, options, cancellationToken); + } + + public override async Task StartAbstractSummaryAsync(IEnumerable documents, string language = default, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documents, nameof(documents)); + MultiLanguageAnalysisInput input = ConvertToMultiLanguageInputs(documents, language); + + return await StartAbstractSummaryAsync(input, options, cancellationToken).ConfigureAwait(false); + } + + public override async Task StartAbstractSummaryAsync(IEnumerable documents, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documents, nameof(documents)); + MultiLanguageAnalysisInput input = ConvertToMultiLanguageInputs(documents); + + return await StartAbstractSummaryAsync(input, options, cancellationToken).ConfigureAwait(false); + } + + private static AbstractiveSummarizationLROTask CreateAbstractiveSummarizationTask(AbstractSummaryOptions options) + { + AbstractiveSummarizationTaskParameters parameters = new() + { + ModelVersion = options.ModelVersion, + StringIndexType = Constants.DefaultStringIndexType, + LoggingOptOut = options.DisableServiceLogs, + SentenceCount = options.MaxSentenceCount, + }; + + return new AbstractiveSummarizationLROTask(parameters); + } + + private AbstractSummaryOperation StartAbstractSummary(MultiLanguageAnalysisInput multiLanguageInput, AbstractSummaryOptions options, CancellationToken cancellationToken) + { + options ??= new AbstractSummaryOptions(); + + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(TextAnalyticsClient)}.{nameof(StartAbstractSummary)}"); + scope.Start(); + + try + { + AnalyzeTextJobsInput input = new(multiLanguageInput, new List() { CreateAbstractiveSummarizationTask(options) }) + { + DisplayName = options.DisplayName, + }; + + var response = _languageRestClient.AnalyzeBatchSubmitJob(input, cancellationToken); + string location = response.Headers.OperationLocation; + IDictionary idToIndexMap = CreateIdToIndexMap(multiLanguageInput.Documents); + + return new AbstractSummaryOperation(this, _clientDiagnostics, location, idToIndexMap, options.IncludeStatistics); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + private async Task StartAbstractSummaryAsync(MultiLanguageAnalysisInput multiLanguageInput, AbstractSummaryOptions options, CancellationToken cancellationToken) + { + options ??= new AbstractSummaryOptions(); + + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(TextAnalyticsClient)}.{nameof(StartAbstractSummary)}"); + scope.Start(); + + try + { + AnalyzeTextJobsInput input = new(multiLanguageInput, new List() { CreateAbstractiveSummarizationTask(options) }) + { + DisplayName = options.DisplayName, + }; + + var response = await _languageRestClient.AnalyzeBatchSubmitJobAsync(input, cancellationToken).ConfigureAwait(false); + string location = response.Headers.OperationLocation; + IDictionary idToIndexMap = CreateIdToIndexMap(multiLanguageInput.Documents); + + return new AbstractSummaryOperation(this, _clientDiagnostics, location, idToIndexMap, options.IncludeStatistics); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + #endregion + #region Long Running Operations public override async Task> AnalyzeTextJobStatusAsync(string jobId, bool? showStats, int? top, int? skip, IDictionary idToIndexMap, CancellationToken cancellationToken = default) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LegacyServiceClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LegacyServiceClient.cs index cd933afa64271..94fb4bf7e67f1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LegacyServiceClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/LegacyServiceClient.cs @@ -1563,6 +1563,10 @@ private Legacy.JobManifestTasks CreateTasks(TextAnalyticsActions actions) { throw Validation.NotSupported(nameof(ExtractSummaryAction), TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview, ServiceVersion); } + if (actions.AbstractSummaryActions != null && actions.AbstractSummaryActions.Count > 0) + { + throw Validation.NotSupported(nameof(AbstractSummaryAction), TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview, ServiceVersion); + } return tasks; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/ServiceClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/ServiceClient.cs index c9e92514b35f4..614ad0732ae73 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/ServiceClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ServiceClients/ServiceClient.cs @@ -171,6 +171,22 @@ public virtual Task StartExtractSummaryAsync(IEnumerabl #endregion + #region Abstract Summary + + public virtual AbstractSummaryOperation StartAbstractSummary(IEnumerable documents, string language = default, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) => + throw Validation.NotSupported($"{nameof(TextAnalyticsClient)}.{nameof(TextAnalyticsClient.StartAbstractSummary)}", ServiceVersion.V2022_10_01_Preview, ServiceVersion); + + public virtual AbstractSummaryOperation StartAbstractSummary(IEnumerable documents, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) => + throw Validation.NotSupported($"{nameof(TextAnalyticsClient)}.{nameof(TextAnalyticsClient.StartAbstractSummary)}", ServiceVersion.V2022_10_01_Preview, ServiceVersion); + + public virtual Task StartAbstractSummaryAsync(IEnumerable documents, string language = default, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) => + throw Validation.NotSupported($"{nameof(TextAnalyticsClient)}.{nameof(TextAnalyticsClient.StartAbstractSummaryAsync)}", ServiceVersion.V2022_10_01_Preview, ServiceVersion); + + public virtual Task StartAbstractSummaryAsync(IEnumerable documents, AbstractSummaryOptions options = default, CancellationToken cancellationToken = default) => + throw Validation.NotSupported($"{nameof(TextAnalyticsClient)}.{nameof(TextAnalyticsClient.StartAbstractSummaryAsync)}", ServiceVersion.V2022_10_01_Preview, ServiceVersion); + + #endregion + #region Long Running Operations public abstract Task> AnalyzeTextJobStatusAsync(string jobId, bool? showStats, int? top, int? skip, IDictionary idToIndexMap, CancellationToken cancellationToken = default); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SummaryContext.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SummaryContext.cs new file mode 100644 index 0000000000000..305d74f8adc5d --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SummaryContext.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.AI.TextAnalytics.Models; + +namespace Azure.AI.TextAnalytics +{ + /// + /// A representation of the text that was used as context by the service to produce a given summary. + /// + public readonly struct SummaryContext + { + internal SummaryContext(SummaryContextInternal context) + { + Offset = context.Offset; + Length = context.Length; + } + + /// + /// The starting position of the text used as context as it appears in the original document. + /// + public int Offset { get; } + + /// + /// The length of the text used as context as it appears in the original document. + /// + public int Length { get; } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs index fbb199421d07e..299a09eb854f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs @@ -86,5 +86,10 @@ public TextAnalyticsActions() /// The set of that will get executed on the input documents. /// public IReadOnlyCollection ExtractSummaryActions { get; set; } + + /// + /// The set of that will get executed on the input documents. + /// + public IReadOnlyCollection AbstractSummaryActions { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs index 9977adcb4b97b..3e10d720441ed 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs @@ -1657,117 +1657,175 @@ public virtual async Task StartAnalyzeHealth #region Analyze Operation /// - /// StartAnalyzeActionsAsync enables the application to execute multiple actions in a set of documents. It includes: + /// Performs one or more text analysis actions on a set of documents. The list of supported actions includes: /// /// Entity Recognition (Named, Linked, and Personally Identifiable Information (PII) entities) /// Key Phrases Extraction /// Sentiment Analysis /// Custom Entity Recognition /// Custom Single and Multi Label Classification - /// Extractive Text Summarization + /// Extractive Summarization + /// Abstractive Summarization /// /// For document length limits, maximum batch size, and supported text encoding, see more information /// here. /// /// /// - /// This method is only available for , , and newer. - /// See the service documentation for regional support of custom action features. + /// This method is only available for , + /// , and newer. See the service + /// documentation for regional + /// support of custom action features. /// /// The list of documents to analyze. + /// The to perform on the list of documents. /// The language that the document is written in. - /// The different to execute in the list of documents. - /// Sets the IncludeStatistcs property on the analyze action operation. - /// A controlling the request lifetime. - /// This method is only supported in service API version v3.1 and newer; and the , , , and are only supported in service API version 2022-05-01 and newer. - /// Service returned a non-success - /// status code. - public virtual async Task StartAnalyzeActionsAsync(IEnumerable documents, TextAnalyticsActions actions, string language = default, AnalyzeActionsOptions options = default, CancellationToken cancellationToken = default) => + /// The used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// This method is only supported in service API version v3.1 and newer. The + /// , , + /// , and are only supported + /// in service API version 2022-05-01 and newer. The and + /// are only supported in service API version 2022-10-01-preview and newer. + /// + /// + /// Service returned a non-success status code. + /// + public virtual async Task StartAnalyzeActionsAsync( + IEnumerable documents, + TextAnalyticsActions actions, + string language = default, + AnalyzeActionsOptions options = default, + CancellationToken cancellationToken = default) => await _serviceClient.StartAnalyzeActionsAsync(documents, actions, language, options, cancellationToken).ConfigureAwait(false); /// - /// StartAnalyzeActionsAsync enables the application to execute multiple actions in a set of documents. It includes: + /// Performs one or more text analysis actions on a set of documents. The list of supported actions includes: /// /// Entity Recognition (Named, Linked, and Personally Identifiable Information (PII) entities) /// Key Phrases Extraction /// Sentiment Analysis /// Custom Entity Recognition /// Custom Single and Multi Label Classification - /// Extractive Text Summarization + /// Extractive Summarization + /// Abstractive Summarization /// /// For document length limits, maximum batch size, and supported text encoding, see /// here. /// /// /// - /// This method is only available for , , and newer. - /// See the service documentation for regional support of custom action features. + /// This method is only available for , + /// , and newer. See the service + /// documentation for regional + /// support of custom action features. /// /// The list of documents to analyze. - /// The different to execute in the list of documents. + /// The to perform on the list of documents. /// The language that the document is written in. - /// Sets the IncludeStatistcs property on the analyze action operation. - /// A controlling the request lifetime. - /// This method is only supported in service API version v3.1 and newer; and the , , , and are only supported in service API version 2022-05-01 and newer. - /// Service returned a non-success - /// status code. - public virtual AnalyzeActionsOperation StartAnalyzeActions(IEnumerable documents, TextAnalyticsActions actions, string language = default, AnalyzeActionsOptions options = default, CancellationToken cancellationToken = default) => + /// The used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// This method is only supported in service API version v3.1 and newer. The + /// , , + /// , and are only supported + /// in service API version 2022-05-01 and newer. The and + /// are only supported in service API version 2022-10-01-preview and newer. + /// + /// + /// Service returned a non-success status code. + /// + public virtual AnalyzeActionsOperation StartAnalyzeActions( + IEnumerable documents, + TextAnalyticsActions actions, + string language = default, + AnalyzeActionsOptions options = default, + CancellationToken cancellationToken = default) => _serviceClient.StartAnalyzeActions(documents, actions, language, options, cancellationToken); /// - /// StartAnalyzeActionsAsync enables the application to execute multiple actions in a set of documents. It includes: + /// Performs one or more text analysis actions on a set of documents. The list of supported actions includes: /// /// Entity Recognition (Named, Linked, and Personally Identifiable Information (PII) entities) /// Key Phrases Extraction /// Sentiment Analysis /// Custom Entity Recognition /// Custom Single and Multi Label Classification - /// Extractive Text Summarization + /// Extractive Summarization + /// Abstractive Summarization /// /// For document length limits, maximum batch size, and supported text encoding, see /// here. /// /// /// - /// This method is only available for , , and newer. - /// See the service documentation for regional support of custom action features. + /// This method is only available for , + /// , and newer. See the service + /// documentation for regional + /// support of custom action features. /// /// The list of documents to analyze. - /// The different to execute in the list of documents. - /// Sets the IncludeStatistcs property on the analyze action operation. - /// A controlling the request lifetime. - /// This method is only supported in service API version v3.1 and newer; and the , , , and are only supported in service API version 2022-05-01 and newer. - /// Service returned a non-success - /// status code. - public virtual AnalyzeActionsOperation StartAnalyzeActions(IEnumerable documents, TextAnalyticsActions actions, AnalyzeActionsOptions options = default, CancellationToken cancellationToken = default) => + /// The to perform on the list of documents. + /// The used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// This method is only supported in service API version v3.1 and newer. The + /// , , + /// , and are only supported + /// in service API version 2022-05-01 and newer. The and + /// are only supported in service API version 2022-10-01-preview and newer. + /// + /// + /// Service returned a non-success status code. + /// + public virtual AnalyzeActionsOperation StartAnalyzeActions( + IEnumerable documents, + TextAnalyticsActions actions, + AnalyzeActionsOptions options = default, + CancellationToken cancellationToken = default) => _serviceClient.StartAnalyzeActions(documents, actions, options, cancellationToken); /// - /// StartAnalyzeActionsAsync enables the application to execute multiple actions in a set of documents. It includes: + /// Performs one or more text analysis actions on a set of documents. The list of supported actions includes: /// /// Entity Recognition (Named, Linked, and Personally Identifiable Information (PII) entities) /// Key Phrases Extraction /// Sentiment Analysis /// Custom Entity Recognition /// Custom Single and Multi Label Classification - /// Extractive Text Summarization + /// Extractive Summarization + /// Abstractive Summarization /// /// For document length limits, maximum batch size, and supported text encoding, see /// here. /// /// /// - /// This method is only available for , , and newer. - /// See the service documentation for regional support of custom action features. + /// This method is only available for , + /// , and newer. See the service + /// documentation for regional + /// support of custom action features. /// /// The list of documents to analyze. - /// The different to execute in the list of documents. - /// Sets the IncludeStatistcs property on the analyze action operation. - /// A controlling the request lifetime. - /// This method is only supported in service API version v3.1 and newer; and the , , , and are only supported in service API version 2022-05-01 and newer. - /// Service returned a non-success - /// status code. - public virtual async Task StartAnalyzeActionsAsync(IEnumerable documents, TextAnalyticsActions actions, AnalyzeActionsOptions options = default, CancellationToken cancellationToken = default) => + /// The to perform on the list of documents. + /// The used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// This method is only supported in service API version v3.1 and newer. The + /// , , + /// , and are only supported + /// in service API version 2022-05-01 and newer. The and + /// are only supported in service API version 2022-10-01-preview and newer. + /// + /// + /// Service returned a non-success status code. + /// + public virtual async Task StartAnalyzeActionsAsync( + IEnumerable documents, + TextAnalyticsActions actions, + AnalyzeActionsOptions options = default, + CancellationToken cancellationToken = default) => await _serviceClient.StartAnalyzeActionsAsync(documents, actions, options, cancellationToken).ConfigureAwait(false); #endregion @@ -2180,6 +2238,142 @@ public virtual async Task StartExtractSummaryAsync( #endregion + #region Abstract Summary + + /// + /// Performs abstractive summarization on a given set of documents, which consists of generating a summary with + /// concise, coherent sentences or words which are not simply extract sentences from the original document. + /// For a list of languages supported by this operation, see + /// . + /// For document length limits, maximum batch size, and supported text encoding, see + /// . + /// + /// + /// This method is only available for , and newer. + /// + /// The documents to analyze. + /// The language that the documents are written in. + /// The additional used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// An that can be used to monitor the status of the abstractive + /// summarization. Upon completion, the operation will contain the collections of summaries that were generated + /// for each document that was successfully analyzed. + /// + /// This method is only supported in service API version 2022-10-01-preview and newer. + /// Service returned a non-success status code. + /// is an empty collection. + /// is null. + public virtual AbstractSummaryOperation StartAbstractSummary( + IEnumerable documents, + string language = default, + AbstractSummaryOptions options = default, + CancellationToken cancellationToken = default) + { + options?.CheckSupported(ServiceVersion); + return _serviceClient.StartAbstractSummary(documents, language, options, cancellationToken); + } + + /// + /// Performs abstractive summarization on a given set of documents, which consists of generating a summary with + /// concise, coherent sentences or words which are not simply extract sentences from the original document. + /// For a list of languages supported by this operation, see + /// . + /// For document length limits, maximum batch size, and supported text encoding, see + /// . + /// + /// + /// This method is only available for , and newer. + /// + /// The documents to analyze. + /// The additional used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// An that can be used to monitor the status of the abstractive + /// summarization. Upon completion, the operation will contain the collections of summaries that were generated + /// for each document that was successfully analyzed. + /// + /// This method is only supported in service API version 2022-10-01-preview and newer. + /// Service returned a non-success status code. + /// is an empty collection. + /// is null. + public virtual AbstractSummaryOperation StartAbstractSummary( + IEnumerable documents, + AbstractSummaryOptions options = default, + CancellationToken cancellationToken = default) + { + options?.CheckSupported(ServiceVersion); + return _serviceClient.StartAbstractSummary(documents, options, cancellationToken); + } + + /// + /// Performs abstractive summarization on a given set of documents, which consists of generating a summary with + /// concise, coherent sentences or words which are not simply extract sentences from the original document. + /// For a list of languages supported by this operation, see + /// . + /// For document length limits, maximum batch size, and supported text encoding, see + /// . + /// + /// + /// This method is only available for , and newer. + /// + /// The documents to analyze. + /// The language that the documents are written in. + /// The additional used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// A that can be used to monitor the status of the abstractive + /// summarization. Upon completion, the operation will contain the collections of summaries that were generated + /// for each document that was successfully analyzed. + /// + /// This method is only supported in service API version 2022-10-01-preview and newer. + /// Service returned a non-success status code. + /// is an empty collection. + /// is null. + public virtual async Task StartAbstractSummaryAsync( + IEnumerable documents, + string language = default, + AbstractSummaryOptions options = default, + CancellationToken cancellationToken = default) + { + options?.CheckSupported(ServiceVersion); + return await _serviceClient.StartAbstractSummaryAsync(documents, language, options, cancellationToken).ConfigureAwait(false); + } + + /// + /// Performs abstractive summarization on a given set of documents, which consists of generating a summary with + /// concise, coherent sentences or words which are not simply extract sentences from the original document. + /// For a list of languages supported by this operation, see + /// . + /// For document length limits, maximum batch size, and supported text encoding, see + /// . + /// + /// + /// This method is only available for , and newer. + /// + /// The documents to analyze. + /// The additional used to configure the operation. + /// The controlling the lifetime of the request. + /// + /// A that can be used to monitor the status of the abstractive + /// summarization. Upon completion, the operation will contain the collections of summaries that were generated + /// for each document that was successfully analyzed. + /// + /// This method is only supported in service API version 2022-10-01-preview and newer. + /// Service returned a non-success status code. + /// is an empty collection. + /// is null. + public virtual async Task StartAbstractSummaryAsync( + IEnumerable documents, + AbstractSummaryOptions options = default, + CancellationToken cancellationToken = default) + { + options?.CheckSupported(ServiceVersion); + return await _serviceClient.StartAbstractSummaryAsync(documents, options, cancellationToken).ConfigureAwait(false); + } + + #endregion + #region nobody wants to see these /// /// Check if two TextAnalyticsClient instances are equal. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs index ed269b4ef641e..a497a7bc95c12 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs @@ -897,7 +897,8 @@ public static AnalyzeActionsResult AnalyzeActionsResult( new List(), new List(), new List(), - new List() + new List(), + new List() ); } @@ -934,7 +935,8 @@ public static AnalyzeActionsResult AnalyzeActionsResult( singleLabelClassifyActionResults.ToList(), multiLabelClassifyActionResults.ToList(), new List(), - new List() + new List(), + new List() ); } @@ -973,7 +975,8 @@ public static AnalyzeActionsResult AnalyzeActionsResult( singleLabelClassifyActionResults.ToList(), multiLabelClassifyActionResults.ToList(), analyzeHealthcareEntitiesActionResults.ToList(), - new List() + new List(), + new List() ); } @@ -990,6 +993,7 @@ public static AnalyzeActionsResult AnalyzeActionsResult( /// Sets the collection of . /// Sets the collection of . /// Sets the collection of . + /// Sets the collection of . /// A new instance of for mocking purposes. public static AnalyzeActionsResult AnalyzeActionsResult( IEnumerable extractKeyPhrasesActionResults, @@ -1001,7 +1005,8 @@ public static AnalyzeActionsResult AnalyzeActionsResult( IEnumerable singleLabelClassifyActionResults, IEnumerable multiLabelClassifyActionResults, IEnumerable analyzeHealthcareEntitiesActionResults, - IEnumerable extractSummaryActionResults) + IEnumerable extractSummaryActionResults, + IEnumerable abstractSummaryActionResults) { return new AnalyzeActionsResult( extractKeyPhrasesActionResults.ToList(), @@ -1013,7 +1018,8 @@ public static AnalyzeActionsResult AnalyzeActionsResult( singleLabelClassifyActionResults.ToList(), multiLabelClassifyActionResults.ToList(), analyzeHealthcareEntitiesActionResults.ToList(), - extractSummaryActionResults.ToList() + extractSummaryActionResults.ToList(), + abstractSummaryActionResults.ToList() ); } @@ -1578,6 +1584,38 @@ public static ExtractSummaryActionResult ExtractSummaryActionResult( return new ExtractSummaryActionResult(actionName, completedOn, new Error(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + public static AbstractSummaryActionResult AbstractSummaryActionResult( + AbstractSummaryResultCollection result, + string actionName, + DateTimeOffset completedOn) + { + return new AbstractSummaryActionResult(result, actionName, completedOn); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + public static AbstractSummaryActionResult AbstractSummaryActionResult( + string actionName, + DateTimeOffset completedOn, + string code, + string message) + { + return new AbstractSummaryActionResult(actionName, completedOn, new Error(code, message)); + } + #endregion Action Result Models #region Healthcare @@ -1817,5 +1855,91 @@ public static SummarySentenceCollection SummarySentenceCollection(IList + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// + /// A new instance of for mocking purposes. + /// + public static AbstractSummaryResult AbstractSummaryResult( + string id, + TextDocumentStatistics statistics, + IList summaries, + IList warnings = default) + { + return new AbstractSummaryResult(id, statistics, summaries, warnings); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// + /// A new instance of for mocking purposes. + /// + public static AbstractSummaryResult AbstractSummaryResult(string id, string code, string message) + { + return new AbstractSummaryResult(id, new TextAnalyticsError(code, message)); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the collection of . + /// Sets the property. + /// Sets the property. + /// + /// A new instance of for mocking purposes. + /// + public static AbstractSummaryResultCollection AbstractSummaryResultCollection( + IList results, + TextDocumentBatchStatistics statistics, + string modelVersion) + { + return new AbstractSummaryResultCollection(results, statistics, modelVersion); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// + /// A new instance of for mocking purposes. + /// + public static SummaryContext SummaryContext(int offset, int length) + { + return new SummaryContext(new SummaryContextInternal(offset, length)); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// + /// A new instance of for mocking purposes. + /// + public static AbstractiveSummary AbstractiveSummary(string text, IList contexts) + { + List internalContexts = new(); + foreach (SummaryContext context in contexts) + { + internalContexts.Add(new SummaryContextInternal(context.Offset, context.Length)); + } + + return new AbstractiveSummary(new AbstractiveSummaryInternal(text, internalContexts)); + } + + #endregion } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs index 987203bdc00cd..420f34a5be4fb 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs @@ -502,6 +502,52 @@ internal static ExtractSummaryResultCollection ConvertToExtractSummaryResultColl #endregion + #region Abstract Summary + + internal static List ConvertToSummaryList(IEnumerable summaries) + => summaries.Select((summary) => new AbstractiveSummary(summary)).ToList(); + + internal static AbstractSummaryResultCollection ConvertToAbstractSummaryResultCollection( + AbstractiveSummarizationResult results, + IDictionary idToIndexMap) + { + List abstractSummaryResults = new(results.Documents.Count); + + // Read errors. + foreach (InputError error in results.Errors) + { + abstractSummaryResults.Add(new AbstractSummaryResult(error.Id, ConvertToError(error.Error))); + } + + // Read results. + foreach (AbstractiveSummarizationResultBaseDocumentsItem document in results.Documents) + { + abstractSummaryResults.Add(new AbstractSummaryResult( + document.Id, + document.Statistics ?? default, + ConvertToSummaryList(document.Summaries), + ConvertToWarnings(document.Warnings))); + } + + abstractSummaryResults = SortHeterogeneousCollection(abstractSummaryResults, idToIndexMap); + + return new AbstractSummaryResultCollection(abstractSummaryResults, results.Statistics, results.ModelVersion); + } + + internal static AbstractSummaryResultCollection ConvertToAbstractSummaryResultCollection( + AnalyzeTextJobState jobState, + IDictionary idToIndexMap) + { + AnalyzeTextLROResult task = jobState.Tasks.Items[0]; + if (task.Kind == AnalyzeTextLROResultsKind.AbstractiveSummarizationLROResults) + { + return ConvertToAbstractSummaryResultCollection((task as AbstractiveSummarizationLROResult).Results, idToIndexMap); + } + throw new InvalidOperationException($"Invalid task executed. Expected a {nameof(AnalyzeTextLROResultsKind.AbstractiveSummarizationLROResults)} but instead got {task.Kind}."); + } + + #endregion + #region Analyze Operation internal static PiiLROTask ConvertToPiiTask(RecognizePiiEntitiesAction action) @@ -650,6 +696,22 @@ internal static ExtractiveSummarizationLROTask ConvertToExtractiveSummarizationT }; } + internal static AbstractiveSummarizationLROTask ConvertToAbstractiveSummarizationTask(AbstractSummaryAction action) + { + AbstractiveSummarizationTaskParameters parameters = new() + { + ModelVersion = action.ModelVersion, + StringIndexType = Constants.DefaultStringIndexType, + LoggingOptOut = action.DisableServiceLogs, + SentenceCount = action.MaxSentenceCount, + }; + + return new AbstractiveSummarizationLROTask(parameters) + { + TaskName = action.ActionName + }; + } + internal static IList ConvertFromRecognizeLinkedEntitiesActionsToTasks(IReadOnlyCollection recognizeLinkedEntitiesActions) { List list = new(recognizeLinkedEntitiesActions.Count); @@ -770,6 +832,18 @@ internal static IList ConvertFromExtractSummaryA return list; } + internal static IList ConvertFromAbstractSummaryActionsToTasks(IReadOnlyCollection abstractSummaryActions) + { + List list = new(abstractSummaryActions.Count); + + foreach (AbstractSummaryAction action in abstractSummaryActions) + { + list.Add(ConvertToAbstractiveSummarizationTask(action)); + } + + return list; + } + internal static AnalyzeActionsResult ConvertToAnalyzeActionsResult(AnalyzeTextJobState jobState, IDictionary map) { List keyPhrases = new(); @@ -782,6 +856,7 @@ internal static AnalyzeActionsResult ConvertToAnalyzeActionsResult(AnalyzeTextJo List multiLabelClassify = new(); List analyzeHealthcareEntities = new(); List extractSummary = new(); + List abstractSummary = new(); foreach (AnalyzeTextLROResult task in jobState.Tasks.Items) { @@ -825,6 +900,10 @@ internal static AnalyzeActionsResult ConvertToAnalyzeActionsResult(AnalyzeTextJo { extractSummary.Add(new ExtractSummaryActionResult(ConvertToExtractSummaryResultCollection((task as ExtractiveSummarizationLROResult).Results, map), task.TaskName, task.LastUpdateDateTime)); } + else if (task.Kind == AnalyzeTextLROResultsKind.AbstractiveSummarizationLROResults) + { + abstractSummary.Add(new AbstractSummaryActionResult(ConvertToAbstractSummaryResultCollection((task as AbstractiveSummarizationLROResult).Results, map), task.TaskName, task.LastUpdateDateTime)); + } } return new AnalyzeActionsResult( @@ -837,7 +916,8 @@ internal static AnalyzeActionsResult ConvertToAnalyzeActionsResult(AnalyzeTextJo singleLabelClassify, multiLabelClassify, analyzeHealthcareEntities, - extractSummary); + extractSummary, + abstractSummary); } #endregion diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AbstractSummaryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AbstractSummaryTests.cs new file mode 100644 index 0000000000000..4cf494cdbb21a --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AbstractSummaryTests.cs @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.TextAnalytics.Tests +{ + [ServiceVersion(Min = TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview)] + public class AbstractSummaryTests : TextAnalyticsClientLiveTestBase + { + public AbstractSummaryTests(bool isAsync, TextAnalyticsClientOptions.ServiceVersion serviceVersion) + : base(isAsync, serviceVersion) + { + } + + private const string Document0 = + "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years." + + " Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world." + + " The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors." + + " Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut." + + " “Traditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,” he explained. “Based on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.”" + + " “Now, with Windows 365, we can do that within less than an hour of the account being created,” he said." + + " Windows 365 puts Microsoft’s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection." + + " The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today’s login-from-anywhere, mobile and elastic workforces." + + " “Windows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not – maybe it was too costly, too complex or they didn’t have the expertise in house to do it,” said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia." + + " With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs." + + " The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user’s choosing from anywhere with an internet connection." + + " “You want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office – you want them to have that same experience,” he said. “And you want them to have that experience in such a way that it feels familiar to them. It’s not this jolting thing that takes away all the things they love about Windows.”" + + " Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft’s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365." + + " The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience – gamers – lacks an IT department to lean on when things glitch. “That started me thinking, ‘How do we build something that doesn’t require IT intervention, something that could truly scale to the consumer market?’” Manchester said." + + " The consumer experience was Manchester’s benchmark when he started work on virtualization." + + " “I took note of every time there was something that didn’t quite deliver on that,” he said. “And, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.”" + + " Covering that ground led to improvements in Microsoft’s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT." + + " To lead the development of Windows 365, Manchester leaned into his Arcadia mindset." + + " “When we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,” he said." + + " Soon after this bar was set, and the first batch of hires made – a handful of experts in virtualization and user experience – COVID-19 hit and changed the world." + + " “We hired everybody else during the pandemic,” Manchester said. “They were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations – their bar was the experience they had on their laptop – and we basically used Windows 365 to build Windows 365.”" + + " As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC." + + " “We’re giving you Windows from the cloud,” Manchester said."; + + private const string Document1 = + "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but “what really put the firecracker behind it was the pandemic, it accelerated everything,” McKelvey said. She explained that customers were asking, “’How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?”" + + " In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there – in the office, at home or a coffee shop." + + " “And then, when you’re done, you’re done. You won’t have any issues around security because you’re not saving anything on your device,” McKelvey said, noting that all the data is stored in the cloud." + + " The ability to login to a Cloud PC from anywhere on any device is part of Microsoft’s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise." + + " “I think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,” McKelvey said." + + " The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure." + + " We didn’t run it for very long,” he said. “It didn’t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.”" + + " He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government’s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester’s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly." + + " “The impact that I believe we are finding, and the impact that we’re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,” he said." + + " “Being able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.”"; + + private static readonly List s_batchConvenienceDocuments = new List + { + Document0, + Document1 + }; + + private static List s_batchDocuments = new List + { + new TextDocumentInput("0", Document0) + { + Language = "en", + }, + new TextDocumentInput("1", Document1) + { + Language = "en", + } + }; + + private const int MaxSentenceCount = 3; + + [RecordedTest] + public async Task AbstractSummaryWithAADTest() + { + TextAnalyticsClient client = GetClient(useTokenCredential: true); + + AbstractSummaryOperation operation = await client.StartAbstractSummaryAsync(s_batchDocuments); + await operation.WaitForCompletionAsync(); + ValidateOperationProperties(operation); + + List resultInPages = operation.Value.ToEnumerableAsync().Result; + Assert.AreEqual(1, resultInPages.Count); + + // Take the first page. + AbstractSummaryResultCollection resultCollection = resultInPages.FirstOrDefault(); + ValidateSummaryBatchResult(resultCollection); + } + + [RecordedTest] + public async Task AbstractSummaryBatchWithErrorTest() + { + TextAnalyticsClient client = GetClient(); + + var documents = new List + { + Document1, + "", + }; + + AbstractSummaryOperation operation = await client.StartAbstractSummaryAsync(documents, "en"); + await operation.WaitForCompletionAsync(); + ValidateOperationProperties(operation); + + List resultInPages = operation.Value.ToEnumerableAsync().Result; + Assert.AreEqual(1, resultInPages.Count); + + // Take the first page. + AbstractSummaryResultCollection resultCollection = resultInPages.FirstOrDefault(); + Assert.IsFalse(resultCollection[0].HasError); + Assert.IsTrue(resultCollection[1].HasError); + Assert.AreEqual(TextAnalyticsErrorCode.InvalidDocument, resultCollection[1].Error.ErrorCode.ToString()); + } + + [RecordedTest] + public async Task AbstractSummaryBatchConvenienceTest() + { + TextAnalyticsClient client = GetClient(); + + AbstractSummaryOperation operation = await client.StartAbstractSummaryAsync(s_batchConvenienceDocuments); + await operation.WaitForCompletionAsync(); + ValidateOperationProperties(operation); + + List resultInPages = operation.Value.ToEnumerableAsync().Result; + Assert.AreEqual(1, resultInPages.Count); + + // Take the first page. + AbstractSummaryResultCollection resultCollection = resultInPages.FirstOrDefault(); + ValidateSummaryBatchResult(resultCollection); + } + + [RecordedTest] + public async Task AbstractSummaryBatchConvenienceWithStatisticsTest() + { + TextAnalyticsClient client = GetClient(); + + AbstractSummaryOptions options = new AbstractSummaryOptions() + { + MaxSentenceCount = MaxSentenceCount, + IncludeStatistics = true, + }; + + AbstractSummaryOperation operation = await client.StartAbstractSummaryAsync(s_batchConvenienceDocuments, "en", options); + await operation.WaitForCompletionAsync(); + ValidateOperationProperties(operation); + + List resultInPages = operation.Value.ToEnumerableAsync().Result; + Assert.AreEqual(1, resultInPages.Count); + + // Take the first page. + AbstractSummaryResultCollection resultCollection = resultInPages.FirstOrDefault(); + ValidateSummaryBatchResult(resultCollection, MaxSentenceCount, true); + } + + [RecordedTest] + public async Task AbstractSummaryBatchTest() + { + TextAnalyticsClient client = GetClient(); + + AbstractSummaryOperation operation = await client.StartAbstractSummaryAsync(s_batchDocuments); + await operation.WaitForCompletionAsync(); + ValidateOperationProperties(operation); + + List resultInPages = operation.Value.ToEnumerableAsync().Result; + Assert.AreEqual(1, resultInPages.Count); + + // Take the first page. + AbstractSummaryResultCollection resultCollection = resultInPages.FirstOrDefault(); + ValidateSummaryBatchResult(resultCollection); + } + + [RecordedTest] + public async Task AbstractSummaryBatchWithStatisticsTest() + { + TextAnalyticsClient client = GetClient(); + + AbstractSummaryOptions options = new AbstractSummaryOptions() + { + MaxSentenceCount = MaxSentenceCount, + IncludeStatistics = true, + }; + + AbstractSummaryOperation operation = await client.StartAbstractSummaryAsync(s_batchDocuments, options); + await operation.WaitForCompletionAsync(); + ValidateOperationProperties(operation); + + List resultInPages = operation.Value.ToEnumerableAsync().Result; + Assert.AreEqual(1, resultInPages.Count); + + // Take the first page. + AbstractSummaryResultCollection resultCollection = resultInPages.FirstOrDefault(); + ValidateSummaryBatchResult(resultCollection, MaxSentenceCount, true); + } + + private void ValidateOperationProperties(AbstractSummaryOperation operation) + { + Assert.AreNotEqual(new DateTimeOffset(), operation.CreatedOn); + // TODO: Re-enable this check (https://github.com/Azure/azure-sdk-for-net/issues/31855). + // Assert.AreNotEqual(new DateTimeOffset(), operation.LastModified); + + if (operation.ExpiresOn.HasValue) + { + Assert.AreNotEqual(new DateTimeOffset(), operation.ExpiresOn.Value); + } + } + + private void ValidateSummaryBatchResult( + AbstractSummaryResultCollection results, + int? maxSentenceCount = default, + bool includeStatistics = false) + { + Assert.That(results.ModelVersion, Is.Not.Null.And.Not.Empty); + + if (includeStatistics) + { + Assert.IsNotNull(results.Statistics); + Assert.Greater(results.Statistics.DocumentCount, 0); + Assert.Greater(results.Statistics.TransactionCount, 0); + Assert.GreaterOrEqual(results.Statistics.InvalidDocumentCount, 0); + Assert.GreaterOrEqual(results.Statistics.ValidDocumentCount, 0); + } + else + { + Assert.IsNull(results.Statistics); + } + + foreach (AbstractSummaryResult result in results) + { + Assert.That(result.Id, Is.Not.Null.And.Not.Empty); + Assert.False(result.HasError); + + if (includeStatistics) + { + Assert.GreaterOrEqual(result.Statistics.CharacterCount, 0); + Assert.Greater(result.Statistics.TransactionCount, 0); + } + else + { + Assert.AreEqual(0, result.Statistics.CharacterCount); + Assert.AreEqual(0, result.Statistics.TransactionCount); + } + + Assert.IsNotNull(result.Warnings); + Assert.Greater(result.Summaries.Count, 0); + + foreach (AbstractiveSummary summary in result.Summaries) + { + string originalDocument = s_batchDocuments.Where(document => document.Id == result.Id).FirstOrDefault().Text; + Assert.That(summary.Text, Is.Not.Null.And.Not.Empty); + Assert.Less(summary.Text.Length, originalDocument.Length); + + if (maxSentenceCount is not null) + { + char[] separators = { '.', '!', '?' }; + string[] sentences = summary.Text.Split(separators, StringSplitOptions.RemoveEmptyEntries); + Assert.LessOrEqual(sentences.Count(), maxSentenceCount); + } + + Assert.IsNotNull(summary.Contexts); + Assert.Greater(summary.Contexts.Count, 0); + + foreach (SummaryContext context in summary.Contexts) + { + Assert.GreaterOrEqual(context.Offset, 0); + Assert.GreaterOrEqual(context.Length, 0); + Assert.LessOrEqual(context.Offset + context.Length, originalDocument.Length); + } + } + } + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs index ecf966d0761c2..75026e17ee515 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs @@ -852,6 +852,46 @@ public async Task AnalyzeOperationExtractSummary() Assert.AreEqual(2, extractSummaryDocumentsResults[0].Sentences.Count); } + [RecordedTest] + [ServiceVersion(Min = TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview)] + public async Task AnalyzeOperationAbstractSummary() + { + TextAnalyticsClient client = GetClient(); + var documents = new List + { + "Extractive summarization extracts sentences that collectively represent the most important or relevant information within the original content." + + " Abstractive summarization generates a summary with concise, coherent sentences or words which are not simply extract sentences from the original document." + + " These features are designed to shorten content that could be considered too long to read.", + }; + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + AbstractSummaryActions = new List() { new AbstractSummaryAction() { MaxSentenceCount = 2 } }, + DisplayName = "AnalyzeOperationAbstractSummary", + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(documents, batchActions); + await operation.WaitForCompletionAsync(); + + // Take the first page. + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + IReadOnlyCollection abstractSummaryActionsResults = resultCollection.AbstractSummaryResults; + Assert.IsNotNull(abstractSummaryActionsResults); + + AbstractSummaryResultCollection abstractSummaryDocumentsResults = abstractSummaryActionsResults.FirstOrDefault().DocumentsResults; + Assert.AreEqual(1, abstractSummaryDocumentsResults.Count); + + AbstractSummaryResult result = abstractSummaryDocumentsResults[0]; + Assert.Greater(result.Summaries.Count, 0); + + AbstractiveSummary summary = result.Summaries.FirstOrDefault(); + Assert.IsNotNull(summary); + Assert.That(summary.Text, Is.Not.Null.And.Not.Empty); + Assert.Less(summary.Text.Length, documents[0].Length); + Assert.IsNotNull(summary.Contexts); + Assert.Greater(summary.Contexts.Count, 0); + } + [RecordedTest] [ServiceVersion(Max = TextAnalyticsClientOptions.ServiceVersion.V3_1)] public void AnalyzeOperationAnalyzeHealthcareEntitiesActionNotSupported() diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTest.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTest.json new file mode 100644 index 0000000000000..ab9bab232e020 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTest.json @@ -0,0 +1,253 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10888", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f766b41ec82e8aba6b173dc04e818466-67b6089493237fd2-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "01a57a7480f0999bb1529befd150258c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "0987cbfb-1567-45a6-8f15-97a918f8c752", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:13 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/e57289a7-86ef-44b1-99ab-d9d1707f1d4a?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "197", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/e57289a7-86ef-44b1-99ab-d9d1707f1d4a?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "29a48a7072a01fdb2e952ef65e0fb6b9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fe2a1c7e-c019-4208-8cc8-891116378ed2", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "e57289a7-86ef-44b1-99ab-d9d1707f1d4a", + "lastUpdateDateTime": "2022-11-07T05:37:13Z", + "createdDateTime": "2022-11-07T05:37:13Z", + "expirationDateTime": "2022-11-08T05:37:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/e57289a7-86ef-44b1-99ab-d9d1707f1d4a?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c1fba5094827d78838d238634c6441e1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f6edf163-eb77-4761-82bc-c95634ed6f4b", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "e57289a7-86ef-44b1-99ab-d9d1707f1d4a", + "lastUpdateDateTime": "2022-11-07T05:37:13Z", + "createdDateTime": "2022-11-07T05:37:13Z", + "expirationDateTime": "2022-11-08T05:37:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/e57289a7-86ef-44b1-99ab-d9d1707f1d4a?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "593c45cf90f0016c9e86d25a51a43ba1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2c86b775-6b75-4fd7-8053-867ed2a11caa", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "e57289a7-86ef-44b1-99ab-d9d1707f1d4a", + "lastUpdateDateTime": "2022-11-07T05:37:15Z", + "createdDateTime": "2022-11-07T05:37:13Z", + "expirationDateTime": "2022-11-08T05:37:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/e57289a7-86ef-44b1-99ab-d9d1707f1d4a?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2be5e19b6355286501cdf1ce3a78d3ca", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0312431c-f920-4b0d-a3f5-ca862921306e", + "Content-Length": "1260", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:16 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "54", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "e57289a7-86ef-44b1-99ab-d9d1707f1d4a", + "lastUpdateDateTime": "2022-11-07T05:37:16Z", + "createdDateTime": "2022-11-07T05:37:13Z", + "expirationDateTime": "2022-11-08T05:37:13Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:16.8638417Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device. Windows 365 follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office applications in Microsoft 365.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1176548111", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTestAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTestAsync.json new file mode 100644 index 0000000000000..5758866ba4366 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceTestAsync.json @@ -0,0 +1,291 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10888", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f6e2a800ea7754c6326baacad01c1cc8-d04d327edcd1d8c1-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "804c32699889a2c238d35f882aa492a6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "8f7043fd-07e4-4067-bbb4-6a5ef35cfab4", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:36:38 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d1de5793-e499-44ec-a0b6-05d4176a248b?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "223", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d1de5793-e499-44ec-a0b6-05d4176a248b?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "dcbbda2d3f1391787ab3de8dea57c911", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d6d8a2a3-9f7c-446b-9dd8-4ec0be2d2551", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d1de5793-e499-44ec-a0b6-05d4176a248b", + "lastUpdateDateTime": "2022-11-07T05:36:39Z", + "createdDateTime": "2022-11-07T05:36:38Z", + "expirationDateTime": "2022-11-08T05:36:38Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d1de5793-e499-44ec-a0b6-05d4176a248b?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8b0a3bdb4d5d185cc50155cb67b3f218", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "eaa0c98d-1509-4216-b26b-a5c7d6083ac5", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d1de5793-e499-44ec-a0b6-05d4176a248b", + "lastUpdateDateTime": "2022-11-07T05:36:39Z", + "createdDateTime": "2022-11-07T05:36:38Z", + "expirationDateTime": "2022-11-08T05:36:38Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d1de5793-e499-44ec-a0b6-05d4176a248b?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8239eae5854c2a5db9ba05d5ba34b8e0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "883a5864-951c-489f-95a5-a0f289d2d461", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d1de5793-e499-44ec-a0b6-05d4176a248b", + "lastUpdateDateTime": "2022-11-07T05:36:41Z", + "createdDateTime": "2022-11-07T05:36:38Z", + "expirationDateTime": "2022-11-08T05:36:38Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d1de5793-e499-44ec-a0b6-05d4176a248b?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "efad4d0a079adf497da21611eaad29c6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a0e579ec-3dda-4f00-9c82-17a34ba3e008", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d1de5793-e499-44ec-a0b6-05d4176a248b", + "lastUpdateDateTime": "2022-11-07T05:36:41Z", + "createdDateTime": "2022-11-07T05:36:38Z", + "expirationDateTime": "2022-11-08T05:36:38Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d1de5793-e499-44ec-a0b6-05d4176a248b?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "00a7c5c1471d55c5dde0d1a247875d91", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "db8abd0d-e2ad-4fef-82ea-38fd2433d43c", + "Content-Length": "1260", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "101", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d1de5793-e499-44ec-a0b6-05d4176a248b", + "lastUpdateDateTime": "2022-11-07T05:36:42Z", + "createdDateTime": "2022-11-07T05:36:38Z", + "expirationDateTime": "2022-11-08T05:36:38Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:36:42.7817988Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device. Windows 365 follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office applications in Microsoft 365.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "917977250", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTest.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTest.json new file mode 100644 index 0000000000000..a2cc15b90a5aa --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTest.json @@ -0,0 +1,268 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10906", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-cdce2fbee9e2f1666632b7b0b7c83ec2-b70ebd7df1392cff-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fb5bbff7221afba834a1bf0c8f30e34d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "sentenceCount": 3, + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "966fe937-67b9-4be5-89d5-476b731cbd0b", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:17 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4ebc1e65-42ac-40ae-a237-9b7decd3cfa1?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "272", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4ebc1e65-42ac-40ae-a237-9b7decd3cfa1?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6b176bf87804263eaa61bd41395ab186", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "52dde55e-1fc0-44ac-bc66-f6fe7cbf7fd1", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4ebc1e65-42ac-40ae-a237-9b7decd3cfa1", + "lastUpdateDateTime": "2022-11-07T05:37:17Z", + "createdDateTime": "2022-11-07T05:37:17Z", + "expirationDateTime": "2022-11-08T05:37:17Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4ebc1e65-42ac-40ae-a237-9b7decd3cfa1?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8b4ca6ce5e6d0b030a5f2596aa0079cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "449c80e3-b4b1-436d-8545-66021ee7dfa6", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4ebc1e65-42ac-40ae-a237-9b7decd3cfa1", + "lastUpdateDateTime": "2022-11-07T05:37:17Z", + "createdDateTime": "2022-11-07T05:37:17Z", + "expirationDateTime": "2022-11-08T05:37:17Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4ebc1e65-42ac-40ae-a237-9b7decd3cfa1?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "22dbd0ae66737ffe803551b96466c1d9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e2c0f9cb-8024-4f5a-975b-e18982b399b8", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "14", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4ebc1e65-42ac-40ae-a237-9b7decd3cfa1", + "lastUpdateDateTime": "2022-11-07T05:37:19Z", + "createdDateTime": "2022-11-07T05:37:17Z", + "expirationDateTime": "2022-11-08T05:37:17Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4ebc1e65-42ac-40ae-a237-9b7decd3cfa1?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e83d38ef58e49ae0680b61a552a87baa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "49afd090-440b-49f4-912c-035cccfae8b3", + "Content-Length": "1377", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "42", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4ebc1e65-42ac-40ae-a237-9b7decd3cfa1", + "lastUpdateDateTime": "2022-11-07T05:37:20Z", + "createdDateTime": "2022-11-07T05:37:17Z", + "expirationDateTime": "2022-11-08T05:37:17Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:20.5224929Z", + "status": "succeeded", + "results": { + "statistics": { + "documentsCount": 2, + "validDocumentsCount": 2, + "erroneousDocumentsCount": 0, + "transactionsCount": 12 + }, + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "statistics": { + "charactersCount": 7296, + "transactionsCount": 8 + }, + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "statistics": { + "charactersCount": 3525, + "transactionsCount": 4 + }, + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "356470810", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTestAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTestAsync.json new file mode 100644 index 0000000000000..3076f08df6c98 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchConvenienceWithStatisticsTestAsync.json @@ -0,0 +1,268 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10906", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-2dafea440ddd80fb8c6eb28e75cab3f5-13dc8058dbc5fd33-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9dc60c944d0d657de6c8b6a49e82c8ce", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "sentenceCount": 3, + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "6acc9076-a4f3-4652-b100-d506e694e4dc", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:32 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/9e5c814f-6a6f-4337-8d65-8886c0273f8d?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "255", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/9e5c814f-6a6f-4337-8d65-8886c0273f8d?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e30c31f915eafdd1c772a6e12cec1a51", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b40bb15f-6fe0-401e-9168-ebeb3e48755d", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "9e5c814f-6a6f-4337-8d65-8886c0273f8d", + "lastUpdateDateTime": "2022-11-07T05:37:33Z", + "createdDateTime": "2022-11-07T05:37:33Z", + "expirationDateTime": "2022-11-08T05:37:33Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/9e5c814f-6a6f-4337-8d65-8886c0273f8d?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "29e2e6a69aeddd208fab8531ec5e8ed4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6e7e8230-9ba7-4727-94d6-b340f3d0ca1f", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "15", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "9e5c814f-6a6f-4337-8d65-8886c0273f8d", + "lastUpdateDateTime": "2022-11-07T05:37:33Z", + "createdDateTime": "2022-11-07T05:37:33Z", + "expirationDateTime": "2022-11-08T05:37:33Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/9e5c814f-6a6f-4337-8d65-8886c0273f8d?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "040d5dc559977edc3ac8d69aa69b39f9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fd41c608-67e0-4342-93e4-963ecba167a5", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "9e5c814f-6a6f-4337-8d65-8886c0273f8d", + "lastUpdateDateTime": "2022-11-07T05:37:35Z", + "createdDateTime": "2022-11-07T05:37:33Z", + "expirationDateTime": "2022-11-08T05:37:33Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/9e5c814f-6a6f-4337-8d65-8886c0273f8d?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b7fd64ae9ea05fe1102e533e909f1068", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0e19d832-bfad-4838-ba08-478b9ea6c014", + "Content-Length": "1377", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "56", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "9e5c814f-6a6f-4337-8d65-8886c0273f8d", + "lastUpdateDateTime": "2022-11-07T05:37:36Z", + "createdDateTime": "2022-11-07T05:37:33Z", + "expirationDateTime": "2022-11-08T05:37:33Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:36.1796638Z", + "status": "succeeded", + "results": { + "statistics": { + "documentsCount": 2, + "validDocumentsCount": 2, + "erroneousDocumentsCount": 0, + "transactionsCount": 12 + }, + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "statistics": { + "charactersCount": 7296, + "transactionsCount": 8 + }, + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "statistics": { + "charactersCount": 3525, + "transactionsCount": 4 + }, + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "914893464", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTest.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTest.json new file mode 100644 index 0000000000000..cec10e37bf63e --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTest.json @@ -0,0 +1,291 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10888", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6c2b5186c9e3e463fb0ab883c1c36988-5028eb299d041842-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cc18a7fa9bdffa91901555c037c4ba8c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "3cc7bb05-445d-49b9-a79a-8e81f6c7f5d9", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:21 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/675306d2-9480-4c44-b5a0-65f431037cbd?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "229", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/675306d2-9480-4c44-b5a0-65f431037cbd?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c2a9f34b71954a9c7ebdcab12345d59b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1ad771ea-a199-4846-9b4b-58c7c27e4d98", + "Content-Length": "282", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "675306d2-9480-4c44-b5a0-65f431037cbd", + "lastUpdateDateTime": "2022-11-07T05:37:21Z", + "createdDateTime": "2022-11-07T05:37:21Z", + "expirationDateTime": "2022-11-08T05:37:21Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/675306d2-9480-4c44-b5a0-65f431037cbd?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "07af5942a6110a86b509eca08bb112be", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d65b0bbf-f101-4de0-8605-e2537a1fd745", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:22 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "675306d2-9480-4c44-b5a0-65f431037cbd", + "lastUpdateDateTime": "2022-11-07T05:37:21Z", + "createdDateTime": "2022-11-07T05:37:21Z", + "expirationDateTime": "2022-11-08T05:37:21Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/675306d2-9480-4c44-b5a0-65f431037cbd?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "db4f85fecde3898e0bce4e22d1dfd74b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "aaa6e881-c9db-4a29-acc3-231e0b6d30e9", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "675306d2-9480-4c44-b5a0-65f431037cbd", + "lastUpdateDateTime": "2022-11-07T05:37:21Z", + "createdDateTime": "2022-11-07T05:37:21Z", + "expirationDateTime": "2022-11-08T05:37:21Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/675306d2-9480-4c44-b5a0-65f431037cbd?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "de7dba40b214a57a6c9e0d8c85fcbecd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "99741620-34d8-471f-931e-b88f9ded4063", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "675306d2-9480-4c44-b5a0-65f431037cbd", + "lastUpdateDateTime": "2022-11-07T05:37:23Z", + "createdDateTime": "2022-11-07T05:37:21Z", + "expirationDateTime": "2022-11-08T05:37:21Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/675306d2-9480-4c44-b5a0-65f431037cbd?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9db20baafaf575b7cb26fc43576439d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e1318a5f-9ae1-4239-a13d-d310f6e6cfd8", + "Content-Length": "1260", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "186", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "675306d2-9480-4c44-b5a0-65f431037cbd", + "lastUpdateDateTime": "2022-11-07T05:37:25Z", + "createdDateTime": "2022-11-07T05:37:21Z", + "expirationDateTime": "2022-11-08T05:37:21Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:25.1333122Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device. Windows 365 follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office applications in Microsoft 365.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1982895995", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTestAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTestAsync.json new file mode 100644 index 0000000000000..aa39399751649 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchTestAsync.json @@ -0,0 +1,291 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10888", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6f90df55f6ce26bdf5cf246122a651e6-323fe3e6b8ade391-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4ae82fd8f0546899e7a23cef447a63d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "272b1f4e-dbfd-42dd-80e8-5f0112121763", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:36:54 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4360cacd-7fb8-4b32-8b45-5dc4bf052d67?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "237", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4360cacd-7fb8-4b32-8b45-5dc4bf052d67?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a1b3f6897c216776f2660e9e93fd572e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bb3e7465-6bc7-49f7-9940-9bb8e8ecfa9d", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4360cacd-7fb8-4b32-8b45-5dc4bf052d67", + "lastUpdateDateTime": "2022-11-07T05:36:55Z", + "createdDateTime": "2022-11-07T05:36:55Z", + "expirationDateTime": "2022-11-08T05:36:55Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4360cacd-7fb8-4b32-8b45-5dc4bf052d67?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e6df1444030672711dfb6f5dd4972155", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8bfe1155-bd35-4c21-b014-97cd8d833ca3", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4360cacd-7fb8-4b32-8b45-5dc4bf052d67", + "lastUpdateDateTime": "2022-11-07T05:36:55Z", + "createdDateTime": "2022-11-07T05:36:55Z", + "expirationDateTime": "2022-11-08T05:36:55Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4360cacd-7fb8-4b32-8b45-5dc4bf052d67?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c1d2ba7916f05c55b98157ede2fad4e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d1bf412b-dbf6-46ef-835e-143e76537f12", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4360cacd-7fb8-4b32-8b45-5dc4bf052d67", + "lastUpdateDateTime": "2022-11-07T05:36:55Z", + "createdDateTime": "2022-11-07T05:36:55Z", + "expirationDateTime": "2022-11-08T05:36:55Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4360cacd-7fb8-4b32-8b45-5dc4bf052d67?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2fab0d4a7c9b85ce854084260c18925b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fdc1ebb6-940a-44e2-8d51-53372990c08a", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:36:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4360cacd-7fb8-4b32-8b45-5dc4bf052d67", + "lastUpdateDateTime": "2022-11-07T05:36:58Z", + "createdDateTime": "2022-11-07T05:36:55Z", + "expirationDateTime": "2022-11-08T05:36:55Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/4360cacd-7fb8-4b32-8b45-5dc4bf052d67?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d925b845962b2e3dbf822d85ac839022", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "da370939-c1ca-44b5-8b88-e10458690f1e", + "Content-Length": "1259", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "39", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "4360cacd-7fb8-4b32-8b45-5dc4bf052d67", + "lastUpdateDateTime": "2022-11-07T05:36:59Z", + "createdDateTime": "2022-11-07T05:36:55Z", + "expirationDateTime": "2022-11-08T05:36:55Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:36:59.433723Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device. Windows 365 follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office applications in Microsoft 365.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "217310341", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTest.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTest.json new file mode 100644 index 0000000000000..0faa937216b27 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTest.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "3652", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-14a7ea377cc308b45aafa7c9fdb62210-cd7d204482027e14-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b1c5d4f765c24634f544ce07c0b60592", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + }, + { + "id": "1", + "text": "", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "a53c56e8-49cc-49a5-9c05-4ae2b95afca7", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:25 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/fa8cab72-12de-4f01-89d0-3f3615d05938?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "217", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/fa8cab72-12de-4f01-89d0-3f3615d05938?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cbe75d36477f594fc210ad89275b75c3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "04a6d69c-edf5-4eaf-a5ac-82c066dcc1c9", + "Content-Length": "282", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:26 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "fa8cab72-12de-4f01-89d0-3f3615d05938", + "lastUpdateDateTime": "2022-11-07T05:37:26Z", + "createdDateTime": "2022-11-07T05:37:26Z", + "expirationDateTime": "2022-11-08T05:37:26Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/fa8cab72-12de-4f01-89d0-3f3615d05938?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ca0156a01e11cd43c17c7c640dfe2665", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "65443776-3fcc-4ffc-ba9a-672c9a914b58", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:27 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "fa8cab72-12de-4f01-89d0-3f3615d05938", + "lastUpdateDateTime": "2022-11-07T05:37:26Z", + "createdDateTime": "2022-11-07T05:37:26Z", + "expirationDateTime": "2022-11-08T05:37:26Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/fa8cab72-12de-4f01-89d0-3f3615d05938?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b8f2cc9e42d6aff8856ceeb1b7aa1f99", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c9e35299-5394-49b6-b6fa-67dfe7f70a7b", + "Content-Length": "924", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:28 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "130", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "fa8cab72-12de-4f01-89d0-3f3615d05938", + "lastUpdateDateTime": "2022-11-07T05:37:27Z", + "createdDateTime": "2022-11-07T05:37:26Z", + "expirationDateTime": "2022-11-08T05:37:26Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:27.8960276Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "0", + "warnings": [] + } + ], + "errors": [ + { + "id": "1", + "error": { + "code": "InvalidArgument", + "message": "Invalid Document in request.", + "innererror": { + "code": "InvalidDocument", + "message": "Document text is empty." + } + } + } + ], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "959489481", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTestAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTestAsync.json new file mode 100644 index 0000000000000..40496a1130e83 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithErrorTestAsync.json @@ -0,0 +1,212 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "3652", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e942426921ba6c7f9a9c93504ffdaa13-286819d41d581c34-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4474e55abdccbe8a28c566df974cc4fb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + }, + { + "id": "1", + "text": "", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "b750fb21-a586-48c8-a824-c3c4e704c4a7", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:37 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/6a087d5d-02a1-45d7-b2ad-b01683d0db8d?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "214", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/6a087d5d-02a1-45d7-b2ad-b01683d0db8d?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b19b60dc28de8c83f245b7f9f02b3a76", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b243204a-53ca-4eb8-82a4-429bdb20b73f", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "63", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "6a087d5d-02a1-45d7-b2ad-b01683d0db8d", + "lastUpdateDateTime": "2022-11-07T05:37:37Z", + "createdDateTime": "2022-11-07T05:37:37Z", + "expirationDateTime": "2022-11-08T05:37:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/6a087d5d-02a1-45d7-b2ad-b01683d0db8d?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3a2943b2fe7d57f47096fbb16d1de902", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8dca1d72-d1e4-4a24-9347-365582f43327", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "6a087d5d-02a1-45d7-b2ad-b01683d0db8d", + "lastUpdateDateTime": "2022-11-07T05:37:38Z", + "createdDateTime": "2022-11-07T05:37:37Z", + "expirationDateTime": "2022-11-08T05:37:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/6a087d5d-02a1-45d7-b2ad-b01683d0db8d?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3acf94875d7532c961e751870590cefc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "dd676444-69b3-499f-906c-d5b672b172ac", + "Content-Length": "924", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "41", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "6a087d5d-02a1-45d7-b2ad-b01683d0db8d", + "lastUpdateDateTime": "2022-11-07T05:37:38Z", + "createdDateTime": "2022-11-07T05:37:37Z", + "expirationDateTime": "2022-11-08T05:37:37Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:38.4855947Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "0", + "warnings": [] + } + ], + "errors": [ + { + "id": "1", + "error": { + "code": "InvalidArgument", + "message": "Invalid Document in request.", + "innererror": { + "code": "InvalidDocument", + "message": "Document text is empty." + } + } + } + ], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1910292608", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTest.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTest.json new file mode 100644 index 0000000000000..22a555a894383 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTest.json @@ -0,0 +1,268 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10906", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-ce89ec7222d79b439c6ad21a329a2dde-4d7eba42a26516fc-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1f8efd6b05de3b6b71fc1fc6e1ba5820", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "sentenceCount": 3, + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "a6aa155c-c23e-4614-bfc7-2163ffddbbfb", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:28 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d7cff039-985b-4257-a6d7-4a0d1d28ca61?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "333", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d7cff039-985b-4257-a6d7-4a0d1d28ca61?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fbbc5e29be21c2ff7efde099c01492d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d2cc846e-b30f-498d-8111-d99f33ef18be", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:28 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "53", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d7cff039-985b-4257-a6d7-4a0d1d28ca61", + "lastUpdateDateTime": "2022-11-07T05:37:29Z", + "createdDateTime": "2022-11-07T05:37:29Z", + "expirationDateTime": "2022-11-08T05:37:29Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d7cff039-985b-4257-a6d7-4a0d1d28ca61?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ee3c3b7a290a5ff7eccd41e6904a1c74", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5be0bb1b-4eee-4332-84e9-8c2523ad9ede", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d7cff039-985b-4257-a6d7-4a0d1d28ca61", + "lastUpdateDateTime": "2022-11-07T05:37:29Z", + "createdDateTime": "2022-11-07T05:37:29Z", + "expirationDateTime": "2022-11-08T05:37:29Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d7cff039-985b-4257-a6d7-4a0d1d28ca61?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9bc7004a44d6acf2fdcba0e125d17b5c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "02c440d9-e6fe-4dae-9ec4-7354ebb2bbfc", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:31 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d7cff039-985b-4257-a6d7-4a0d1d28ca61", + "lastUpdateDateTime": "2022-11-07T05:37:31Z", + "createdDateTime": "2022-11-07T05:37:29Z", + "expirationDateTime": "2022-11-08T05:37:29Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/d7cff039-985b-4257-a6d7-4a0d1d28ca61?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "a64c49696a7e0016665d0f547d193134", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b88edd33-a322-406c-af87-b92166c3ec54", + "Content-Length": "1377", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "54", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "d7cff039-985b-4257-a6d7-4a0d1d28ca61", + "lastUpdateDateTime": "2022-11-07T05:37:32Z", + "createdDateTime": "2022-11-07T05:37:29Z", + "expirationDateTime": "2022-11-08T05:37:29Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:32.3053521Z", + "status": "succeeded", + "results": { + "statistics": { + "documentsCount": 2, + "validDocumentsCount": 2, + "erroneousDocumentsCount": 0, + "transactionsCount": 12 + }, + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "statistics": { + "charactersCount": 7296, + "transactionsCount": 8 + }, + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "statistics": { + "charactersCount": 3525, + "transactionsCount": 4 + }, + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1921500772", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTestAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTestAsync.json new file mode 100644 index 0000000000000..31abdedc51b31 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryBatchWithStatisticsTestAsync.json @@ -0,0 +1,268 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "10906", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f678194811664ddf7c4e315867c891b7-a97068637bfea848-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f7c8d60d804c0cc45285231b3d8ecdc8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "sentenceCount": 3, + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "4c33e2c4-f9a1-45a9-b512-595df82c7835", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:37:39 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/f52ab99f-38e9-4a47-8855-30c928939ebc?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "215", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/f52ab99f-38e9-4a47-8855-30c928939ebc?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "05ca2a87fee98a970325df9d9fe2ce1a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ba7442ee-8f66-4e8a-9041-a23622adb4ef", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "14", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "f52ab99f-38e9-4a47-8855-30c928939ebc", + "lastUpdateDateTime": "2022-11-07T05:37:39Z", + "createdDateTime": "2022-11-07T05:37:39Z", + "expirationDateTime": "2022-11-08T05:37:39Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/f52ab99f-38e9-4a47-8855-30c928939ebc?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "18a25d7910ec647911bad44d0245e3dc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d72e7f38-9591-4ae3-a0e4-9c187303204e", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "f52ab99f-38e9-4a47-8855-30c928939ebc", + "lastUpdateDateTime": "2022-11-07T05:37:39Z", + "createdDateTime": "2022-11-07T05:37:39Z", + "expirationDateTime": "2022-11-08T05:37:39Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/f52ab99f-38e9-4a47-8855-30c928939ebc?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2e649b1983760ede3e3ef327a0266c70", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9241af23-8d7d-4112-be86-6b0152a9d64c", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "f52ab99f-38e9-4a47-8855-30c928939ebc", + "lastUpdateDateTime": "2022-11-07T05:37:41Z", + "createdDateTime": "2022-11-07T05:37:39Z", + "expirationDateTime": "2022-11-08T05:37:39Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/f52ab99f-38e9-4a47-8855-30c928939ebc?api-version=2022-10-01-preview\u0026showStats=true", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "dfa208b6b5eb76dbb165f32f2a4a87be", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ece9250f-cf3a-43e5-9c67-0a2cec9d9926", + "Content-Length": "1377", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:37:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "54", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "f52ab99f-38e9-4a47-8855-30c928939ebc", + "lastUpdateDateTime": "2022-11-07T05:37:42Z", + "createdDateTime": "2022-11-07T05:37:39Z", + "expirationDateTime": "2022-11-08T05:37:39Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:37:42.9299884Z", + "status": "succeeded", + "results": { + "statistics": { + "documentsCount": 2, + "validDocumentsCount": 2, + "erroneousDocumentsCount": 0, + "transactionsCount": 12 + }, + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "statistics": { + "charactersCount": 7296, + "transactionsCount": 8 + }, + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "statistics": { + "charactersCount": 3525, + "transactionsCount": 4 + }, + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1742934327", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTest.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTest.json new file mode 100644 index 0000000000000..d43c52cf28531 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTest.json @@ -0,0 +1,253 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "10888", + "Content-Type": "application/json", + "traceparent": "00-7ccfb4a491e6d68bcb4db5e98f0e5f2e-c6e487f85291a3d7-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ba2189124153132528169111b03ba6d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "79844da4-cb1f-42e8-bc1c-b76f4d0f798c", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:52:34 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/93c2e085-1b74-4ea7-8d5c-b931c69f8fbe?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "334", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/93c2e085-1b74-4ea7-8d5c-b931c69f8fbe?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "898128a1366b08a5ee736424269bba45", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ff8998c4-2161-466f-9098-34ab611ce58c", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "93c2e085-1b74-4ea7-8d5c-b931c69f8fbe", + "lastUpdateDateTime": "2022-11-07T05:52:35Z", + "createdDateTime": "2022-11-07T05:52:35Z", + "expirationDateTime": "2022-11-08T05:52:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/93c2e085-1b74-4ea7-8d5c-b931c69f8fbe?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0ef48b7400e6ae7795b1aac74a0527d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ac318c89-fca4-4897-9d4c-1a47a2259117", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "93c2e085-1b74-4ea7-8d5c-b931c69f8fbe", + "lastUpdateDateTime": "2022-11-07T05:52:35Z", + "createdDateTime": "2022-11-07T05:52:35Z", + "expirationDateTime": "2022-11-08T05:52:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/93c2e085-1b74-4ea7-8d5c-b931c69f8fbe?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3e0d053bf514db5de418cbe0dc01ec8d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c08ac995-7538-4dad-b027-4054ebeeb81f", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "53", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "93c2e085-1b74-4ea7-8d5c-b931c69f8fbe", + "lastUpdateDateTime": "2022-11-07T05:52:38Z", + "createdDateTime": "2022-11-07T05:52:35Z", + "expirationDateTime": "2022-11-08T05:52:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/93c2e085-1b74-4ea7-8d5c-b931c69f8fbe?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "249d4b5c9846a1f1b1d3f4b98cdebde9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a08e4d90-8256-46f8-acd6-545ce58108f1", + "Content-Length": "1260", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "55", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "93c2e085-1b74-4ea7-8d5c-b931c69f8fbe", + "lastUpdateDateTime": "2022-11-07T05:52:39Z", + "createdDateTime": "2022-11-07T05:52:35Z", + "expirationDateTime": "2022-11-08T05:52:35Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:52:39.3714724Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device. Windows 365 follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office applications in Microsoft 365.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": null, + "RandomSeed": "7936234", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTestAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTestAsync.json new file mode 100644 index 0000000000000..8f762e9c23cc7 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AbstractSummaryTests/AbstractSummaryWithAADTestAsync.json @@ -0,0 +1,253 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "10888", + "Content-Type": "application/json", + "traceparent": "00-df6b513ca92f25db9a523a23bdb32e99-664b8b38b29b2827-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6993efbe03e8acdc9ccef3044c9e2158", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "1", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "de85791c-e168-4205-b63b-eaef69f6cc9c", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 05:52:54 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/ec043444-7fca-4f1c-acd2-3ffd2f0bde56?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "223", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/ec043444-7fca-4f1c-acd2-3ffd2f0bde56?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e28a1bfb1aeba5c63b97d8d1fe93824d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "82969705-a7e7-49f4-bef8-0723fdf164ff", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "ec043444-7fca-4f1c-acd2-3ffd2f0bde56", + "lastUpdateDateTime": "2022-11-07T05:52:54Z", + "createdDateTime": "2022-11-07T05:52:54Z", + "expirationDateTime": "2022-11-08T05:52:54Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/ec043444-7fca-4f1c-acd2-3ffd2f0bde56?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4c07bc0e7f8c3045e2719b3cd1e65704", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4114c1ed-e31a-4a61-8da9-a263037439a5", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "ec043444-7fca-4f1c-acd2-3ffd2f0bde56", + "lastUpdateDateTime": "2022-11-07T05:52:54Z", + "createdDateTime": "2022-11-07T05:52:54Z", + "expirationDateTime": "2022-11-08T05:52:54Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/ec043444-7fca-4f1c-acd2-3ffd2f0bde56?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cabe14acf0e8a4eb29ed2d512a0aad08", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c3aa5eee-e941-4a1a-abd5-6e44e75c864a", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "ec043444-7fca-4f1c-acd2-3ffd2f0bde56", + "lastUpdateDateTime": "2022-11-07T05:52:56Z", + "createdDateTime": "2022-11-07T05:52:54Z", + "expirationDateTime": "2022-11-08T05:52:54Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/ec043444-7fca-4f1c-acd2-3ffd2f0bde56?api-version=2022-10-01-preview\u0026showStats=false", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "90f5a64bd5967bccd55a007a7e8ad455", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3b973a98-2d7a-40d3-a559-b9261d2cf61c", + "Content-Length": "1260", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 05:52:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "42", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "ec043444-7fca-4f1c-acd2-3ffd2f0bde56", + "lastUpdateDateTime": "2022-11-07T05:52:58Z", + "createdDateTime": "2022-11-07T05:52:54Z", + "expirationDateTime": "2022-11-08T05:52:54Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T05:52:58.2487397Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft\u0027s Windows 365 puts the Windows operating system in the cloud. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy. Users access their Cloud PC through a native application or web browser on any device. Windows 365 follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office applications in Microsoft 365.", + "contexts": [ + { + "offset": 0, + "length": 7001 + } + ] + } + ], + "id": "0", + "warnings": [] + }, + { + "summaries": [ + { + "text": "Microsoft has launched Windows 365 Cloud PCs for remote workers. The new service lets workers access their old PCs from anywhere on any device. The Cloud PCs are powered by Microsoft\u0027s cloud computing platform.", + "contexts": [ + { + "offset": 0, + "length": 3315 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": null, + "RandomSeed": "973140666", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummary.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummary.json new file mode 100644 index 0000000000000..3220007914d1b --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummary.json @@ -0,0 +1,161 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "619", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-8b826840e9d8fb33eb07c68390cd085f-ea749f6d615a38a1-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "97f936e58c60d0070247acc29b19ffe5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "AnalyzeOperationAbstractSummary", + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "Extractive summarization extracts sentences that collectively represent the most important or relevant information within the original content. Abstractive summarization generates a summary with concise, coherent sentences or words which are not simply extract sentences from the original document. These features are designed to shorten content that could be considered too long to read.", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "sentenceCount": 2, + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "c6a45d3b-7154-446a-994b-52d2f9c71882", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 06:09:52 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/98fe2eea-d4a6-488b-b7af-7f65e85f647e?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "305", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/98fe2eea-d4a6-488b-b7af-7f65e85f647e?api-version=2022-10-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "3e3968363c25d268c30fbd5e825a7a51", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4870549c-edef-4c35-8f6d-f3339c4570a2", + "Content-Length": "330", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 06:09:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "98fe2eea-d4a6-488b-b7af-7f65e85f647e", + "lastUpdateDateTime": "2022-11-07T06:09:52Z", + "createdDateTime": "2022-11-07T06:09:52Z", + "expirationDateTime": "2022-11-08T06:09:52Z", + "status": "notStarted", + "errors": [], + "displayName": "AnalyzeOperationAbstractSummary", + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/98fe2eea-d4a6-488b-b7af-7f65e85f647e?api-version=2022-10-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "960092bda8a389f1f9660a9ae66bcd70", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "60d26450-f04b-445e-be57-09cdcdaa5a2e", + "Content-Length": "831", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 06:09:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "133", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "98fe2eea-d4a6-488b-b7af-7f65e85f647e", + "lastUpdateDateTime": "2022-11-07T06:09:53Z", + "createdDateTime": "2022-11-07T06:09:52Z", + "expirationDateTime": "2022-11-08T06:09:52Z", + "status": "succeeded", + "errors": [], + "displayName": "AnalyzeOperationAbstractSummary", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T06:09:53.9745428Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Extractive summarization extracts sentences that collectively represent the most important or relevant information within the original content. abstractive summarization generates a summary with concise, coherent sentences or words.", + "contexts": [ + { + "offset": 0, + "length": 388 + } + ] + } + ], + "id": "0", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "520717074", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummaryAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummaryAsync.json new file mode 100644 index 0000000000000..86cf3d5d97b08 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeOperationTests/AnalyzeOperationAbstractSummaryAsync.json @@ -0,0 +1,200 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs?api-version=2022-10-01-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "619", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-f3d5a64163b41f2f3eb69cd6aee81378-fb6647c4ea3c9cf9-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "cd60a0b2b0ed57290d464c0c066c4d80", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "AnalyzeOperationAbstractSummary", + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "Extractive summarization extracts sentences that collectively represent the most important or relevant information within the original content. Abstractive summarization generates a summary with concise, coherent sentences or words which are not simply extract sentences from the original document. These features are designed to shorten content that could be considered too long to read.", + "language": "en" + } + ] + }, + "tasks": [ + { + "parameters": { + "sentenceCount": 2, + "stringIndexType": "Utf16CodeUnit" + }, + "kind": "AbstractiveSummarization" + } + ] + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "ead459cb-f307-4c54-9d28-2ccf100c7db1", + "Content-Length": "0", + "Date": "Mon, 07 Nov 2022 06:09:54 GMT", + "operation-location": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/0f0aa1fe-2764-4876-b009-c00e96753813?api-version=2022-10-01-preview", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "322", + "x-ms-region": "East US" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/0f0aa1fe-2764-4876-b009-c00e96753813?api-version=2022-10-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "73e02005b2e842c2f9a21bcee45a9036", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e12e9c6b-77c7-454f-8f65-259c5df15c1a", + "Content-Length": "327", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 06:09:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "0f0aa1fe-2764-4876-b009-c00e96753813", + "lastUpdateDateTime": "2022-11-07T06:09:54Z", + "createdDateTime": "2022-11-07T06:09:54Z", + "expirationDateTime": "2022-11-08T06:09:54Z", + "status": "running", + "errors": [], + "displayName": "AnalyzeOperationAbstractSummary", + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/0f0aa1fe-2764-4876-b009-c00e96753813?api-version=2022-10-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9440811f8b68eef2cb1707ec9f4d2dde", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "36241f23-3643-4949-830b-c29ce30f5401", + "Content-Length": "327", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 06:09:55 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "8", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "0f0aa1fe-2764-4876-b009-c00e96753813", + "lastUpdateDateTime": "2022-11-07T06:09:54Z", + "createdDateTime": "2022-11-07T06:09:54Z", + "expirationDateTime": "2022-11-08T06:09:54Z", + "status": "running", + "errors": [], + "displayName": "AnalyzeOperationAbstractSummary", + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 1, + "total": 1, + "items": [] + } + } + }, + { + "RequestUri": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/language/analyze-text/jobs/0f0aa1fe-2764-4876-b009-c00e96753813?api-version=2022-10-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.3.0-alpha.20221106.1 (.NET 6.0.10; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "03358c4e8e04ff77dd1ed34b955a73b2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6d790b0a-fc58-4895-952b-9e692a65380c", + "Content-Length": "831", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 07 Nov 2022 06:09:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "99", + "x-ms-region": "East US" + }, + "ResponseBody": { + "jobId": "0f0aa1fe-2764-4876-b009-c00e96753813", + "lastUpdateDateTime": "2022-11-07T06:09:56Z", + "createdDateTime": "2022-11-07T06:09:54Z", + "expirationDateTime": "2022-11-08T06:09:54Z", + "status": "succeeded", + "errors": [], + "displayName": "AnalyzeOperationAbstractSummary", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "lastUpdateDateTime": "2022-11-07T06:09:56.0235868Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Extractive summarization extracts sentences that collectively represent the most important or relevant information within the original content. abstractive summarization generates a summary with concise, coherent sentences or words.", + "contexts": [ + { + "offset": 0, + "length": 388 + } + ] + } + ], + "id": "0", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1192663132", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticslivetestresources.cognitiveservices.azure.com/" + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs index e35e4d2299645..c774c90ad317b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs @@ -76,6 +76,12 @@ public void AnalyzeActionsResult() TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default, default), }; + var abstractSummaryActionResults = new List() + { + TextAnalyticsModelFactory.AbstractSummaryActionResult(default, default, default), + TextAnalyticsModelFactory.AbstractSummaryActionResult(default, default, default), + }; + var actionsResult = TextAnalyticsModelFactory.AnalyzeActionsResult( extractKeyPhrasesActionResults, recognizeEntitiesActionResults, @@ -99,7 +105,8 @@ public void AnalyzeActionsResult() singleLabelClassifyActionResults, multiLabelClassifyActionResults, analyzeHealthcareEntitiesActionResults, - extractSummaryActionResults); + extractSummaryActionResults, + abstractSummaryActionResults); CollectionAssert.AreEquivalent(extractKeyPhrasesActionResults, actionsResult.ExtractKeyPhrasesResults); CollectionAssert.AreEquivalent(recognizeEntitiesActionResults, actionsResult.RecognizeEntitiesResults); @@ -111,6 +118,7 @@ public void AnalyzeActionsResult() CollectionAssert.AreEquivalent(multiLabelClassifyActionResults, actionsResult.MultiLabelClassifyResults); CollectionAssert.AreEquivalent(analyzeHealthcareEntitiesActionResults, actionsResult.AnalyzeHealthcareEntitiesResults); CollectionAssert.AreEquivalent(extractSummaryActionResults, actionsResult.ExtractSummaryResults); + CollectionAssert.AreEquivalent(abstractSummaryActionResults, actionsResult.AbstractSummaryResults); } #endregion Action Result Models }