Localization

Takes into consideration the cultural nuances, ambiguities in languages and idiomatic expressions to identify the language and geolocation of the input message

/service/localization
Identify language and geolocation of a message or conversation
REST API
POST /service/localization
Input query parameters
role
required
Predefined role used to run the AI service
message
required
Required if chat parameters is missing. Message to be localized
chat
required
Required if message parameters is missing. Chat conversation to be localized
Example of a call to localize a message:
curl https://{{ tenant }}.lightenup.ai/service/localization\
--request POST \
--header "Authorization: Bearer xyz" \
--header "Content-Type: application/json" \
--data @- << EOF
{
  "role": "order_management_assistant",
  "message": "Como puedo cancelar mi ultimo pedido"
}
EOF
Outputs
Response Code
200

This API returns an array of Policies  in JSON format:

role
The role used to translate the message or conversation
message
The original message to be localized. If any,
name
The original message to be localized. If any,
output
The response from the AI service following the JSON format:
"{
 "results": [ {
               service":"localization",
               "message":"message localized"
       }]
}"
Response example:
{
    "role": "customer_assistant",
    "message": "One second please",
    "output": "{\"results\":[{\"service\":\"localization\",\"message\":\"en-US\"}]}"
}

Response Code
400

Error message in JSON format:

message
Error message
Response Example:
{
  "message": "Missing parameters",
}

Response Code
500

Error message in JSON format:

message
Error message
Response exdmple:
{
  "message": "Internal server error",
}