I can't Add the Function to the Cognitive Search skillset

Santosh Kumar 5 Reputation points
2024-01-24T08:41:25.42+00:00

The instructions are for the older version of the platform. Even the bash files has incompatibilities while running and now I can't Add the Function to the Cognitive Search skillset. I am new to azure and am following the instruction the learning documentation I mentioned earlier (https://learn.microsoft.com/en-us/training/modules/build-form-recognizer-custom-skill-for-azure-cognitive-search/4-exercise-build-deploy) In this, after starting the cloud shell, it asks me to clone the repo:
rm -r doc-intelligence -f
git clone https://github.com/MicrosoftLearning/mslearn-ai-document-intelligence doc-intelligence
then execute the bash file from the cloned repository like this:
cd doc-intelligence/04-custom-skill/
bash setup.sh

(Here also, the path is not updated in the learning doc. The actual path is:cd doc-intelligence/"Labfiles"/04-custom-skill/) The content of the bash is like this:
#~!/bin/bash Store color codes NORMAL=$(tput sgr0)
GREEN=$(tput setaf 2) Set up the resource group resourceGroupName=FormsRecognizerResources
printf "${GREEN}Setting up the $resourceGroupName resource group. \n${NORMAL}"
az group create --location westus --name FormsRecognizerResources Create the Forms Recognizer resource printf "${GREEN}Setting up the Forms Recognizer resource. \n${NORMAL}" First, purge it in case there's a recently deleted one SubID=$(az account show --query id --output tsv)
az resource delete --ids "/subscriptions/${SubID}/providers/Microsoft.CognitiveServices/locations/westus/resourceGroups/${resourceGroupName}/deletedAccounts/FormsRecognizer" Now, create the new one az cognitiveservices account create --kind FormRecognizer --location westus --name FormsRecognizer --resource-group $resourceGroupName --sku F0 --yes Create the Cognitive Search resource printf "${GREEN}Setting up Azure Cognitive Search. \n${NORMAL}" Purge any existing search resource with the same name az resource delete --ids "/subscriptions/${SubID}/resourceGroups/${resourceGroupName}/providers/Microsoft.Search/searchServices/enrichedcognitivesearch" Now, create the new one az search service create --name enrichedcognitivesearch --location westus --resource-group $resourceGroupName --sku Free --partition-count 1 --replica-count 1
printf "${GREEN}Setup completed. \n${NORMAL}"
and the error message I get is at the last part of the the bash script: Setting up Azure Cognitive Search. (ServiceNameUnavailable) Cannot provision service 'enrichedcognitivesearch' because a service with this name is already in use, or another request to provision a service with this name is still in progress RequestId: 80c34038-cf3c-47ff-aa23-9ade1b1feb7f Code: ServiceNameUnavailable Message: Cannot provision service 'enrichedcognitivesearch' because a service with this name is already in use, or another request to provision a service with this name is still in progress RequestId: 80c34038-cf3c-47ff-aa23-9ade1b1feb7f Setup completed. I understand that this is happening because the fundamental structure of the resources on the platform has been changed but the learning documentation is not updated. That's very irresponsible. Also, in the suubsequent steps of the learning document, the platform interface is not similar to the one mentioned in the document. I can't find the option of adding a 'new application setting' and putting 'FORMS_RECOGNIZER_ENDPOINT' and 'FORMS_RECOGNIZER_KEY'

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,638 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VarunTha 8,470 Reputation points Microsoft Vendor
    2024-04-12T07:40:51.8266667+00:00

    Hello Santosh Kumar,

    We really appreciate your patience.

    We contacted the content author, and they confirmed that they fixed the issue, as shown in the code block and screenshots below:

    cd doc-intelligence/Labfiles/04-custom-skill/
    bash setup.sh
    
    
    

    IMAGE1 1

    image2

    image3

    image4

    I apologize for any inconvenience caused by the comment deletion, and we have successfully recovered your comment.

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.

    Thank you.

    0 comments No comments

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.