Class: Cadenya::Types::Objective
- Inherits:
-
Object
- Object
- Cadenya::Types::Objective
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#config_snapshot ⇒ Object
readonly
Returns the value of attribute config_snapshot.
-
#episodic_memory ⇒ Object
readonly
Returns the value of attribute episodic_memory.
-
#first_user_message ⇒ Object
readonly
Returns the value of attribute first_user_message.
-
#first_user_message_data ⇒ Object
readonly
Returns the value of attribute first_user_message_data.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#memory_cascade ⇒ Object
readonly
Returns the value of attribute memory_cascade.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#parent_objective_id ⇒ Object
readonly
Returns the value of attribute parent_objective_id.
-
#pinned_parameters ⇒ Object
readonly
Returns the value of attribute pinned_parameters.
-
#secrets ⇒ Object
readonly
Returns the value of attribute secrets.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#state_message ⇒ Object
readonly
Returns the value of attribute state_message.
-
#system_prompt ⇒ Object
readonly
Returns the value of attribute system_prompt.
-
#system_prompt_data ⇒ Object
readonly
Returns the value of attribute system_prompt_data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, config_snapshot: nil, state: nil, state_message: nil, info: nil, system_prompt: nil, first_user_message: nil, parent_objective_id: nil, secrets: nil, system_prompt_data: nil, memory_cascade: nil, output: nil, first_user_message_data: nil, episodic_memory: nil, pinned_parameters: nil) ⇒ Objective
constructor
A new instance of Objective.
- #to_h ⇒ Object
Constructor Details
#initialize(metadata: nil, config_snapshot: nil, state: nil, state_message: nil, info: nil, system_prompt: nil, first_user_message: nil, parent_objective_id: nil, secrets: nil, system_prompt_data: nil, memory_cascade: nil, output: nil, first_user_message_data: nil, episodic_memory: nil, pinned_parameters: nil) ⇒ Objective
Returns a new instance of Objective.
3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 |
# File 'lib/cadenya/types.rb', line 3484 def initialize(metadata: nil, config_snapshot: nil, state: nil, state_message: nil, info: nil, system_prompt: nil, first_user_message: nil, parent_objective_id: nil, secrets: nil, system_prompt_data: nil, memory_cascade: nil, output: nil, first_user_message_data: nil, episodic_memory: nil, pinned_parameters: nil) @metadata = @config_snapshot = config_snapshot @state = state @state_message = @info = info @system_prompt = system_prompt @first_user_message = @parent_objective_id = parent_objective_id @secrets = secrets @system_prompt_data = system_prompt_data @memory_cascade = memory_cascade @output = output @first_user_message_data = @episodic_memory = episodic_memory @pinned_parameters = pinned_parameters end |
Instance Attribute Details
#config_snapshot ⇒ Object (readonly)
Returns the value of attribute config_snapshot.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def config_snapshot @config_snapshot end |
#episodic_memory ⇒ Object (readonly)
Returns the value of attribute episodic_memory.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def episodic_memory @episodic_memory end |
#first_user_message ⇒ Object (readonly)
Returns the value of attribute first_user_message.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def @first_user_message end |
#first_user_message_data ⇒ Object (readonly)
Returns the value of attribute first_user_message_data.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def @first_user_message_data end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def info @info end |
#memory_cascade ⇒ Object (readonly)
Returns the value of attribute memory_cascade.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def memory_cascade @memory_cascade end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def @metadata end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def output @output end |
#parent_objective_id ⇒ Object (readonly)
Returns the value of attribute parent_objective_id.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def parent_objective_id @parent_objective_id end |
#pinned_parameters ⇒ Object (readonly)
Returns the value of attribute pinned_parameters.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def pinned_parameters @pinned_parameters end |
#secrets ⇒ Object (readonly)
Returns the value of attribute secrets.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def secrets @secrets end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def state @state end |
#state_message ⇒ Object (readonly)
Returns the value of attribute state_message.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def @state_message end |
#system_prompt ⇒ Object (readonly)
Returns the value of attribute system_prompt.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def system_prompt @system_prompt end |
#system_prompt_data ⇒ Object (readonly)
Returns the value of attribute system_prompt_data.
3482 3483 3484 |
# File 'lib/cadenya/types.rb', line 3482 def system_prompt_data @system_prompt_data end |
Class Method Details
.from_json(data) ⇒ Object
3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 |
# File 'lib/cadenya/types.rb', line 3502 def self.from_json(data) new( metadata: data["metadata"].nil? ? nil : Types::OperationMetadata.from_json(data["metadata"]), config_snapshot: data["configSnapshot"].nil? ? nil : Types::ObjectiveConfigSnapshot.from_json(data["configSnapshot"]), state: data["state"], state_message: data["stateMessage"], info: data["info"].nil? ? nil : Types::ObjectiveInfo.from_json(data["info"]), system_prompt: data["systemPrompt"], first_user_message: data["firstUserMessage"], parent_objective_id: data["parentObjectiveId"], secrets: data["secrets"].nil? ? nil : (data["secrets"]).map { |item| Types::Objective_Secret.from_json(item) }, system_prompt_data: data["systemPromptData"], memory_cascade: data["memoryCascade"].nil? ? nil : (data["memoryCascade"]).map { |item| Types::MemoryReference.from_json(item) }, output: data["output"], first_user_message_data: data["firstUserMessageData"], episodic_memory: data["episodicMemory"].nil? ? nil : Types::ObjectiveEpisodicConfig.from_json(data["episodicMemory"]), pinned_parameters: data["pinnedParameters"], ) end |
Instance Method Details
#to_h ⇒ Object
3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 |
# File 'lib/cadenya/types.rb', line 3522 def to_h { metadata: Util.plain(@metadata), config_snapshot: Util.plain(@config_snapshot), state: Util.plain(@state), state_message: Util.plain(@state_message), info: Util.plain(@info), system_prompt: Util.plain(@system_prompt), first_user_message: Util.plain(@first_user_message), parent_objective_id: Util.plain(@parent_objective_id), secrets: Util.plain(@secrets), system_prompt_data: Util.plain(@system_prompt_data), memory_cascade: Util.plain(@memory_cascade), output: Util.plain(@output), first_user_message_data: Util.plain(@first_user_message_data), episodic_memory: Util.plain(@episodic_memory), pinned_parameters: Util.plain(@pinned_parameters), }.reject { |_k, v| v.nil? } end |