Delete Conversations
Deleting a conversation means that you can delete the text content of specified conversations corresponding to unique conversation IDs.
Steps to Delete Conversations
- Create an object of the
DeleteConversationRequest
class using theDeleteConversationRequestBuilder
class and specify the conversation IDs. - Call
deleteConversation()
present in theLMChatClient
class using your request object. - Process the response LMResponse<
DeleteConversationResponse
> as per your requirement.
DeleteConversationRequest request = (DeleteConversationRequestBuilder()
..conversationIds("ENTER_CONVERSATION_IDS")
..reason("ENTER_REASON"))
.build();
LMResponse<DeleteConversationResponse> response =
await lmClient.deleteConversation(request);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response.errorMessage);
}
Models
DeleteConversationRequest
List of parameters for the DeleteConversationRequest
class
Variable | Type | Description | Optional |
---|---|---|---|
conversationIds | List<int> | List of conversation IDs | |
reason | String | Reason for conversation deletion |
DeleteConversationResponse
List of parameters for the DeleteConversationResponse
class
Variable | Type | Description | Optional |
---|---|---|---|
conversations | List<Conversation>? | List of conversation objects | ✔️ |