Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
I gave up on this approach and instead used office.js. I had no problems calling the services from there.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am developing a Word VSTO add-in so that I can call a Cognitive Services knowledgebase service. The code is pretty straight-forward and works fine when I run it from a windows console app (a similar call in python also works without issue):
Debug.WriteLine("beginning of the try");
string azureEndpoint = "https://redacted.cognitiveservices.azure.com/"; // Replace with your actual endpoint URL
string subscriptionKey = "redacted"; // Replace with your actual subscription key
Uri endpoint = new Uri(azureEndpoint);
AzureKeyCredential credential = new AzureKeyCredential(subscriptionKey);
QuestionAnsweringClient client = new QuestionAnsweringClient(endpoint, credential);
string projectName = "redacted";
string deploymentName = "production";
QuestionAnsweringProject project = new QuestionAnsweringProject(projectName, deploymentName);
Response
Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
I gave up on this approach and instead used office.js. I had no problems calling the services from there.