Description Usage Arguments Details Value See Also Examples
Object representing an Azure Cognitive Service endpoint
1 2 | cognitive_endpoint(url, service_type, key = NULL, aad_token = NULL,
cognitive_token = NULL, auth_header = "ocp-apim-subscription-key")
|
url |
The URL of the endpoint. |
service_type |
What type (or kind) of service the endpoint provides. See below for the services that AzureCognitive currently recognises. |
key |
The subscription key (single- or multi-service) to use to authenticate with the endpoint. |
aad_token |
An Azure Active Directory (AAD) OAuth token, as an alternative to a key for the services that allow AAD authentication. |
cognitive_token |
A Cognitive Service token, as another alternative to a key for the services that accept it. |
auth_header |
The name of the HTTP request header for authentication. Only used if a subscription key is supplied. |
Currently, cognitive_endpoint
recognises the following service types:
CognitiveServices
: multiple service types
ComputerVision
: generic computer vision service
Face
: face recognition
LUIS
: language understanding
CustomVision.Training
: Training endpoint for a custom vision service
CustomVision.Prediction
: Prediction endpoint for a custom vision service
ContentModerator
: Content moderation (text and images)
Text
: text analytics
TextTranslate
: text translation
An object inheriting from class cognitive_endpoint
, that can be used to communicate with the REST endpoint. The subclass of the object indicates the type of service provided.
call_cognitive_endpoint, create_cognitive_service, get_cognitive_service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
cognitive_endpoint("https://myvisionservice.api.cognitive.azure.com",
service_type="Computervision", key="key")
cognitive_endpoint("https://mylangservice.api.cognitive.azure.com",
service_type="LUIS", key="key")
# authenticating with AAD
token <- AzureAuth::get_azure_token("https://cognitiveservices.azure.com",
tenant="mytenant", app="app_id", password="password")
cognitive_endpoint("https://myvisionservice.api.cognitive.azure.com",
service_type="Computervision", aad_token=token)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.