ChatHistory.Remove(ChatMessageContent) Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Removes the first occurrence of the specified message from the history.

C#
public bool Remove (Microsoft.SemanticKernel.ChatMessageContent item);

Parameters

item
ChatMessageContent

The message to remove from the history.

Returns

true if the item was successfully removed; false if it wasn't located in the history.

Implements

Exceptions

item is null.

Applies to

Product Versions
Semantic Kernel Dotnet Latest