private static async Task <Response <ExtractKeyPhrasesResultCollection> > CreateKeyPhraseResponseAsync(Response response, IDictionary <string, int> idToIndexMap, CancellationToken cancellation) { ExtractKeyPhrasesResultCollection result = await TextAnalyticsServiceSerializer.DeserializeKeyPhraseResponseAsync(response.ContentStream, idToIndexMap, cancellation).ConfigureAwait(false); return(Response.FromValue(result, response)); }
private static async Task <Response <DocumentResultCollection <string> > > CreateKeyPhraseResponseAsync(Response response, CancellationToken cancellation) { DocumentResultCollection <string> result = await TextAnalyticsServiceSerializer.DeserializeKeyPhraseResponseAsync(response.ContentStream, cancellation).ConfigureAwait(false); return(Response.FromValue(result, response)); }