MemoryBounds

org.llm4s.agent.memory.MemoryBounds
See theMemoryBounds companion class
@Experimental
object MemoryBounds

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Entry(id: MemoryId, importance: Option[Double], timestamp: Instant, size: Long)

One stored memory, as MemoryBounds.overflow ranks it.

One stored memory, as MemoryBounds.overflow ranks it.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Entry

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Entry.type

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(maxMemories: Int, maxBytes: Long): MemoryBounds

The default bounds: 1000 memories, 4 MiB.

The default bounds: 1000 memories, 4 MiB.

Attributes

def sizeOf(memory: Memory): Long

The size a memory counts for: the UTF-8 bytes of its content and of its metadata keys and values.

The size a memory counts for: the UTF-8 bytes of its content and of its metadata keys and values.

Attributes

def sizeOf(content: String, metadata: Map[String, String]): Long

sizeOf from the parts a store reads back.

sizeOf from the parts a store reads back.

Attributes