Class: Cadenya::Models::MemoryLayerSpec

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/memory_layer_spec.rb,
sig/cadenya/models/memory_layer_spec.rbs

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(type:, agent_id: nil, description: nil, episodic_key: nil, expires_at: nil, system_managed: nil) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::MemoryLayerSpec for more details.

Parameters:

  • type (Symbol, Cadenya::Models::MemoryLayerSpec::Type)
  • agent_id (String) (defaults to: nil)

    Server-set on episodic layers: the agent this layer belongs to. Unset for

  • description (String) (defaults to: nil)

    Human-readable description of the layer's purpose. Encouraged for

  • episodic_key (String) (defaults to: nil)

    Server-set on episodic layers: the caller-supplied episodic key the layer

  • expires_at (Time) (defaults to: nil)

    For layers with a finite lifetime (e.g., episodic), the time at which the

  • system_managed (Boolean) (defaults to: nil)

    Server-set. True for layers managed by the system (e.g., episodic layers



# File 'lib/cadenya/models/memory_layer_spec.rb', line 50

Instance Attribute Details

#agent_idString? (readonly)

Returns the value of attribute agent_id.

Returns:

  • (String, nil)


20
21
22
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 20

def agent_id
  @agent_id
end

#descriptionString?

Human-readable description of the layer's purpose. Encouraged for user-created layers; system-managed layers may have a generated description.

Parameters:

  • (String)

Returns:

  • (String, nil)


16
# File 'lib/cadenya/models/memory_layer_spec.rb', line 16

optional :description, String

#episodic_keyString? (readonly)

Returns the value of attribute episodic_key.

Returns:

  • (String, nil)


24
25
26
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 24

def episodic_key
  @episodic_key
end

#expires_atTime? (readonly)

Returns the value of attribute expires_at.

Returns:

  • (Time, nil)


28
29
30
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 28

def expires_at
  @expires_at
end

#system_managedBoolean? (readonly)

Returns the value of attribute system_managed.

Returns:

  • (Boolean, nil)


32
33
34
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 32

def system_managed
  @system_managed
end

#typeSymbol, Cadenya::Models::MemoryLayerSpec::Type

Parameters:

  • value (Cadenya::Models::MemoryLayerSpec::type_)

Returns:



9
# File 'lib/cadenya/models/memory_layer_spec.rb', line 9

required :type, enum: -> { Cadenya::MemoryLayerSpec::Type }

Instance Method Details

#agent_id=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


22
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 22

def agent_id=: (String) -> String

#episodic_key=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


26
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 26

def episodic_key=: (String) -> String

#expires_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


30
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 30

def expires_at=: (Time) -> Time

#system_managed=Boolean (readonly)

Parameters:

  • (Boolean)

Returns:

  • (Boolean)


34
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 34

def system_managed=: (bool) -> bool

#to_hash{

Returns:

  • ({)


45
# File 'sig/cadenya/models/memory_layer_spec.rbs', line 45

def to_hash: -> {