Question Answering Projects - Update Sources
Frissítések a projekt forrásait.
PATCH {Endpoint}/language/query-knowledgebases/projects/{projectName}/sources?api-version=2021-10-01
URI-paraméterek
Name | In | Kötelező | Típus | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Támogatott Cognitive Services-végpont (pl. https://.api.cognitiveservices.azure.com). |
project
|
path | True |
string |
A használni kívánt projekt neve. |
api-version
|
query | True |
string |
Ügyfél API-verziója. |
Kérelem fejléce
Name | Kötelező | Típus | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Kérelem törzse
Name | Típus | Description |
---|---|---|
body |
Projekt forrásparamétereinek frissítése. |
Válaszok
Name | Típus | Description |
---|---|---|
202 Accepted |
A sikeres hívás eredménye egy Operation-Location fejléccel, amely a feladat állapotának ellenőrzésére szolgál. Headers Operation-Location: string |
|
Other Status Codes |
Hibaválasz. |
Biztonság
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Példák
Successful query
Sample Request
PATCH {Endpoint}/language/query-knowledgebases/projects/proj1/sources?api-version=2021-10-01
[
{
"op": "add",
"value": {
"displayName": "source3",
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context",
"sourceKind": "url",
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context"
}
},
{
"op": "replace",
"value": {
"displayName": "source1",
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
"sourceKind": "url",
"refresh": true,
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview"
}
},
{
"op": "delete",
"value": {
"displayName": "source2",
"sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf",
"sourceKind": "file",
"source": "surface-guide.pdf"
}
}
]
Sample Response
Operation-Location: job1
Definíciók
Name | Description |
---|---|
Error |
A hibaobjektum. |
Error |
Emberi olvasásra alkalmas hibakód. |
Error |
Hibaválasz. |
Inner |
Emberi olvasásra alkalmas hibakód. |
Inner |
Egy objektum, amely pontosabb információkat tartalmaz a hibáról. A Microsoft One API irányelveinek megfelelően : https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
source |
A források tartalomstruktúra-típusa. |
source |
Támogatott forrástípusok. |
update |
Adategységek frissítési művelettípusa. |
Update |
Forrásrekord frissítése. |
Update |
Frissítendő forrás. |
Error
A hibaobjektum.
Name | Típus | Description |
---|---|---|
code |
A kiszolgáló által definiált hibakódok egyike. |
|
details |
Error[] |
A jelentett hibához vezető konkrét hibák részleteinek tömbje. |
innererror |
Egy objektum, amely az aktuális objektumnál pontosabb információt tartalmaz a hibáról. |
|
message |
string |
A hiba emberi olvasásra alkalmas ábrázolása. |
target |
string |
A hiba célja. |
ErrorCode
Emberi olvasásra alkalmas hibakód.
Name | Típus | Description |
---|---|---|
AzureCognitiveSearchIndexLimitReached |
string |
|
AzureCognitiveSearchIndexNotFound |
string |
|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
Forbidden |
string |
|
InternalServerError |
string |
|
InvalidArgument |
string |
|
InvalidRequest |
string |
|
NotFound |
string |
|
OperationNotFound |
string |
|
ProjectNotFound |
string |
|
ServiceUnavailable |
string |
|
TooManyRequests |
string |
|
Unauthorized |
string |
ErrorResponse
Hibaválasz.
Name | Típus | Description |
---|---|---|
error |
A hibaobjektum. |
InnerErrorCode
Emberi olvasásra alkalmas hibakód.
Name | Típus | Description |
---|---|---|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
ExtractionFailure |
string |
|
InvalidParameterValue |
string |
|
InvalidRequest |
string |
|
KnowledgeBaseNotFound |
string |
InnerErrorModel
Egy objektum, amely pontosabb információkat tartalmaz a hibáról. A Microsoft One API irányelveinek megfelelően : https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
Name | Típus | Description |
---|---|---|
code |
A kiszolgáló által definiált hibakódok egyike. |
|
details |
object |
Hiba részletei. |
innererror |
Egy objektum, amely az aktuális objektumnál pontosabb információt tartalmaz a hibáról. |
|
message |
string |
Hibaüzenet. |
target |
string |
Hibacél. |
sourceContentStructureKind
A források tartalomstruktúra-típusa.
Name | Típus | Description |
---|---|---|
unstructured |
string |
sourceKind
Támogatott forrástípusok.
Name | Típus | Description |
---|---|---|
file |
string |
|
url |
string |
updateOperationKind
Adategységek frissítési művelettípusa.
Name | Típus | Description |
---|---|---|
add |
string |
|
delete |
string |
|
replace |
string |
UpdateQnaSourceRecord
Forrásrekord frissítése.
Name | Típus | Alapértelmezett érték | Description |
---|---|---|---|
contentStructureKind | Unstructured |
A források tartalomstruktúra-típusa. |
|
displayName |
string |
A Forrás rövid neve. |
|
refresh |
boolean |
A forrásból származó adatok frissítéséhez használt logikai jelző. |
|
source |
string |
Egyedi forrásazonosító. A fájl neve, ha "fájl" forrás; ellenkező esetben a teljes URL-címet, ha az "URL" forrás. |
|
sourceKind | url |
Támogatott forrástípusok. |
|
sourceUri |
string |
A fájl vagy url URI-helye. |
UpdateSourceRecord
Frissítendő forrás.
Name | Típus | Description |
---|---|---|
op |
Adategységek frissítési művelettípusa. |
|
value |
Forrásrekord frissítése. |