Skip to main content

build_context_for_task

Method
This is a method of the Memory class in the memory module.
Merges relevant short-term, long-term, entity, user memories into a single text block with deduplication and clean formatting.

Signature

Parameters

str
required
No description available.
Optional
No description available.
str
default:"''"
No description available.
int
default:"3"
No description available.
Optional
If None, memory content is only included when debug logging is enabled. If True, memory content is always included. If False, memory content is never included (only logged for debugging).

Returns

str
The result of the operation.

Uses

  • getEffectiveLevel
  • logging.getLogger
  • c.isspace
  • content.rfind
  • format_content
  • normalize_content
  • seen_contents.add
  • logger.debug
  • search_short_term
  • search_long_term

Used By

Source

View on GitHub

praisonaiagents/memory/memory.py at line 1486

Tasks Concept

Task Configuration

Task Validation

Context Concept

Context Management