Skip to main content

Edit Conversation

Editing a conversation means that you can change the text content of a specified conversation corresponding to a unique conversation ID.

Steps to Edit a Conversation

  1. Create an object of the EditConversationRequest class using the EditConversationRequestBuilder class.
  2. For editing a conversation, call editConversation() present in the LMChatClient class using your request object.
  3. Process the response LMResponse<EditConversationResponse> as per your requirement.
EditConversationRequest request = (EditConversationRequestBuilder()
..conversationId("ENTER_CONVERSATION_ID")
..text("ENTER_UPDATED_TEXT"))
.build();

LMResponse<EditConversationResponse> response = await lmChatClient.editConversation(request);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response.errorMessage);
}

Models

EditConversationRequest

List of parameters for the EditConversationRequest class

VariableTypeDescriptionOptional
conversationIdintConversation ID
textStringText content

EditConversationResponse

List of parameters for the EditConversationResponse class

VariableTypeDescriptionOptional
conversationConversation?Edited conversation✔️