Chat Improve
Improve a previous answer by introducing new instructions or
chat_improve
Enables Agents to provide additional context or new instructions to improve a previous answer.
WEBSOCKET
{ action=message, service=chat_improve }
Input query parameters
action
required
Predefined role used to run the AI service
service
required
The new of the chat service
role
required
Predefined role used to run the AI service
instruction
required
The Agent's proposed answer.
message
required
Required if chat parameters is missing. User message
chat
required
Required if message parameters is missing. Full chat or conversation
language
required
Language in ISO-639 format to translate into
Example of chat assist message:
wss://{{ tenant }}.ws.lightenup.ai
Message:
{
"action" : "service"
"service" : "chat_improve",
"role": "customer_assistant",
"chat": "[{},{}]",
"instruction": "The Agent's instructions to improve a previous answer",
"language":"en-CA"
}
Outputs
Response Code
200
This API returns an array of Policies in JSON format:
Response example:
{
"action": "message",
"service": "improve",
"state": "completed",
"connectionId": "T1lsTcMtIAMCLgQ=",
"messageId": "T1lsqcNHIAMCLgQ=",
"statusCode": "200",
"message": "{\"results\":[{\"service\":\"improve\",\"message\":\Improved answer\"}]}"
}
Response Code
400
Error message in JSON format:
message
Error message
Response Example:
{
"action": "message",
"service": "localization",
"state": "error",
"connectionId": "T1lsTcMtIAMCLgQ=",
"messageId": "T1lsqcNHIAMCLgQ=",
"statusCode": "400",
"message": "Missing parameters"
}
Response Code
500
Error message in JSON format:
message
Error message
Response exdmple:
{
"action": "message",
"service": "localization",
"state": "error",
"connectionId": "T1lsTcMtIAMCLgQ=",
"messageId": "T1lsqcNHIAMCLgQ=",
"statusCode": "400",
"message": "Missing parameters"
}