fix: change API version to v2.0 (#444)

This commit is contained in:
kunzheng 2020-07-23 13:35:40 -07:00 коммит произвёл GitHub
Родитель 626c4f48c0
Коммит 015109e532
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -17,7 +17,7 @@ def runAnalysis(input_file, output_file, file_type):
apim_key = "<subscription_key>"
# Model ID
model_id = "<model_id>"
post_url = endpoint + "/formrecognizer/v2.0-preview/custom/models/%s/analyze" % model_id
post_url = endpoint + "/formrecognizer/v2.0/custom/models/%s/analyze" % model_id
params = {
"includeTextDetails": True
}

Просмотреть файл

@ -22,7 +22,7 @@ export const constants = {
convertedImageQuality: 0.7,
convertedThumbnailQuality: 0.2,
apiModelsPath: "/formrecognizer/v2.0-preview/custom/models",
apiModelsPath: "/formrecognizer/v2.0/custom/models",
pdfjsWorkerSrc(version: string) {
return `//fotts.azureedge.net/npm/pdfjs-dist/${version}/pdf.worker.js`;

Просмотреть файл

@ -84,7 +84,7 @@ export class OCRService {
try {
const headers = { "Content-Type": "application/json" };
const response = await ServiceHelper.postWithAutoRetry(
this.project.apiUriBase + "/formrecognizer/v2.0-preview/layout/analyze",
this.project.apiUriBase + "/formrecognizer/v2.0/layout/analyze",
{ url: filePath },
{ headers },
this.project.apiKey as string,