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
- Create an object of the
EditConversationRequest
class using theEditConversationRequestBuilder
class. - For editing a conversation, call
editConversation()
present in theLMChatClient
class using your request object. - 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
Variable | Type | Description | Optional |
---|---|---|---|
conversationId | int | Conversation ID | |
text | String | Text content |
EditConversationResponse
List of parameters for the EditConversationResponse
class
Variable | Type | Description | Optional |
---|---|---|---|
conversation | Conversation? | Edited conversation | ✔️ |