Knowledgebase - Replace
Bilgi bankası içeriğini değiştirin.
PUT {Endpoint}/qnamaker/v5.0-preview.2/knowledgebases/{kbId}
URI Parametreleri
Name | İçinde | Gerekli | Tür | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Desteklenen Bilişsel Hizmetler uç noktası (örn. https://< qnamaker-resource-name >.api.cognitiveservices.azure.com). |
kb
|
path | True |
string |
Bilgi bankası kimliği. |
İstek Başlığı
Name | Gerekli | Tür | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
İstek Gövdesi
Name | Gerekli | Tür | Description |
---|---|---|---|
qnAList | True |
QnADTO[] |
Bilgi bankasına eklenecek Q-A (QnADTO) listesi. Q-A Kimlikleri hizmet tarafından atanır ve atlanmalıdır. |
Yanıtlar
Name | Tür | Description |
---|---|---|
204 No Content |
HTTP 204 İçerik yok. |
|
Other Status Codes |
Hata yanıtı. |
Güvenlik
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Örnekler
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
Tanımlar
Name | Description |
---|---|
Context |
Güncelleştirilecek Qna ile ilişkili bağlam. |
Error |
Hata nesnesi. Microsoft One API yönergelerine göre - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
Error |
Sunucu tanımlı hata kodları kümesinden biri. |
Error |
Hata yanıtı. Microsoft One API yönergelerine göre - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
Inner |
Hata hakkında daha ayrıntılı bilgi içeren bir nesne. Microsoft One API yönergelerine göre - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
MetadataDTO |
Ad - meta verilerin değer çifti. |
PromptDTO |
Bir yanıt iste. |
Qna |
QnADTO - QnaId veya QnADTO bir PromptDTO nesnesinde mevcut olmalıdır |
QnADTO |
Q-A nesnesi. |
Replace |
KB değiştirme işlemi için gövde şeması gönderme. |
Context
Güncelleştirilecek Qna ile ilişkili bağlam.
Name | Tür | Description |
---|---|---|
isContextOnly |
boolean |
Bir istemin yalnızca önceki bir soruyla ilgili olup olmadığını işaretlemek için. true - Bu Soru-Cevap'ı bağlam false olmayan sorgular için arama sonucu olarak eklemeyin; bağlamı yoksayar ve bu Soru-Cevap'ı arama sonucuna ekler |
promptsToAdd |
Qna'ya eklenecek istemlerin listesi. |
|
promptsToDelete |
integer[] |
Silinecek qna ile ilişkili istemlerin listesi |
Error
Hata nesnesi. Microsoft One API yönergelerine göre - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
Name | Tür | Description |
---|---|---|
code |
Sunucu tanımlı hata kodları kümesinden biri. |
|
details |
Error[] |
Bu bildirilen hataya yol açan belirli hatalarla ilgili bir dizi ayrıntı. |
innerError |
Hatayla ilgili geçerli nesneden daha belirli bilgiler içeren bir nesne. |
|
message |
string |
Hatanın insanlar tarafından okunabilir bir gösterimi. |
target |
string |
Hatanın hedefi. |
ErrorCodeType
Sunucu tanımlı hata kodları kümesinden biri.
Name | Tür | Description |
---|---|---|
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
Hata yanıtı. Microsoft One API yönergelerine göre - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
Name | Tür | Description |
---|---|---|
error |
Hata nesnesi. |
InnerErrorModel
Hata hakkında daha ayrıntılı bilgi içeren bir nesne. Microsoft One API yönergelerine göre - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
Name | Tür | Description |
---|---|---|
code |
string |
İçeren hata tarafından sağlanandan daha özel bir hata kodu. |
innerError |
Hatayla ilgili geçerli nesneden daha belirli bilgiler içeren bir nesne. |
MetadataDTO
Ad - meta verilerin değer çifti.
Name | Tür | Description |
---|---|---|
name |
string |
Meta veri adı. |
value |
string |
Meta veri değeri. |
PromptDTO
Bir yanıt iste.
Name | Tür | Description |
---|---|---|
displayOrder |
integer |
İstem dizini - istemlerin sırasına göre kullanılır |
displayText |
string |
İzleme soru istemini temsil etmek için görüntülenen metin |
qna |
QnADTO - QnaId veya QnADTO bir PromptDTO nesnesinde mevcut olmalıdır |
|
qnaId |
integer |
istemine karşılık gelen Qna kimliği - QnaId varsa, QnADTO nesnesi yoksayılır. |
Qna
QnADTO - QnaId veya QnADTO bir PromptDTO nesnesinde mevcut olmalıdır
Name | Tür | Description |
---|---|---|
answer |
string |
Kısa mesajı yanıtlama |
context |
Soru-Cevap Bağlamı |
|
id |
integer |
Soru-Cevap için benzersiz kimlik. |
lastUpdatedTimestamp |
string |
Soru-Cevap'ın son güncelleştirildiği zaman damgası. |
metadata |
Yanıtla ilişkilendirilmiş meta verilerin listesi. |
|
questions |
string[] |
Yanıtla ilişkili soruların listesi. |
source |
string |
Q-A'nın dizinlendiği kaynak. Örneğin. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs |
QnADTO
Q-A nesnesi.
Name | Tür | Description |
---|---|---|
answer |
string |
Kısa mesajı yanıtlama |
context |
Soru-Cevap Bağlamı |
|
id |
integer |
Soru-Cevap için benzersiz kimlik. |
lastUpdatedTimestamp |
string |
Soru-Cevap'ın son güncelleştirildiği zaman damgası. |
metadata |
Yanıtla ilişkilendirilmiş meta verilerin listesi. |
|
questions |
string[] |
Yanıtla ilişkili soruların listesi. |
source |
string |
Q-A'nın dizinlendiği kaynak. Örneğin. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs |
ReplaceKbDTO
KB değiştirme işlemi için gövde şeması gönderme.
Name | Tür | Description |
---|---|---|
qnAList |
QnADTO[] |
Bilgi bankasına eklenecek Q-A (QnADTO) listesi. Q-A Kimlikleri hizmet tarafından atanır ve atlanmalıdır. |