Skip to content

Commit 9078094

Browse files
authored
Updated API version
1 parent cf85aaa commit 9078094

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ namespace SampleSentimentV3
1010
{
1111
public class Program
1212
{
13-
public class TextAnalyticsSentimentV3Client
13+
public class TextAnalyticsSentiment
1414
{
15-
// You can get the reqeust url from:
16-
// https://<YOUR-REGION>.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0-preview/operations/56f30ceeeda5650db055a3c9
17-
private static readonly string endpoint = Environment.GetEnvironmentVariable("TEXT_ANALYTICS_ENDPOINT") + "/v3.0-preview/sentiment";
15+
// The request URL is shown here (change the region to your own region):
16+
// https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0-Preview-1/operations/Sentiment/console
17+
private static readonly string endpoint = Environment.GetEnvironmentVariable("TEXT_ANALYTICS_ENDPOINT") + "/text/analytics/v3.0-preview.1/sentiment";
1818

1919
private static readonly string subscriptionKey = Environment.GetEnvironmentVariable("TEXT_ANALYTICS_SUBSCRIPTION_KEY");
2020

@@ -68,7 +68,7 @@ public static void Main(string[] args)
6868
}
6969
};
7070
//If you’re using C# 7.1 or greater, you can use an async main() method to await the function
71-
var sentimentV3Prediction = TextAnalyticsSentimentV3Client.SentimentV3PreviewPredictAsync(inputDocuments).Result;
71+
var sentimentV3Prediction = TextAnalyticsSentiment.SentimentV3PreviewPredictAsync(inputDocuments).Result;
7272

7373
// Replace with whatever you wish to print or simply consume the sentiment v3 prediction
7474
Console.WriteLine("Document ID=" + sentimentV3Prediction.Documents[0].Id + " : Sentiment=" + sentimentV3Prediction.Documents[0].Sentiment);

0 commit comments

Comments
 (0)