Summarization
AI-powered service that summarizes a single messages or chat conversations
/service/summarization
Summarize single messages or conversations
REST API
POST /service/summarization
Input query parameters
role
required
Predefined role used to run the AI service
message
required
Required if chat parameters is missing. Message to be summarized
chat
required
Required if message parameters is missing. Chat conversation to be summarized
language
required
Language in ISO-639 format to translate the summary into
Example of a call to summarize a message:
curl https://{{ tenant }}.lightenup.ai/service/summarization \
--request POST \
--header "Authorization: Bearer xyz" \
--header "Content-Type: application/json" \
--data @- << EOF
{
"role": "order_management_assistant",
"message": "Como puedo cancelar mi ultimo pedido",
"language": "en-US",
}
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 summarized. If any,
name
The original message to be summarized. If any,
language
Target translation language in ISO-639 format
output
The response from the AI service following the JSON format:
"{
"results": [ {
service":"summarization",
"message":"message summarized"
}]
}"
"{
"results": [ {
service":"summarization",
"message":"message summarized"
}]
}"
Response example:
{
"role": "customer_assistant",
"message": "One second please",
"language": "fr-FR",
"output": "{\"results\":[{\"service\":\"summarization\",\"message\":\"Le message de l'utilisateur est une demande de patience en attendant un instant.\"}]}"
}
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",
}