MemoryFilter

org.llm4s.agent.memory.MemoryFilter
See theMemoryFilter companion object
sealed trait MemoryFilter

Filter criteria for memory recall.

MemoryFilters are composable predicates that can be combined to create complex filtering logic for memory retrieval.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object All
class And
class ByEntity
class ByMetadata
class ByTimeRange
class ByType
class ByTypes
class Custom
class HasMetadata
object None
class Not
class Or
Show all

Members list

Value members

Abstract methods

def matches(memory: Memory): Boolean

Test if a memory matches this filter.

Test if a memory matches this filter.

Value parameters

memory

The memory to test

Attributes

Returns

True if the memory matches the filter criteria, False otherwise

Concrete methods

Alias for and.

Alias for and.

Attributes

Combine this filter with another using AND logic.

Combine this filter with another using AND logic.

Value parameters

other

The other filter to combine with

Attributes

Returns

A new MemoryFilter that matches if both filters match

Negate this filter.

Negate this filter.

Attributes

Returns

A new MemoryFilter that matches if this filter does not match

Combine this filter with another using OR logic.

Combine this filter with another using OR logic.

Value parameters

other

The other filter to combine with

Attributes

Returns

A new MemoryFilter that matches if either filter matches

Alias for not.

Alias for not.

Attributes

Alias for or.

Alias for or.

Attributes