Class: Cadenya::Models::Agents::AgentScheduleSpec

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

Defined Under Namespace

Modules: OverlapPolicy

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(schedule:, first_user_message: nil, first_user_message_data: nil, overlap_policy: nil, system_prompt_data: nil, variation_id: nil) ⇒ Object

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

AgentScheduleSpec is the user-provided configuration for a schedule.

Parameters:

  • schedule (Cadenya::Models::Agents::AgentScheduleSpecSchedule)

    Schedule defines WHEN the schedule fires. Temporal-style structured form:

  • first_user_message (String) (defaults to: nil)

    Optional explicit first user message passed to CreateObjective on each fire.

  • first_user_message_data (Object) (defaults to: nil)

    Optional data rendered into the variation's first_user_message_template when

  • overlap_policy (Symbol, Cadenya::Models::Agents::AgentScheduleSpec::OverlapPolicy) (defaults to: nil)

    What to do when the previous run is still in flight. Defaults to SKIP.

  • system_prompt_data (Object) (defaults to: nil)

    Optional data rendered into the variation's system_prompt_template when each

  • variation_id (String) (defaults to: nil)

    Optional explicit variation. When unset, the agent's variation_selection_mode



# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 54

Instance Attribute Details

#first_user_messageString?

Optional explicit first user message passed to CreateObjective on each fire. Becomes the first user message in the objective's chat history. When unset, the fired objective defers to the selected variation's first_user_message_template.

Parameters:

  • (String)

Returns:

  • (String, nil)


21
# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 21

optional :first_user_message, String, api_name: :firstUserMessage

#first_user_message_dataObject?

Optional data rendered into the variation's first_user_message_template when each fired objective is created. Separate from system_prompt_data, which renders the system prompt template.

Parameters:

  • (top)

Returns:

  • (Object, nil)


29
# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 29

optional :first_user_message_data, Cadenya::Internal::Type::Unknown, api_name: :firstUserMessageData

#overlap_policySymbol, ...

What to do when the previous run is still in flight. Defaults to SKIP.



35
36
37
# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 35

optional :overlap_policy,
enum: -> { Cadenya::Agents::AgentScheduleSpec::OverlapPolicy },
api_name: :overlapPolicy

#scheduleCadenya::Models::Agents::AgentScheduleSpecSchedule

Schedule defines WHEN the schedule fires. Temporal-style structured form: a list of calendar rules (wall-clock) and/or interval rules (duration), OR'd together. At least one rule is required.

Parameters:

  • value (Cadenya::Agents::AgentScheduleSpecSchedule)

Returns:



13
# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 13

required :schedule, -> { Cadenya::Agents::AgentScheduleSpecSchedule }

#system_prompt_dataObject?

Optional data rendered into the variation's system_prompt_template when each fired objective is created. If the agent has a system_prompt_data_schema, this must satisfy it.

Parameters:

  • (top)

Returns:

  • (Object, nil)


45
# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 45

optional :system_prompt_data, Cadenya::Internal::Type::Unknown, api_name: :systemPromptData

#variation_idString?

Optional explicit variation. When unset, the agent's variation_selection_mode chooses per fire.

Parameters:

  • (String)

Returns:

  • (String, nil)


52
# File 'lib/cadenya/models/agents/agent_schedule_spec.rb', line 52

optional :variation_id, String, api_name: :variationId

Instance Method Details

#to_hash{

Returns:

  • ({)


50
# File 'sig/cadenya/models/agents/agent_schedule_spec.rbs', line 50

def to_hash: -> {