我在 Azure AI 搜索中创建了以下技能集:
{
"@odata.context": "https://srch-tender-prod-weu-001.search.windows.net/$metadata#skillsets/$entity",
"@odata.etag": "\"0x8DC7350076C5133\"",
"name": "standalone-skillset",
"description": "Skillset to chunk documents and generating embeddings",
"skills": [
{
"@odata.type": "#Microsoft.Skills.Text.SplitSkill",
"name": "#1",
"description": "Split skill to chunk documents",
"context": "/document",
"defaultLanguageCode": "en",
"textSplitMode": "pages",
"maximumPageLength": 5000,
"pageOverlapLength": 0,
"maximumPagesToTake": 0,
"inputs": [
{
"name": "text",
"source": "/document/content"
}
],
"outputs": [
{
"name": "textItems",
"targetName": "pages"
}
]
},
{
"@odata.type": "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill",
"name": "#2",
"description": "Skill to generate embeddings via Azure OpenAI",
"context": "/document/pages/*",
"resourceUri": "https://oai-tender-prod-swec-001.openai.azure.com",
"apiKey": "<redacted>",
"deploymentId": "text-ada-002-embedding",
"inputs": [
{
"name": "text",
"source": "/document/pages/*"
}
],
"outputs": [
{
"name": "embedding",
"targetName": "vector"
}
],
"authIdentity": null
}
],
"cognitiveServices": null,
"knowledgeStore": null,
"indexProjections": {
"selectors": [
{
"targetIndexName": "standalone",
"parentKeyFieldName": "parent_id",
"sourceContext": "/document/pages/*",
"mappings": [
{
"name": "chunk",
"source": "/document/pages/*",
"sourceContext": null,
"inputs": []
},
{
"name": "vector",
"source": "/document/pages/*/vector",
"sourceContext": null,
"inputs": []
}
]
}
],
"parameters": {
"projectionMode": "skipIndexingParentDocuments"
}
},
"encryptionKey": null
}
Azure Open AI 资源具有以下端点:(https://i.sstatic.net/0kicDALC.png)
但是,在执行该技能集的索引器时,该技能集会出现错误:无法解析远程名称:'oai-tender-prod-swec-001.openai.azure.com' (https://i.sstatic.net/yrA2W90w.png)
这是什么原因?
您在截图中给出的API是基于区域的;它不支持Azure AI搜索。因此,您必须提供 OpenAI 资源 URI,其结尾如下:
https://<Your_url_name>.openai.azure.com/
我在提供不正确的 OpenAI 资源名称时也遇到了同样的错误。
检查您的资源名称,
oai-tender-prod-swec-001
,您的情况是不正确的。