This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.24k
stars
4.58k
forks
source link
[QUERY] How to use TextAnalyticsClient with on-premises container? #45002
I am running the latest version of the text analytics container from mcr.microsoft.com/azure-cognitive-services/textanalytics/ner on my machine. When I try to execute RecognizeEntitiesAsync, I encounter the following error:
Unable to cast object of type 'Azure.AI.TextAnalytics.Models.UnknownAnalyzeTextTaskResult' to type 'Azure.AI.TextAnalytics.Models.EntitiesTaskResult'.
However, there is no issue when I make a direct API call:
POST http://localhost:5000/language/:analyze-text?api-version=2023-04-01
Content-Type: application/json
{
"kind": "EntityRecognition",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
}
]
}
}
Library name and version
Azure.AI.TextAnalytics 5.3.0
Query/Question
I am running the latest version of the text analytics container from
mcr.microsoft.com/azure-cognitive-services/textanalytics/ner
on my machine. When I try to executeRecognizeEntitiesAsync
, I encounter the following error:However, there is no issue when I make a direct API call:
Environment
.NET SDK: Version: 8.0.205 Commit: 3e1383b780 Workload version: 8.0.200-manifests.818b3449
Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.205\