Class: Cadenya::Models::Agents::AgentVariationSpec

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

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

#initializeObject



59
# File 'sig/cadenya/models/agents/agent_variation_spec.rbs', line 59

def initialize: (

Instance Attribute Details

#compaction_configCadenya::Models::Agents::AgentVariationSpecCompactionConfig?

CompactionConfig defines how context window compaction behaves for objectives using this variation.



12
13
14
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 12

optional :compaction_config,
-> { Cadenya::Agents::AgentVariationSpecCompactionConfig },
api_name: :compactionConfig

#constraintsCadenya::Models::Agents::AgentVariationSpecConstraints?

Execution constraints



20
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 20

optional :constraints, -> { Cadenya::Agents::AgentVariationSpecConstraints }

#descriptionString?

Human-readable description of what this variation does or when it should be used

Parameters:

  • (String)

Returns:

  • (String, nil)


26
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 26

optional :description, String

#first_user_message_templateString?

Liquid template for the first user message of objectives using this variation. Rendered with CreateObjectiveRequest.first_user_message_data into Objective.first_user_message, the first user message in the LLM chat history. CreateObjectiveRequest.first_user_message, when set, overrides the rendered result. If neither this template nor first_user_message is present, objective creation is rejected with InvalidArgument.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 37

optional :first_user_message_template, String, api_name: :firstUserMessageTemplate

#model_configCadenya::Models::Agents::AgentVariationSpecModelConfig?

ModelConfig defines the model configuration for a variation



43
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 43

optional :model_config, -> { Cadenya::Agents::AgentVariationSpecModelConfig }, api_name: :modelConfig

#progressive_discoveryCadenya::Models::Agents::AgentVariationSpecProgressiveDiscovery?

ProgressiveDiscovery is used to indicate that the agent should automatically discover tools that are not explicitly assigned to it. Max tools is the maximum number of tools that can be discovered per search. Hints are optional hints for tool search. These are used in conjunction with the context-aware tool search and can help select the best tools for the task.



53
54
55
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 53

optional :progressive_discovery,
-> { Cadenya::Agents::AgentVariationSpecProgressiveDiscovery },
api_name: :progressiveDiscovery

#system_prompt_templateString?

Liquid template for the system prompt of objectives using this variation. Rendered with CreateObjectiveRequest.system_prompt_data into Objective.system_prompt.

Parameters:

  • (String)

Returns:

  • (String, nil)


63
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 63

optional :system_prompt_template, String, api_name: :systemPromptTemplate

#weightInteger?

Weight for weighted random selection (>= 0). P(v) = v.weight / sum(all_weights). Only used when the agent's variation_selection_mode is WEIGHTED. A weight of 0 means never auto-selected, but can still be chosen explicitly via variation_id on CreateObjectiveRequest.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


72
# File 'lib/cadenya/models/agents/agent_variation_spec.rb', line 72

optional :weight, Integer

Instance Method Details

#to_hash{

Returns:

  • ({)


70
# File 'sig/cadenya/models/agents/agent_variation_spec.rbs', line 70

def to_hash: -> {