Skip to main content

delete_history_matching

Method
This is a method of the Agent class in the agent module.
Delete all messages matching a pattern. Useful for removing all image-related messages after processing.

Signature

def delete_history_matching(pattern: str) -> int

Parameters

pattern
str
required
Substring to match in message content

Returns

Returns
int
Number of messages deleted