Sdílet prostřednictvím


@azure-rest/ai-translation-document package

Rozhraní

BatchRequest

Definice pro vstupní požadavek dávkového překladu

CancelTranslation200Response

Požadavek byl úspěšný.

CancelTranslationDefaultHeaders
CancelTranslationDefaultResponse
DocumentFilter

Filtr dokumentů

DocumentStatusOutput

Odpověď na stav dokumentu

DocumentTranslate
DocumentTranslate200Headers
DocumentTranslate200Response

Požadavek byl úspěšný.

DocumentTranslateBodyParam
DocumentTranslateContentDocumentPartDescriptor
DocumentTranslateContentGlossaryPartDescriptor
DocumentTranslateDefaultHeaders
DocumentTranslateDefaultResponse
DocumentTranslateHeaderParam
DocumentTranslateHeaders
DocumentTranslateMediaTypesParam
DocumentTranslateQueryParam
DocumentTranslateQueryParamProperties
DocumentTranslationClientOptions

Volitelné parametry klienta

DocumentsStatusOutput

Odpověď na stav dokumentů

FileFormatOutput

Formát souboru

GetDocumentStatus
GetDocumentStatus200Response

Požadavek byl úspěšný.

GetDocumentStatusDefaultHeaders
GetDocumentStatusDefaultResponse
GetDocumentsStatus
GetDocumentsStatus200Response

Požadavek byl úspěšný.

GetDocumentsStatusDefaultHeaders
GetDocumentsStatusDefaultResponse
GetDocumentsStatusQueryParam
GetDocumentsStatusQueryParamProperties
GetSupportedFormats
GetSupportedFormats200Response

Požadavek byl úspěšný.

GetSupportedFormatsDefaultHeaders
GetSupportedFormatsDefaultResponse
GetSupportedFormatsQueryParam
GetSupportedFormatsQueryParamProperties
GetTranslationStatus
GetTranslationStatus200Response

Požadavek byl úspěšný.

GetTranslationStatusDefaultHeaders
GetTranslationStatusDefaultResponse
GetTranslationsStatus200Response

Požadavek byl úspěšný.

GetTranslationsStatusDefaultHeaders
GetTranslationsStatusDefaultResponse
GetTranslationsStatusQueryParam
GetTranslationsStatusQueryParamProperties
Glossary

Glosář / paměť překladu pro požadavek

InnerTranslationErrorOutput

Nový formát vnitřní chyby, který odpovídá pokynům rozhraní API služeb Cognitive Services, které jsou k dispozici v https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow. Obsahuje požadované vlastnosti ErrorCode, message and optional properties target, details(key value pair), inner error(this can be vnořováno).

PagingOptions

Možnosti pomocné rutiny stránkování

Routes
SimplePollerLike

Jednoduchý poller, který lze použít k dotazování dlouhotrvající operace.

SourceInput

Zdroj vstupních dokumentů

StartTranslation
StartTranslation202Headers
StartTranslation202Response

Žádost byla přijata ke zpracování, ale zpracování ještě nebylo dokončeno.

StartTranslationBodyParam
StartTranslationDefaultHeaders
StartTranslationDefaultResponse
StartTranslationDetails

Dávková žádost o odeslání úlohy překladu

StartTranslationLogicalResponse

Konečná odpověď pro dlouhotrvající operaci startTranslation

StatusSummaryOutput

Souhrn stavu

SupportedFileFormatsOutput

Seznam podporovaných formátů souborů

TargetInput

Cíl pro dokončené přeložené dokumenty

TranslationErrorOutput

Obsahuje vnější chybu s kódem chyby, zprávou, podrobnostmi, cílem a vnitřní chybou s popisnějšími podrobnostmi.

TranslationStatusOutput

Odpověď na stav úlohy překladu

TranslationsStatusOutput

Odpověď na stav úlohy překladu

Aliasy typu

CancelTranslationParameters
DocumentTranslateContent

Obsah žádosti o překlad dokumentu

DocumentTranslateParameters
DocumentTranslationClient
FileFormatType

Alias pro FileFormatType

GetArrayType

Pomocný typ pro extrahování typu pole

GetDocumentStatusParameters
GetDocumentsStatusParameters
GetPage

Typ vlastní funkce, která definuje, jak získat stránku, a odkaz na další, pokud existuje.

GetSupportedFormatsParameters
GetTranslationStatusParameters
GetTranslationsStatusParameters
PaginateReturn

Pomocný typ pro odvození typu stránkovaných prvků z typu odpovědi Tento typ je generován na základě informací swagger pro x-ms-pageable konkrétně na itemName vlastnost, která označuje vlastnost odpovědi, kde jsou nalezeny položky stránky. Výchozí hodnota je value. Tento typ nám umožní poskytnout iterátor silného typu na základě odpovědi, která se nám zobrazí jako druhý parametr.

