Skip to main content

Edit Conversation

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

Steps to edit a conversation

  1. For editing a conversation call editConversation() method provided by the client you initialised.
  2. Process the response as per your requirement.
const payload: any = {
conversationId: 76766, // ID of the conversation
text: "", // edited text
};

const response = await lmChatClient?.editConversation(payload);

if (response.success) {
// your function to process the response data

const conversationId = response?.data?.conversation?.id;

// to update message locally
await lmChatClient?.updateConversation(
conversationId.toString(),
response?.data?.conversation
);
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Edit Conversation Payload

List of parameters provided by editConversation().

VariableTypeDescriptionOptional
conversationIdnumberConversation Id
textstringText content

Edit Conversation Response

List of parameters in the response.

VariableTypeDescription
successbooleanAPI success status
error_messagestringError message in case of failure
conversationConversationEdited conversation