Create processor
create_processor(
name,
type = "OCR_PROCESSOR",
proj_id = get_project_id(),
loc = "eu",
token = dai_token()
)
a string; the proposed display name of the processor.
a string; one of "OCR_PROCESSOR", "FORM_PARSER_PROCESSOR", "INVOICE_PROCESSOR", or "US_DRIVER_LICENSE_PROCESSOR".
a GCS project id.
a two-letter region code; "eu" or "us".
an authentication token generated by dai_auth()
or
another auth function.
a processor id if successful, otherwise NULL.
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/.
if (FALSE) { # \dontrun{
proc_id <- create_processor("my-processor-123")
} # }