StartTranslationParameters
StatusOutput

Alias pro StatusOutput

StorageInputType

Alias pro StorageInputType

StorageSource

Alias pro StorageSource

TranslationErrorCodeOutput

Alias pro TranslationErrorCodeOutput

Funkce

default(string, TokenCredential | KeyCredential, DocumentTranslationClientOptions)

Inicializace nové instance DocumentTranslationClient

getLongRunningPoller<TResult>(Client, StartTranslationDefaultResponse | StartTranslation202Response, CreateHttpPollerOptions<TResult, OperationState<TResult>>)

Pomocná funkce, která vytvoří objekt Poller, který pomáhá dotazovat dlouho běžící operaci.

isUnexpected(DocumentTranslate200Response | DocumentTranslateDefaultResponse)
isUnexpected(StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response)
isUnexpected(GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse)
isUnexpected(GetDocumentStatus200Response | GetDocumentStatusDefaultResponse)
isUnexpected(GetTranslationStatus200Response | GetTranslationStatusDefaultResponse)
isUnexpected(CancelTranslation200Response | CancelTranslationDefaultResponse)
isUnexpected(GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse)
isUnexpected(GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse)
paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)

Pomocná rutina stránkovat výsledky z počáteční odpovědi, která odpovídá specifikaci rozšíření Automatické x-ms-pageable

Podrobnosti funkce

default(string, TokenCredential | KeyCredential, DocumentTranslationClientOptions)

Inicializace nové instance DocumentTranslationClient

function default(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: DocumentTranslationClientOptions): DocumentTranslationClient

Parametry

endpointParam

string

Podporovaný koncový bod překladu dokumentu, protokol a název hostitele, například: https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.

credentials

TokenCredential | KeyCredential

jedinečně identifikovat přihlašovací údaje klienta

options
DocumentTranslationClientOptions

parametr pro všechny volitelné parametry

Návraty

getLongRunningPoller<TResult>(Client, StartTranslationDefaultResponse | StartTranslation202Response, CreateHttpPollerOptions<TResult, OperationState<TResult>>)

Pomocná funkce, která vytvoří objekt Poller, který pomáhá dotazovat dlouho běžící operaci.

function getLongRunningPoller<TResult>(client: Client, initialResponse: StartTranslationDefaultResponse | StartTranslation202Response, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>

Parametry

client
Client

Klient, který se má použít k odeslání požadavku, aby získal další stránky.

initialResponse

StartTranslationDefaultResponse | StartTranslation202Response

Počáteční odpověď.

options

CreateHttpPollerOptions<TResult, OperationState<TResult>>

Možnosti nastavení stavu obnovení nebo vlastního intervalu dotazování

Návraty

Promise<SimplePollerLike<OperationState<TResult>, TResult>>

  • Objekt poller, který se má dotazovat na aktualizace stavu operace, a nakonec získat konečnou odpověď.

isUnexpected(DocumentTranslate200Response | DocumentTranslateDefaultResponse)

function isUnexpected(response: DocumentTranslate200Response | DocumentTranslateDefaultResponse): response

Parametry

Návraty

response

isUnexpected(StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response)

function isUnexpected(response: StartTranslationLogicalResponse | StartTranslationDefaultResponse | StartTranslation202Response): response

Parametry

Návraty

response

isUnexpected(GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse)

function isUnexpected(response: GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse): response

Parametry

Návraty

response

isUnexpected(GetDocumentStatus200Response | GetDocumentStatusDefaultResponse)

function isUnexpected(response: GetDocumentStatus200Response | GetDocumentStatusDefaultResponse): response

Parametry

Návraty

response

isUnexpected(GetTranslationStatus200Response | GetTranslationStatusDefaultResponse)

function isUnexpected(response: GetTranslationStatus200Response | GetTranslationStatusDefaultResponse): response

Parametry

Návraty

response

isUnexpected(CancelTranslation200Response | CancelTranslationDefaultResponse)

function isUnexpected(response: CancelTranslation200Response | CancelTranslationDefaultResponse): response

Parametry

Návraty

response

isUnexpected(GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse)

function isUnexpected(response: GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse): response

Parametry

Návraty

response

isUnexpected(GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse)

function isUnexpected(response: GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse): response

Parametry

Návraty

response

paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)

Pomocná rutina stránkovat výsledky z počáteční odpovědi, která odpovídá specifikaci rozšíření Automatické x-ms-pageable

function paginate<TResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>

Parametry

client
Client

Klient, který se má použít k odesílání žádostí na další stránku

initialResponse

TResponse

Počáteční odpověď obsahující nextLink a aktuální stránku prvků

options

PagingOptions<TResponse>

Návraty

  • PagedAsyncIterableIterator pro iteraci prvků