Closed evogelpohl closed 1 year ago
I answered this question on StackOverflow as well, but you need to add the skill in context of a skillset resource, so within the skills
array of the JSON object. So basically it should be like this:
{
"name": "**skillset name here**",
"description": "",
"skills": [
{
"@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
"description": "Acronym linker",
"uri": "https://**my_func_url_with_default_key_here**",
"batchSize": 1,
"context": "/document/content",
"inputs": [
{
"name": "document_id",
"source": "/document/document_id"
},
{
"name": "text",
"source": "/document/content"
},
{
"name": "filepath",
"source": "/document/file_path"
},
{
"name": "fieldname",
"source": "='content'"
}
],
"outputs": [
{
"name": "chunks",
"targetName": "chunks"
}
]
}
],
"cognitiveServices": {
"@odata.type": "#Microsoft.Azure.Search.DefaultCognitiveServices"
}
}
Get this error when adding the Azure Function from this repo (https://github.com/Azure-Samples/azure-search-power-skills/tree/main/Vector/EmbeddingGenerator) to the Azure Cognitive Search Service as a skillset, as noted in the documentation.
ERROR: The request is invalid. Details: Incompatible type kinds were found. The type 'Microsoft.Skills.Custom.WebApiSkill' was found to be of kind 'Complex' instead of the expected kind 'Entity'.
This issue is for a: (mark with an
x
)Minimal steps to reproduce
code + test
, clickGet Function URL
, paste into sample skill as provided on EmbeddingGenerator READMD doc.skillsets
, add the code from the README doc for the search-power-skills to insert the azure fn into the Cog Search pipeline, changing the URL as copied.Any log messages given by the failure
Expected/desired behavior
It works
OS and Version?
N/a. Azure PaaS services
Versions
N/a
Mention any other details that might be useful