create_processor: Create processor
Description
Create processor
Usage
create_processor(
name,
type = "OCR_PROCESSOR",
proj_id = get_project_id(),
loc = "eu",
token = dai_token()
)
Value
a processor id if successful, otherwise NULL.
Arguments
- name
a string; the proposed display name of the processor.
- type
a string; one of "OCR_PROCESSOR",
"FORM_PARSER_PROCESSOR", "INVOICE_PROCESSOR", or
"US_DRIVER_LICENSE_PROCESSOR".
- proj_id
a GCS project id.
- loc
a two-letter region code; "eu" or "us".
- token
an authentication token generated by dai_auth()
or
another auth function.
Details
Creates a Document AI processor and returns the id of the
newly created processor. Note that the proposed processor name may
already be taken; if so, try again with another name. Consider
storing the processor id in an environment variable named
DAI_PROCESSOR_ID. For more information about processors, see the
Google Document AI documentation at
https://cloud.google.com/document-ai/docs/.
Examples
Run this codeif (FALSE) {
proc_id <- create_processor("my-processor-123")
}
Run the code above in your browser using DataLab