Class: Cadenya::Models::Objective
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::Objective
- Defined in:
- lib/cadenya/models/objective.rb,
sig/cadenya/models/objective.rbs
Overview
Defined Under Namespace
Modules: State Classes: EpisodicMemory
Instance Attribute Summary collapse
-
#config_snapshot ⇒ Cadenya::ObjectiveConfigSnapshot
Returns the value of attribute config_snapshot.
-
#episodic_memory ⇒ Cadenya::Models::Objective::EpisodicMemory?
Episodic is used to configure the episodic memory for the objective.
-
#first_user_message ⇒ String
The first user message in the LLM chat history, either provided explicitly at creation or rendered from the variation's first_user_message_template.
-
#first_user_message_data ⇒ ::Hash[Symbol, top]?
readonly
Returns the value of attribute first_user_message_data.
-
#info ⇒ Cadenya::ObjectiveInfo?
readonly
Returns the value of attribute info.
-
#memory_cascade ⇒ Array<Cadenya::Models::MemoryReference>?
Memory layers/entries layered over the baseline cascade inherited from the selected variation — element-level rules over inherited styles, in CSS terms.
-
#metadata ⇒ Cadenya::Models::OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs).
-
#output ⇒ ::Hash[Symbol, top]?
readonly
Returns the value of attribute output.
-
#parent_objective_id ⇒ String?
readonly
Returns the value of attribute parent_objective_id.
-
#pinned_parameters ⇒ ::Hash[Symbol, String]?
readonly
Returns the value of attribute pinned_parameters.
-
#secrets ⇒ Array<Cadenya::Models::ObjectiveSecret>?
Secrets that can be used in the headers for tool calls using the secret interpolation format.
-
#state ⇒ Cadenya::Models::Objective::state
Returns the value of attribute state.
-
#state_message ⇒ String?
readonly
Returns the value of attribute state_message.
-
#system_prompt ⇒ String
Returns the value of attribute system_prompt.
-
#system_prompt_data ⇒ ::Hash[Symbol, top]?
readonly
Returns the value of attribute system_prompt_data.
Class Method Summary collapse
Instance Method Summary collapse
- #first_user_message_data ⇒ ::Hash[Symbol, top] readonly
- #info ⇒ Cadenya::ObjectiveInfo readonly
-
#initialize(config_snapshot:, first_user_message:, metadata:, state:, system_prompt:, episodic_memory: nil, first_user_message_data: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, pinned_parameters: nil, secrets: nil, state_message: nil, system_prompt_data: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Objective for more details.
- #output ⇒ ::Hash[Symbol, top] readonly
- #parent_objective_id ⇒ String readonly
- #pinned_parameters ⇒ ::Hash[Symbol, String] readonly
- #state_message ⇒ String readonly
- #system_prompt_data ⇒ ::Hash[Symbol, top] readonly
- #to_hash ⇒ {
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(config_snapshot:, first_user_message:, metadata:, state:, system_prompt:, episodic_memory: nil, first_user_message_data: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, pinned_parameters: nil, secrets: nil, state_message: nil, system_prompt_data: nil) ⇒ Object
Some parameter documentations has been truncated, see Cadenya::Models::Objective for more details.
Objective is the data for an objective. It contains the snapshotted fields for the selected agent and variation. Secrets are returned only with their names, and the output definition is copied from the agent's configuration.
|
|
# File 'lib/cadenya/models/objective.rb', line 126
|
Instance Attribute Details
#config_snapshot ⇒ Cadenya::ObjectiveConfigSnapshot
Returns the value of attribute config_snapshot.
45 46 47 |
# File 'sig/cadenya/models/objective.rbs', line 45 def config_snapshot @config_snapshot end |
#episodic_memory ⇒ Cadenya::Models::Objective::EpisodicMemory?
Episodic is used to configure the episodic memory for the objective
25 |
# File 'lib/cadenya/models/objective.rb', line 25 optional :episodic_memory, -> { Cadenya::Objective::EpisodicMemory }, api_name: :episodicMemory |
#first_user_message ⇒ String
The first user message in the LLM chat history, either provided explicitly at creation or rendered from the variation's first_user_message_template.
12 |
# File 'lib/cadenya/models/objective.rb', line 12 required :first_user_message, String, api_name: :firstUserMessage |
#first_user_message_data ⇒ ::Hash[Symbol, top]? (readonly)
Returns the value of attribute first_user_message_data.
51 52 53 |
# File 'sig/cadenya/models/objective.rbs', line 51 def @first_user_message_data end |
#info ⇒ Cadenya::ObjectiveInfo? (readonly)
Returns the value of attribute info.
55 56 57 |
# File 'sig/cadenya/models/objective.rbs', line 55 def info @info end |
#memory_cascade ⇒ Array<Cadenya::Models::MemoryReference>?
Memory layers/entries layered over the baseline cascade inherited from the selected variation — element-level rules over inherited styles, in CSS terms.
Array order is resolution order: EARLIER elements are more specific and are consulted first. Entries pinned via memory_entry_id behave as single-entry layers at their position.
System-managed layers (e.g., episodic) cannot be referenced here; they attach themselves automatically based on the episodic key.
Size cap: the TOTAL effective cascade (this field + the variation's memory layer assignments) must not exceed 10 entries. A request that would produce a larger cascade is rejected with InvalidArgument.
43 44 45 |
# File 'lib/cadenya/models/objective.rb', line 43 optional :memory_cascade, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] }, api_name: :memoryCascade |
#metadata ⇒ Cadenya::Models::OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
19 |
# File 'lib/cadenya/models/objective.rb', line 19 required :metadata, -> { Cadenya::OperationMetadata } |
#output ⇒ ::Hash[Symbol, top]? (readonly)
Returns the value of attribute output.
59 60 61 |
# File 'sig/cadenya/models/objective.rbs', line 59 def output @output end |
#parent_objective_id ⇒ String? (readonly)
Returns the value of attribute parent_objective_id.
63 64 65 |
# File 'sig/cadenya/models/objective.rbs', line 63 def parent_objective_id @parent_objective_id end |
#pinned_parameters ⇒ ::Hash[Symbol, String]? (readonly)
Returns the value of attribute pinned_parameters.
67 68 69 |
# File 'sig/cadenya/models/objective.rbs', line 67 def pinned_parameters @pinned_parameters end |
#secrets ⇒ Array<Cadenya::Models::ObjectiveSecret>?
Secrets that can be used in the headers for tool calls using the secret interpolation format.
52 |
# File 'lib/cadenya/models/objective.rb', line 52 optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveSecret] } |
#state ⇒ Cadenya::Models::Objective::state
Returns the value of attribute state.
47 48 49 |
# File 'sig/cadenya/models/objective.rbs', line 47 def state @state end |
#state_message ⇒ String? (readonly)
Returns the value of attribute state_message.
71 72 73 |
# File 'sig/cadenya/models/objective.rbs', line 71 def @state_message end |
#system_prompt ⇒ String
Returns the value of attribute system_prompt.
49 50 51 |
# File 'sig/cadenya/models/objective.rbs', line 49 def system_prompt @system_prompt end |
#system_prompt_data ⇒ ::Hash[Symbol, top]? (readonly)
Returns the value of attribute system_prompt_data.
75 76 77 |
# File 'sig/cadenya/models/objective.rbs', line 75 def system_prompt_data @system_prompt_data end |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/cadenya/models/objective.rb', line 179
|
Instance Method Details
#first_user_message_data= ⇒ ::Hash[Symbol, top] (readonly)
53 |
# File 'sig/cadenya/models/objective.rbs', line 53
def first_user_message_data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
#info= ⇒ Cadenya::ObjectiveInfo (readonly)
57 |
# File 'sig/cadenya/models/objective.rbs', line 57
def info=: (Cadenya::ObjectiveInfo) -> Cadenya::ObjectiveInfo
|
#output= ⇒ ::Hash[Symbol, top] (readonly)
61 |
# File 'sig/cadenya/models/objective.rbs', line 61
def output=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
#parent_objective_id= ⇒ String (readonly)
65 |
# File 'sig/cadenya/models/objective.rbs', line 65
def parent_objective_id=: (String) -> String
|
#pinned_parameters= ⇒ ::Hash[Symbol, String] (readonly)
69 |
# File 'sig/cadenya/models/objective.rbs', line 69
def pinned_parameters=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
#state_message= ⇒ String (readonly)
73 |
# File 'sig/cadenya/models/objective.rbs', line 73
def state_message=: (String) -> String
|
#system_prompt_data= ⇒ ::Hash[Symbol, top] (readonly)
77 |
# File 'sig/cadenya/models/objective.rbs', line 77
def system_prompt_data=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
|
#to_hash ⇒ {
97 |
# File 'sig/cadenya/models/objective.rbs', line 97
def to_hash: -> {
|