Does the TextAnalyticsClient Append an API Version to Requests

Steve Peschka 20 Reputation points
2025-01-13T13:44:10.5033333+00:00

I just got an email from Microsoft stating that I'm currently using 2024-05-15-preview or earlier versions of APIs in Azure AI Language, and that it's being retired and I need to transition to a newer version. In my app I have some code that uses the TextAnalyticsClient to do sentiment analysis. The Url I provide it to use is from the portal and does not include an API parameter on the query string. So does the TextAnalyticsClient include that when you invoke its methods, like AnalyzeSentimentBatchAsync? So I should be looking and waiting for an updated NUGET package? Or is this email not applicable if I'm not directly invoking an endpoint with the API version query string?

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
437 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 15,086 Reputation points
    2025-01-13T17:08:23.2933333+00:00

    Hello Steve Peschka,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Regarding your questions:

    Does the TextAnalyticsClient include the API version when you invoke its methods, like AnalyzeSentimentBatchAsync?

    Yes, the TextAnalyticsClient automatically appends the API version to the requests it makes. You don't need to manually include the API version in the URL - https://zcusa.951200.xyz/en-us/azure/ai-services/openai/api-version-deprecation

    Should you be looking and waiting for an updated NUGET package?

    Yes, you should keep an eye out for updates to the Azure.AI.TextAnalytics NuGet package. Updating to the latest version will ensure that your application uses the most current API versions and features - https://zcusa.951200.xyz/en-us/azure/ai-services/openai/api-version-deprecation

    Is this email not applicable if you're not directly invoking an endpoint with the API version query string?

    The email is still applicable. Even though you don't manually include the API version in the URL, the TextAnalyticsClient does it for you. Therefore, you need to ensure that your client library is up-to-date to avoid using deprecated API versions - https://zcusa.951200.xyz/en-us/azure/ai-services/openai/api-version-deprecation

    Does the TextAnalyticsClient append an API version to requests?

    Yes, the TextAnalyticsClient appends the appropriate API version to all requests it makes - https://zcusa.951200.xyz/en-us/azure/ai-services/openai/api-version-deprecation

    In a nutshell, you should update your NuGet package to the latest version to ensure compatibility with the new API versions and avoid any disruptions in your service.

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.