MemoryBounds

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

Attributes

Companion
class
Source
TransactionalMemoryStore.scala
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
Source
TransactionalMemoryStore.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Entry

Attributes

Companion
class
Source
TransactionalMemoryStore.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Entry.type
final case class Owner(key: String, value: String)

The writer whose memories bounds count: those whose metadata has key set to value.

The writer whose memories bounds count: those whose metadata has key set to value.

Attributes

Source
TransactionalMemoryStore.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

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

The default bounds: 1000 memories, 4 MiB, counting every memory in the store.

The default bounds: 1000 memories, 4 MiB, counting every memory in the store.

Attributes

Source
TransactionalMemoryStore.scala
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

Source
TransactionalMemoryStore.scala
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

Source
TransactionalMemoryStore.scala