Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

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

Source

View on GitHub

praisonaiagents/agent/agent.py at line 4253