node.jsazurebots

How to find the endpointKey for Azure Custom Question Answering?


I'm working with Azure's Custom Question Answering service and I'm trying to find the endpointKey. Below is the configuration I'm using:

// Configuration for Custom Question Answering
const projectName = 'mr...';
const deploymentName = 'pr..';
const endpointKey = 'a27....';
const host = 'https://......';

I know the projectName, deploymentName, and host, but I need to understand how to find or generate the endpointKey. Is this key provided in the Azure portal, or do I need to generate it programmatically? Any guidance on where to locate this key would be greatly appreciated.


Solution

  • Initially, I followed this MS Document to create language resource with custom question answering feature enabled as below:

    enter image description here

    In the next screen, enter the name of language resource and click on Review + create button:

    enter image description here

    After creating the language resource, sign into Language Studio and add new custom question answering project like this:

    enter image description here

    You can find the endpointKey value for Azure Custom Question Answering in prediction URL sample request with Ocp-Apim-Subscription-Key name after deploying knowledge base:

    enter image description here

    Alternatively, you can also find endpointKey value directly in Keys and Endpoint section of language resource in Azure Portal like this:

    enter image description here

    You can use any of the above key values for endpointKey parameter.