Question Answering Projects - Update Sources
Projenin kaynaklarını güncelleştirir.
PATCH {Endpoint}/language/authoring/query-knowledgebases/projects/{projectName}/sources?api-version=2023-04-01
URI Parametreleri
| Name | İçinde | Gerekli | Tür | Description |
|---|---|---|---|---|
|
Endpoint
|
path | True |
string (uri) |
Desteklenen Bilişsel Hizmetler uç noktası (örneğin, https://< resource-name.api.cognitiveservices.azure.com>). |
|
project
|
path | True |
string maxLength: 100pattern: ^(?=[a-zA-Z0-9])[a-zA-Z0-9-]{0,98}[a-zA-Z0-9]$ |
Kullanılacak projenin adı. |
|
api-version
|
query | True |
string minLength: 1 |
Bu işlem için kullanılacak API sürümü. |
İstek Gövdesi
| Name | Tür | Description |
|---|---|---|
| body |
Bir projenin kaynak parametrelerini güncelleyin. |
Yanıtlar
| Name | Tür | Description |
|---|---|---|
| 202 Accepted |
İstek işlenmek üzere kabul edildi, ancak işlem henüz tamamlanmadı. Üst Bilgiler Operation-Location: string |
|
| Other Status Codes |
Beklenmeyen bir hata yanıtı. Üst Bilgiler x-ms-error-code: string |
Güvenlik
Ocp-Apim-Subscription-Key
Tür:
apiKey
İçinde:
header
OAuth2Auth
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name | Description |
|---|---|
| https://cognitiveservices.azure.com/.default |
Örnekler
Successful query
Örnek isteği
PATCH {Endpoint}/language/authoring/query-knowledgebases/projects/proj1/sources?api-version=2023-04-01
[
{
"op": "add",
"value": {
"displayName": "source3",
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context",
"sourceKind": "url",
"sourceUri": "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",
"refresh": true,
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
"sourceKind": "url",
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview"
}
},
{
"op": "delete",
"value": {
"displayName": "source2",
"source": "surface-guide.pdf",
"sourceKind": "file",
"sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf"
}
}
]
Örnek yanıt
Operation-Location: https:///language/authoring/query-knowledgebases/projects/proj1/sources/jobs/job1?api-version=2023-04-01
Tanımlar
| Name | Description |
|---|---|
| Error |
Hata nesnesi. |
|
Error |
İnsan tarafından okunabilen hata kodu. |
|
Error |
Hata yanıtı. |
|
Inner |
İnsan tarafından okunabilen hata kodu. |
|
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. |
|
source |
Kaynaklar için içerik yapısı türü. |
|
source |
Desteklenen kaynak türleri. |
|
update |
Varlıklar için işlem türünü güncelleştirin. |
|
Update |
Kaynak kaydını güncelleştirin. |
|
Update |
Kaynak güncellenecek. |
Error
Hata nesnesi.
| Name | Tür | Description |
|---|---|---|
| code |
Sunucu tanımlı hata kodları kümesinden biri. |
|
| details |
Error[] |
Bu bildirilen hataya yol açan belirli hatalar hakkında bir dizi ayrıntı. |
| innererror |
Hatayla ilgili geçerli nesneden daha belirli bilgiler içeren bir nesne. |
|
| message |
string |
Hatanın insan tarafından okunabilir bir gösterimi. |
| target |
string |
Hatanın hedefi. |
ErrorCode
İnsan tarafından okunabilen hata kodu.
| Değer | Description |
|---|---|
| InvalidRequest |
Geçersiz istek hatası |
| InvalidArgument |
Geçersiz bağımsız değişken hatası |
| Unauthorized |
Yetkisiz erişim hatası |
| Forbidden |
Yasak erişim hatası |
| NotFound |
Bulunamadı hatası |
| ProjectNotFound |
Proje bulunamadı hatası |
| OperationNotFound |
İşlem bulunamadı hatası |
| AzureCognitiveSearchNotFound |
Azure Bilişsel Arama bulunamadı hatası |
| AzureCognitiveSearchIndexNotFound |
Azure Bilişsel Arama dizini bulunamadı hatası |
| TooManyRequests |
Çok fazla istek hatası |
| AzureCognitiveSearchThrottling |
Azure Bilişsel Arama azaltma hatası |
| AzureCognitiveSearchIndexLimitReached |
Azure Bilişsel Arama dizin sınırına ulaşıldı hatası |
| InternalServerError |
İç sunucu hatası |
| ServiceUnavailable |
Hizmet kullanılamıyor hatası |
| Timeout |
Zaman aşımı hatası |
| QuotaExceeded |
Kota aşıldı hatası |
| Conflict |
Çakışma hatası |
| Warning |
Uyarı hatası |
ErrorResponse
Hata yanıtı.
| Name | Tür | Description |
|---|---|---|
| error |
Hata nesnesi. |
InnerErrorCode
İnsan tarafından okunabilen hata kodu.
| Değer | Description |
|---|---|
| InvalidRequest |
Geçersiz istek hatası |
| InvalidParameterValue |
Geçersiz parametre değeri hatası |
| KnowledgeBaseNotFound |
Bilgi bankası bulunamadı hatası |
| AzureCognitiveSearchNotFound |
Azure Bilişsel Arama bulunamadı hatası |
| AzureCognitiveSearchThrottling |
Azure Bilişsel Arama azaltma hatası |
| ExtractionFailure |
Ayıklama hatası |
| InvalidRequestBodyFormat |
Geçersiz istek gövdesi biçimi hatası |
| EmptyRequest |
Boş istek hatası |
| MissingInputDocuments |
Eksik giriş belgeleri hatası |
| InvalidDocument |
Geçersiz belge hatası |
| ModelVersionIncorrect |
Model sürümü yanlış hatası |
| InvalidDocumentBatch |
Geçersiz belge toplu iş hatası |
| UnsupportedLanguageCode |
Desteklenmeyen dil kodu hatası |
| InvalidCountryHint |
Geçersiz ülke ipucu hatası |
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 |
Sunucu tanımlı hata kodları kümesinden biri. |
|
| details |
object |
Hata ayrıntıları. |
| innererror |
Hatayla ilgili geçerli nesneden daha belirli bilgiler içeren bir nesne. |
|
| message |
string |
Hata mesajı. |
| target |
string |
Hata hedefi. |
sourceContentStructureKind
Kaynaklar için içerik yapısı türü.
| Değer | Description |
|---|---|
| unstructured |
Yapılandırılmamış. |
sourceKind
Desteklenen kaynak türleri.
| Değer | Description |
|---|---|
| file |
Dosya Kaynağı. |
| url |
URI Kaynağı. |
updateOperationKind
Varlıklar için işlem türünü güncelleştirin.
| Değer | Description |
|---|---|
| add |
İşlem ekleyin. |
| delete |
Silme işlemi. |
| replace |
İşlemi değiştirin. |
UpdateQnaSourceRecord
Kaynak kaydını güncelleştirin.
| Name | Tür | Default value | Description |
|---|---|---|---|
| contentStructureKind | unstructured |
Kaynaklar için içerik yapısı türü. |
|
| displayName |
string minLength: 1maxLength: 200 |
Kaynağın kolay adı. |
|
| refresh |
boolean |
Kaynaktan verileri yenilemek için kullanılan Boole bayrağı. |
|
| source |
string |
Benzersiz kaynak tanımlayıcısı. Bir 'dosya' kaynağıysa dosyanın adı; aksi takdirde, bir 'url' kaynağıysa tam URL. |
|
| sourceKind |
Desteklenen kaynak türleri. |
||
| sourceUri |
string (uri) |
Dosya veya url için URI konumu. |
UpdateSourceRecord
Kaynak güncellenecek.
| Name | Tür | Description |
|---|---|---|
| op |
Varlıklar için işlem türünü güncelleştirin. |
|
| value |
Kaynak kaydını güncelleştirin. |