Knowledgebase - Replace

ナレッジ ベースの内容を置き換えます。

PUT {Endpoint}/qnamaker/v5.0-preview.2/knowledgebases/{kbId}

URI パラメーター

名前 / 必須 説明
Endpoint
path True

string

サポートされている Cognitive Services エンドポイント (例: https://< qnamaker-resource-name >.api.cognitiveservices.azure.com)。

kbId
path True

string

ナレッジ ベース ID。

要求ヘッダー

名前 必須 説明
Ocp-Apim-Subscription-Key True

string

要求本文

名前 必須 説明
qnAList True

QnADTO[]

ナレッジ ベースに追加する Q-A (QnADTO) の一覧。 Q-A ID はサービスによって割り当てられ、省略する必要があります。

応答

名前 説明
204 No Content

HTTP 204 コンテンツなし。

Other Status Codes

ErrorResponse

エラー応答。

セキュリティ

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Successful query

Sample Request

PUT {Endpoint}/qnamaker/v5.0-preview.2/knowledgebases/9d091697-fb8c-4ed5-9ac0-35bf8273bfff


{
  "qnAList": [
    {
      "id": 0,
      "answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle",
      "source": "Custom Editorial",
      "questions": [
        "How can I change the default message from QnA Maker?"
      ],
      "metadata": []
    },
    {
      "id": 0,
      "answer": "You can use our REST apis to create a KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/create",
      "source": "Custom Editorial",
      "questions": [
        "How do I programmatically create a KB?"
      ],
      "metadata": [
        {
          "name": "category",
          "value": "api"
        }
      ]
    }
  ]
}

Sample Response

定義

名前 説明
Context

更新する Qna に関連付けられているコンテキスト。

Error

error オブジェクト。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

ErrorCodeType

サーバー定義のエラー コードのセットの 1 つ。

ErrorResponse

エラー応答。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

InnerErrorModel

エラーに関するより具体的な情報を含むオブジェクト。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

MetadataDTO

名前 - メタデータの値ペア。

PromptDTO

回答を求めるメッセージを表示します。

Qna

QnADTO - QnaId または QnADTO のいずれかが PromptDTO オブジェクトに存在する必要がある

QnADTO

Q-A オブジェクト。

ReplaceKbDTO

KB の置換操作の本文スキーマの後。

Context

更新する Qna に関連付けられているコンテキスト。

名前 説明
isContextOnly

boolean

プロンプトが前の質問にのみ関連するかどうかをマークする。 true - コンテキスト false のないクエリの検索結果としてこの QnA を含めないでください - コンテキストを無視し、この QnA を検索結果に含めます

promptsToAdd

PromptDTO[]

qna に追加するプロンプトの一覧。

promptsToDelete

integer[]

削除する qna に関連付けられているプロンプトの一覧

Error

error オブジェクト。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名前 説明
code

ErrorCodeType

サーバー定義のエラー コードのセットの 1 つ。

details

Error[]

この報告されたエラーの原因となった特定のエラーに関する詳細の配列。

innerError

InnerErrorModel

エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。

message

string

エラーの人間が判読できる表現。

target

string

エラーのターゲット。

ErrorCodeType

サーバー定義のエラー コードのセットの 1 つ。

名前 説明
BadArgument

string

EndpointKeysError

string

ExtractionFailure

string

Forbidden

string

KbNotFound

string

NotFound

string

OperationNotFound

string

QnaRuntimeError

string

QuotaExceeded

string

SKULimitExceeded

string

ServiceError

string

Unauthorized

string

Unspecified

string

ValidationFailure

string

ErrorResponse

エラー応答。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名前 説明
error

Error

error オブジェクト。

InnerErrorModel

エラーに関するより具体的な情報を含むオブジェクト。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名前 説明
code

string

含まれているエラーによって提供されたよりも具体的なエラー コード。

innerError

InnerErrorModel

エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。

MetadataDTO

名前 - メタデータの値ペア。

名前 説明
name

string

メタデータの名前。

value

string

メタデータの値。

PromptDTO

回答を求めるメッセージを表示します。

名前 説明
displayOrder

integer

プロンプトのインデックス - プロンプトの順序付けで使用されます

displayText

string

フォローアップの質問プロンプトを表すために表示されるテキスト

qna

Qna

QnADTO - QnaId または QnADTO のいずれかが PromptDTO オブジェクトに存在する必要がある

qnaId

integer

プロンプトに対応する Qna id - QnaId が存在する場合、QnADTO オブジェクトは無視されます。

Qna

QnADTO - QnaId または QnADTO のいずれかが PromptDTO オブジェクトに存在する必要がある

名前 説明
answer

string

回答テキスト

context

Context

QnA のコンテキスト

id

integer

Q-A の一意の ID。

lastUpdatedTimestamp

string

QnA が最後に更新されたときのタイムスタンプ。

metadata

MetadataDTO[]

回答に関連付けられているメタデータの一覧。

questions

string[]

回答に関連付けられている質問の一覧。

source

string

Q-A のインデックスが作成されたソース。例えば。 https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs

QnADTO

Q-A オブジェクト。

名前 説明
answer

string

回答テキスト

context

Context

QnA のコンテキスト

id

integer

Q-A の一意の ID。

lastUpdatedTimestamp

string

QnA が最後に更新されたときのタイムスタンプ。

metadata

MetadataDTO[]

回答に関連付けられているメタデータの一覧。

questions

string[]

回答に関連付けられている質問の一覧。

source

string

Q-A のインデックスが作成されたソース。例えば。 https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs

ReplaceKbDTO

KB の置換操作の本文スキーマの後。

名前 説明
qnAList

QnADTO[]

ナレッジ ベースに追加する Q-A (QnADTO) の一覧。 Q-A ID はサービスによって割り当てられ、省略する必要があります。