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
- Create an object of the
EditConversationRequest
class, using theEditConversationRequestBuilder
class. - For editing a conversation call
editConversation()
present inLMChatClient
class using your request object. - Process the response (
LMResponse<EditConversationResponse>
) as per your requirement.
EditConversationRequest request = (EditConversationRequestBuilder()
..conversationId(70989)
..text("Hello World"))
.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);
}
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 |
---|---|---|---|
success | bool | API success status | |
errorMessage | String? | Error message in case of failure | ✔️ |
conversation | Conversation? | Edited conversation | ✔️ |