Class: Cadenya::Types::AgentVariationSpec
- Inherits:
-
Object
- Object
- Cadenya::Types::AgentVariationSpec
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#compaction_config ⇒ Object
readonly
Returns the value of attribute compaction_config.
-
#constraints ⇒ Object
readonly
Returns the value of attribute constraints.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#first_user_message_template ⇒ Object
readonly
Returns the value of attribute first_user_message_template.
-
#model_config ⇒ Object
readonly
Returns the value of attribute model_config.
-
#progressive_discovery ⇒ Object
readonly
Returns the value of attribute progressive_discovery.
-
#system_prompt_template ⇒ Object
readonly
Returns the value of attribute system_prompt_template.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(system_prompt_template: nil, progressive_discovery: nil, constraints: nil, description: nil, model_config: nil, compaction_config: nil, first_user_message_template: nil) ⇒ AgentVariationSpec
constructor
A new instance of AgentVariationSpec.
- #to_h ⇒ Object
Constructor Details
#initialize(system_prompt_template: nil, progressive_discovery: nil, constraints: nil, description: nil, model_config: nil, compaction_config: nil, first_user_message_template: nil) ⇒ AgentVariationSpec
Returns a new instance of AgentVariationSpec.
685 686 687 688 689 690 691 692 693 |
# File 'lib/cadenya/types.rb', line 685 def initialize(system_prompt_template: nil, progressive_discovery: nil, constraints: nil, description: nil, model_config: nil, compaction_config: nil, first_user_message_template: nil) @system_prompt_template = system_prompt_template @progressive_discovery = progressive_discovery @constraints = constraints @description = description @model_config = model_config @compaction_config = compaction_config @first_user_message_template = end |
Instance Attribute Details
#compaction_config ⇒ Object (readonly)
Returns the value of attribute compaction_config.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def compaction_config @compaction_config end |
#constraints ⇒ Object (readonly)
Returns the value of attribute constraints.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def constraints @constraints end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def description @description end |
#first_user_message_template ⇒ Object (readonly)
Returns the value of attribute first_user_message_template.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def @first_user_message_template end |
#model_config ⇒ Object (readonly)
Returns the value of attribute model_config.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def model_config @model_config end |
#progressive_discovery ⇒ Object (readonly)
Returns the value of attribute progressive_discovery.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def progressive_discovery @progressive_discovery end |
#system_prompt_template ⇒ Object (readonly)
Returns the value of attribute system_prompt_template.
683 684 685 |
# File 'lib/cadenya/types.rb', line 683 def system_prompt_template @system_prompt_template end |
Class Method Details
.from_json(data) ⇒ Object
695 696 697 698 699 700 701 702 703 704 705 |
# File 'lib/cadenya/types.rb', line 695 def self.from_json(data) new( system_prompt_template: data["systemPromptTemplate"], progressive_discovery: data["progressiveDiscovery"].nil? ? nil : Types::AgentVariationSpec_ProgressiveDiscovery.from_json(data["progressiveDiscovery"]), constraints: data["constraints"].nil? ? nil : Types::AgentVariationSpec_Constraints.from_json(data["constraints"]), description: data["description"], model_config: data["modelConfig"].nil? ? nil : Types::AgentVariationSpec_ModelConfig.from_json(data["modelConfig"]), compaction_config: data["compactionConfig"].nil? ? nil : Types::AgentVariationSpec_CompactionConfig.from_json(data["compactionConfig"]), first_user_message_template: data["firstUserMessageTemplate"], ) end |
Instance Method Details
#to_h ⇒ Object
707 708 709 710 711 712 713 714 715 716 717 |
# File 'lib/cadenya/types.rb', line 707 def to_h { system_prompt_template: Util.plain(@system_prompt_template), progressive_discovery: Util.plain(@progressive_discovery), constraints: Util.plain(@constraints), description: Util.plain(@description), model_config: Util.plain(@model_config), compaction_config: Util.plain(@compaction_config), first_user_message_template: Util.plain(@first_user_message_template), }.reject { |_k, v| v.nil? } end |