Delete Conversation
Deleting a conversation means that you can delete the text content of specified conversation corresponding to a unique conversation ID.
Steps to delete a conversation
- To delete a conversation, use the method
deleteConversation()
provided by the client. - Pass in the required parameter
conversationIds
andreason
. - Process the response as per your requirement.
const payload: DeleteConversation = {
conversationIds: [], // Pass in the id's of the conversation you want to delete.
reason: "", // Pass in the reason to delete the conversation.
};
const response = await lmChatClient.deleteConversation(payload);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}
Delete Conversation Payload
List of parameters required by the deleteConversation()
method.
Variable | Type | Description | Optional |
---|---|---|---|
conversationIds | array | Conversations Ids | |
reason | string | Reason for conversation deletion |
Delete Conversation Response
List of parameters in the response.
Variable | Type | Description |
---|---|---|
success | boolean | API success status |
error_message | string | Error message in case of failure |