Conversational Analysis Authoring - Import

觸發作業以匯入專案。 如果具有相同名稱的專案已經存在,則會取代該專案的資料。

POST {Endpoint}/language/authoring/analyze-conversations/projects/{projectName}/:import?api-version=2023-04-01
POST {Endpoint}/language/authoring/analyze-conversations/projects/{projectName}/:import?format={format}&api-version=2023-04-01

URI 參數

名稱 位於 必要 類型 Description
Endpoint
path True

string

支援的認知服務端點 (例如 https://.api.cognitiveservices.azure.com).

projectName
path True

string

要使用的項目名稱。

api-version
query True

string

用戶端 API 版本。

format
query

ExportedProjectFormat

要使用的匯出項目檔格式。

要求本文

名稱 必要 類型 Description
metadata True

ConversationalAnalysisAuthoringCreateProjectOptions

表示專案元數據。

projectFileVersion True

string

匯出檔案的版本。

stringIndexType True

StringIndexType

指定用來解譯字串位移的方法。 如需詳細資訊,請參閱 https://aka.ms/text-analytics-offsets

assets ConversationalAnalysisAuthoringExportedProjectAssets:

表示項目資產。

回應

名稱 類型 Description
202 Accepted

成功呼叫的結果是用於檢查作業狀態的 Operation-Location 標頭。

Headers

operation-location: string

Other Status Codes

ErrorResponse

錯誤回應。

安全性

AADToken

這些是 Azure Active Directory OAuth2 流程。 與 Azure 角色型存取控制配對時,其可用來控制對 #D8D8DF387B84D4345A145A5D78967D25A REST API 的存取。 Azure 角色型訪問控制可用來指定一或多個 Azure 地圖服務 資源帳戶或子資源的存取權。 任何使用者、群組或服務主體都可以透過內建角色或由一或多個許可權組成的自定義角色來授與存取權,以 Azure 地圖服務 REST API。

若要實作案例,建議您檢視 驗證概念。 總而言之,此安全性定義提供一個解決方案,可透過能夠針對特定 API 和範圍進行存取控制的物件,將應用程式模型化 () 。

備註

  • 此安全性定義需要使用x-ms-client-id 標頭來指出應用程式要求存取權 Azure 地圖服務 資源。 這可以從 地圖服務管理 API 取得。

Authorization URL專屬於 Azure 公用雲端實例。 主權雲端具有唯一的授權 URL 和 Azure Active Directory 設定。 * 透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API,從 Azure 管理平面設定 Azure 角色型存取控制。 * Azure 地圖服務 Web SDK 的使用方式允許針對多個使用案例設定應用程式的組態。

  • Azure Active Directory v1.0 或 v2.0 目前支援公司、學校和來賓,但不支持個人帳戶。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
https://cognitiveservices.azure.com/.default https://cognitiveservices.azure.com/.default

Ocp-Apim-Subscription-Key

語言服務資源的訂用帳戶金鑰。

Type: apiKey
In: header

範例

Successful Import Project

Sample Request

POST {Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/:import?api-version=2023-04-01

{
  "projectFileVersion": "2022-05-01",
  "stringIndexType": "Utf16CodeUnit",
  "metadata": {
    "projectKind": "Conversation",
    "settings": {
      "confidenceThreshold": 0.7
    },
    "projectName": "EmailApp",
    "multilingual": true,
    "description": "Trying out CLU",
    "language": "en-us"
  },
  "assets": {
    "projectKind": "Conversation",
    "intents": [
      {
        "category": "Read"
      },
      {
        "category": "Delete"
      }
    ],
    "entities": [
      {
        "category": "Sender"
      },
      {
        "category": "Number",
        "regex": {
          "expressions": [
            {
              "regexKey": "UK Phone numbers",
              "language": "en-us",
              "regexPattern": "/^\\(?([0-9]{3})\\)?[-.\\s]?([0-9]{3})[-.\\s]?([0-9]{4})$/"
            }
          ]
        }
      }
    ],
    "utterances": [
      {
        "text": "Open Blake's email",
        "dataset": "Train",
        "intent": "Read",
        "entities": [
          {
            "category": "Sender",
            "offset": 5,
            "length": 5
          }
        ]
      },
      {
        "text": "Delete last email",
        "language": "en-gb",
        "dataset": "Test",
        "intent": "Delete",
        "entities": []
      }
    ]
  }
}

Sample Response

operation-location: {Endpoint}/language/authoring/analyze-conversations/projects/EmailApp/import/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2023-04-01

定義

名稱 Description
CompositionSetting

實體元件彼此重疊時要遵循的行為。

ConversationalAnalysisAuthoringConversationExportedEntity

表示具有其元件的實體。

ConversationalAnalysisAuthoringConversationExportedIntent

表示交談項目的導出意圖。

ConversationalAnalysisAuthoringConversationExportedProjectAssets

表示交談項目導出的資產。

ConversationalAnalysisAuthoringConversationExportedUtterance

表示交談項目導出的語句。

ConversationalAnalysisAuthoringCreateProjectOptions

表示用來建立或更新項目的選項。

ConversationalAnalysisAuthoringExportedConversationOrchestration

定義交談專案目標的協調流程詳細數據。

ConversationalAnalysisAuthoringExportedConversationOrchestrationOptions

代表交談專案目標的協調流程選項。

ConversationalAnalysisAuthoringExportedEntityList

表示實體的清單元件。

ConversationalAnalysisAuthoringExportedEntityListSynonym

代表清單元件內的同義字清單

ConversationalAnalysisAuthoringExportedEntityRegex

表示實體的 Regex 元件。

ConversationalAnalysisAuthoringExportedEntityRegexExpression

表示 regex 元件內的 regex 運算式。 此表達式遵循 .NET regex 語法。 如需參考,請參閱這裡: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions

ConversationalAnalysisAuthoringExportedEntitySublist

表示清單元件內的子清單。

ConversationalAnalysisAuthoringExportedLuisOrchestration

定義 LUIS 應用程式目標的協調流程詳細數據。

ConversationalAnalysisAuthoringExportedLuisOrchestrationOptions

表示 LUIS 應用程式目標的協調流程選項。

ConversationalAnalysisAuthoringExportedPrebuiltEntity

表示導出的預先建置實體元件

ConversationalAnalysisAuthoringExportedProject

表示導出的專案。

ConversationalAnalysisAuthoringExportedQuestionAnsweringOrchestration

定義問題解答專案目標的協調流程詳細數據。

ConversationalAnalysisAuthoringExportedQuestionAnsweringOrchestrationOptions

代表問題解答項目目標的協調流程選項。

ConversationalAnalysisAuthoringExportedUtteranceEntityLabel

表示語句的實體標籤。

ConversationalAnalysisAuthoringOrchestrationExportedIntent

表示協調流程項目的導出意圖。

ConversationalAnalysisAuthoringOrchestrationExportedProjectAssets

表示協調流程項目的資產。

ConversationalAnalysisAuthoringOrchestrationExportedUtterance

表示協調流程項目的語句。

ConversationalAnalysisAuthoringProjectSettings

表示用來定義項目行為的設定。

Error

錯誤物件。

ErrorCode

人類可讀取的錯誤碼。

ErrorResponse

錯誤回應。

ExportedProjectFormat

要使用的匯出項目檔格式。

InnerErrorCode

人類可讀取的錯誤碼。

InnerErrorModel

物件,包含有關錯誤的更特定資訊。 根據 Microsoft One API 指導方針 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

ProjectKind

表示項目種類。

StringIndexType

指定用來解譯字串位移的方法。 如需詳細資訊,請參閱 https://aka.ms/text-analytics-offsets

CompositionSetting

實體元件彼此重疊時要遵循的行為。

名稱 類型 Description
combineComponents

string

在文字中找到兩個或多個元件並重疊時,元件範圍會合併成合併所有元件。

requireExactOverlap

string

所有的元件都必須在要傳回的實體文字中,以 [完全相同的字元] 來重疊。 如果其中一個定義的元件不符合或未預測到,則實體將不會傳回。

returnLongestOverlap

string

在文字中找到兩個或多個元件並重疊時,會傳回具有最長字元集的元件。

separateComponents

string

每個元件的相符項或預測都會以實體的個別實例傳回。

ConversationalAnalysisAuthoringConversationExportedEntity

表示具有其元件的實體。

名稱 類型 Description
category

string

實體的類別。

compositionSetting

CompositionSetting

實體元件彼此重疊時要遵循的行為。

list

ConversationalAnalysisAuthoringExportedEntityList

實體的清單元件。

prebuilts

ConversationalAnalysisAuthoringExportedPrebuiltEntity[]

預先建置的實體元件。

regex

ConversationalAnalysisAuthoringExportedEntityRegex

實體的 regex 元件。

requiredComponents

string[]

必要的元件。 允許的值為 'learned'、'list'、'prebuilts' 和 'regex'。

ConversationalAnalysisAuthoringConversationExportedIntent

表示交談項目的導出意圖。

名稱 類型 Description
category

string

意圖分類。

ConversationalAnalysisAuthoringConversationExportedProjectAssets

表示交談項目導出的資產。

名稱 類型 Description
entities

ConversationalAnalysisAuthoringConversationExportedEntity[]

項目中定義的實體。

intents

ConversationalAnalysisAuthoringConversationExportedIntent[]

項目中定義的意圖。

projectKind string:

Conversation

包含資產的項目類型。

utterances

ConversationalAnalysisAuthoringConversationExportedUtterance[]

項目中定義的語句。

ConversationalAnalysisAuthoringConversationExportedUtterance

表示交談項目導出的語句。

名稱 類型 Description
dataset

string

這個語句的數據集。 允許的值為 『Train』 和 'Test'。

entities

ConversationalAnalysisAuthoringExportedUtteranceEntityLabel[]

表示語句的實體標籤。

intent

string

語句的意圖。

language

string

代表語句的語言。 這是語言的 BCP-47 表示法。 例如,將 「en」 用於英文、“en-gb” 用於英文 (UK) 、“es” 用於西班牙文等。

text

string

語句文字。

ConversationalAnalysisAuthoringCreateProjectOptions

表示用來建立或更新項目的選項。

名稱 類型 Description
description

string

專案描述。

language

string

項目語言。 這是語言的 BCP-47 表示法。 例如,將 「en」 用於英文、“en-gb” 用於英文 (UK) 、“es” 用於西班牙文等。

multilingual

boolean

專案是否要用於多種語言。

projectKind

ProjectKind

表示項目種類。

projectName

string

新的項目名稱。

settings

ConversationalAnalysisAuthoringProjectSettings

項目設定。

ConversationalAnalysisAuthoringExportedConversationOrchestration

定義交談專案目標的協調流程詳細數據。

名稱 類型 Description
deploymentName

string

目標部署的名稱。

projectName

string

目標項目的名稱。

ConversationalAnalysisAuthoringExportedConversationOrchestrationOptions

代表交談專案目標的協調流程選項。

名稱 類型 Description
conversationOrchestration

ConversationalAnalysisAuthoringExportedConversationOrchestration

交談專案目標詳細數據。

targetProjectKind string:

Conversation

協調流程中使用的目標種類。

ConversationalAnalysisAuthoringExportedEntityList

表示實體的清單元件。

名稱 類型 Description
sublists

ConversationalAnalysisAuthoringExportedEntitySublist[]

清單元件的子清單。

ConversationalAnalysisAuthoringExportedEntityListSynonym

代表清單元件內的同義字清單

名稱 類型 Description
language

string

表示同義字的語言。 這是語言的 BCP-47 表示法。 例如,將 「en」 用於英文、“en-gb” 用於英文 (UK) 、西班牙文為 “es”。

values

string[]

同義字清單。

ConversationalAnalysisAuthoringExportedEntityRegex

表示實體的 Regex 元件。

名稱 類型 Description
expressions

ConversationalAnalysisAuthoringExportedEntityRegexExpression[]

regex 元件的 Regex 運算式。 這些表達式遵循 .NET regex 語法。 如需參考,請參閱這裡: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions

ConversationalAnalysisAuthoringExportedEntityRegexExpression

表示 regex 元件內的 regex 運算式。 此表達式遵循 .NET regex 語法。 如需參考,請參閱這裡: https://learn.microsoft.com/dotnet/standard/base-types/regular-expressions

名稱 類型 Description
language

string

表示 regex 表達式的語言。 這是語言的 BCP-47 表示法。 例如,將 「en」 用於英文、“en-gb” 用於英文 (UK) 、西班牙文為 “es”。

regexKey

string

regex 表達式的索引鍵。

regexPattern

string

regex 模式。

ConversationalAnalysisAuthoringExportedEntitySublist

表示清單元件內的子清單。

名稱 類型 Description
listKey

string

子清單的索引鍵。

synonyms

ConversationalAnalysisAuthoringExportedEntityListSynonym[]

對應至子清單的片語。

ConversationalAnalysisAuthoringExportedLuisOrchestration

定義 LUIS 應用程式目標的協調流程詳細數據。

名稱 類型 Description
appId

string

LUIS 應用程式識別碼。

appVersion

string

目標版本識別碼。

slotName

string

目標位置名稱。

ConversationalAnalysisAuthoringExportedLuisOrchestrationOptions

表示 LUIS 應用程式目標的協調流程選項。

名稱 類型 Description
luisOrchestration

ConversationalAnalysisAuthoringExportedLuisOrchestration

LUIS 應用程式目標詳細數據。

targetProjectKind string:

Luis

協調流程中使用的目標種類。

ConversationalAnalysisAuthoringExportedPrebuiltEntity

表示導出的預先建置實體元件

名稱 類型 Description
category

string

預先建置的實體類別目錄。

ConversationalAnalysisAuthoringExportedProject

表示導出的專案。

名稱 類型 Description
assets ConversationalAnalysisAuthoringExportedProjectAssets:

表示項目資產。

metadata

ConversationalAnalysisAuthoringCreateProjectOptions

表示專案元數據。

projectFileVersion

string

匯出檔案的版本。

stringIndexType

StringIndexType

指定用來解譯字串位移的方法。 如需詳細資訊,請參閱 https://aka.ms/text-analytics-offsets

ConversationalAnalysisAuthoringExportedQuestionAnsweringOrchestration

定義問題解答專案目標的協調流程詳細數據。

名稱 類型 Description
projectName

string

目標項目的名稱。

ConversationalAnalysisAuthoringExportedQuestionAnsweringOrchestrationOptions

代表問題解答項目目標的協調流程選項。

名稱 類型 Description
questionAnsweringOrchestration

ConversationalAnalysisAuthoringExportedQuestionAnsweringOrchestration

問題解答專案詳細數據。

targetProjectKind string:

QuestionAnswering

協調流程中使用的目標種類。

ConversationalAnalysisAuthoringExportedUtteranceEntityLabel

表示語句的實體標籤。

名稱 類型 Description
category

string

實體標籤的類別。

length

integer

實體文字的長度。

offset

integer

實體文字的開始位置。

ConversationalAnalysisAuthoringOrchestrationExportedIntent

表示協調流程項目的導出意圖。

名稱 類型 Description
category

string

意圖分類。

orchestration ConversationalAnalysisAuthoringExportedOrchestrationOptions:

指定協調流程中此意圖的行為。

ConversationalAnalysisAuthoringOrchestrationExportedProjectAssets

表示協調流程項目的資產。

名稱 類型 Description
intents

ConversationalAnalysisAuthoringOrchestrationExportedIntent[]

表示專案的意圖。

projectKind string:

Orchestration

包含資產的項目類型。

utterances

ConversationalAnalysisAuthoringOrchestrationExportedUtterance[]

表示項目的語句。

ConversationalAnalysisAuthoringOrchestrationExportedUtterance

表示協調流程項目的語句。

名稱 類型 Description
dataset

string

這個語句的數據集。 允許的值為 『Train』 和 'Test'。

intent

string

語句的意圖。

language

string

代表語句的語言。 這是語言的 BCP-47 表示法。 例如,將 「en」 用於英文、“en-gb” 用於英文 (UK) 、“es” 用於西班牙文等。

text

string

語句文字。

ConversationalAnalysisAuthoringProjectSettings

表示用來定義項目行為的設定。

名稱 類型 Description
confidenceThreshold

number

具有最高信賴度的意圖閾值,預測會自動變更為「無」。 閾值的值應該介於 0 到 1 之間。

Error

錯誤物件。

名稱 類型 Description
code

ErrorCode

其中一組伺服器定義的錯誤碼。

details

Error[]

導致此錯誤之特定錯誤的詳細數據陣列。

innererror

InnerErrorModel

物件,包含比目前對象有關錯誤的更特定資訊。

message

string

人類看得懂的錯誤表示法。

target

string

錯誤的目標。

ErrorCode

人類可讀取的錯誤碼。

名稱 類型 Description
AzureCognitiveSearchIndexLimitReached

string

AzureCognitiveSearchIndexNotFound

string

AzureCognitiveSearchNotFound

string

AzureCognitiveSearchThrottling

string

Conflict

string

Forbidden

string

InternalServerError

string

InvalidArgument

string

InvalidRequest

string

NotFound

string

OperationNotFound

string

ProjectNotFound

string

QuotaExceeded

string

ServiceUnavailable

string

Timeout

string

TooManyRequests

string

Unauthorized

string

Warning

string

ErrorResponse

錯誤回應。

名稱 類型 Description
error

Error

錯誤物件。

ExportedProjectFormat

要使用的匯出項目檔格式。

名稱 類型 Description
Conversation

string

指定交談專案的格式。

Luis

string

指定從 LUIS 導出的應用程式格式。

InnerErrorCode

人類可讀取的錯誤碼。

名稱 類型 Description
AzureCognitiveSearchNotFound

string

AzureCognitiveSearchThrottling

string

EmptyRequest

string

ExtractionFailure

string

InvalidCountryHint

string

InvalidDocument

string

InvalidDocumentBatch

string

InvalidParameterValue

string

InvalidRequest

string

InvalidRequestBodyFormat

string

KnowledgeBaseNotFound

string

MissingInputDocuments

string

ModelVersionIncorrect

string

UnsupportedLanguageCode

string

InnerErrorModel

物件,包含有關錯誤的更特定資訊。 根據 Microsoft One API 指導方針 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名稱 類型 Description
code

InnerErrorCode

其中一組伺服器定義的錯誤碼。

details

object

錯誤詳細數據。

innererror

InnerErrorModel

物件,包含比目前對象有關錯誤的更特定資訊。

message

string

錯誤訊息。

target

string

錯誤目標。

ProjectKind

表示項目種類。

名稱 類型 Description
Conversation

string

將自然語言建置到應用程式、Bot 和IoT裝置的專案。

Orchestration

string

在單一專案中連接及協調對話、自定義問題解答和 LUIS 專案的專案。

StringIndexType

指定用來解譯字串位移的方法。 如需詳細資訊,請參閱 https://aka.ms/text-analytics-offsets

名稱 類型 Description
Utf16CodeUnit

string

位移和長度值會對應至UTF-16程式代碼單位。 如果您的應用程式是以支援 Unicode 的語言撰寫,例如 Java、JavaScript,請使用此選項。