StateKey

org.llm4s.agent.graph.StateKey
See theStateKey companion class
object StateKey

Attributes

Companion
class
Source
StateKey.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
StateKey.type

Members list

Value members

Concrete methods

def appending[A](id: String)(using codec: ReadWriter[A]): StateKey[Vector[A], A]

A key that collects every update, in commit order, starting empty.

A key that collects every update, in commit order, starting empty.

Attributes

Source
StateKey.scala
def apply[A, U](id: String, initial: A)(applyUpdate: (A, U) => Result[A])(using stateCodec: ReadWriter[A], updateCodec: ReadWriter[U]): StateKey[A, U]

A key whose updates are operations applied to the current value.

A key whose updates are operations applied to the current value.

Attributes

Source
StateKey.scala
def replace[A](id: String, initial: A)(using codec: ReadWriter[A]): StateKey[A, A]

A key whose update is its next value: the last update applied wins.

A key whose update is its next value: the last update applied wins.

Attributes

Source
StateKey.scala