Skip to main content

deleteChat

deleteChat(params: { id: string }): void

The deleteChat method deletes a chat session identified by its unique ID. This method is used to remove chat records from the user interface. It requires an object parameter containing the id of the chat you want to delete.

Known Properties

  • id (string): The unique identifier of the chat session to be deleted.

Use Cases

Delete a Specific Chat by ID

chat.deleteChat({ id: '12345' });
console.log("chat", '12345', "was deleted");

This use case demonstrates how to delete a chat session using its unique ID. The method deleteChat is called with an object containing the ID '12345'. After the chat is deleted, a message indicating the deletion is logged to the console.