Class: Cadenya::Types::AgentScheduleSpec
- Inherits:
-
Object
- Object
- Cadenya::Types::AgentScheduleSpec
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#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.
-
#overlap_policy ⇒ Object
readonly
Returns the value of attribute overlap_policy.
-
#schedule ⇒ Object
readonly
Returns the value of attribute schedule.
-
#system_prompt_data ⇒ Object
readonly
Returns the value of attribute system_prompt_data.
-
#variation_id ⇒ Object
readonly
Returns the value of attribute variation_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(schedule: nil, overlap_policy: nil, first_user_message: nil, variation_id: nil, system_prompt_data: nil, first_user_message_data: nil) ⇒ AgentScheduleSpec
constructor
A new instance of AgentScheduleSpec.
- #to_h ⇒ Object
Constructor Details
#initialize(schedule: nil, overlap_policy: nil, first_user_message: nil, variation_id: nil, system_prompt_data: nil, first_user_message_data: nil) ⇒ AgentScheduleSpec
Returns a new instance of AgentScheduleSpec.
511 512 513 514 515 516 517 518 |
# File 'lib/cadenya/types.rb', line 511 def initialize(schedule: nil, overlap_policy: nil, first_user_message: nil, variation_id: nil, system_prompt_data: nil, first_user_message_data: nil) @schedule = schedule @overlap_policy = overlap_policy @first_user_message = @variation_id = variation_id @system_prompt_data = system_prompt_data @first_user_message_data = end |
Instance Attribute Details
#first_user_message ⇒ Object (readonly)
Returns the value of attribute first_user_message.
509 510 511 |
# File 'lib/cadenya/types.rb', line 509 def @first_user_message end |
#first_user_message_data ⇒ Object (readonly)
Returns the value of attribute first_user_message_data.
509 510 511 |
# File 'lib/cadenya/types.rb', line 509 def @first_user_message_data end |
#overlap_policy ⇒ Object (readonly)
Returns the value of attribute overlap_policy.
509 510 511 |
# File 'lib/cadenya/types.rb', line 509 def overlap_policy @overlap_policy end |
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
509 510 511 |
# File 'lib/cadenya/types.rb', line 509 def schedule @schedule end |
#system_prompt_data ⇒ Object (readonly)
Returns the value of attribute system_prompt_data.
509 510 511 |
# File 'lib/cadenya/types.rb', line 509 def system_prompt_data @system_prompt_data end |
#variation_id ⇒ Object (readonly)
Returns the value of attribute variation_id.
509 510 511 |
# File 'lib/cadenya/types.rb', line 509 def variation_id @variation_id end |
Class Method Details
.from_json(data) ⇒ Object
520 521 522 523 524 525 526 527 528 529 |
# File 'lib/cadenya/types.rb', line 520 def self.from_json(data) new( schedule: data["schedule"].nil? ? nil : Types::AgentScheduleSpec_Schedule.from_json(data["schedule"]), overlap_policy: data["overlapPolicy"], first_user_message: data["firstUserMessage"], variation_id: data["variationId"], system_prompt_data: data["systemPromptData"], first_user_message_data: data["firstUserMessageData"], ) end |
Instance Method Details
#to_h ⇒ Object
531 532 533 534 535 536 537 538 539 540 |
# File 'lib/cadenya/types.rb', line 531 def to_h { schedule: Util.plain(@schedule), overlap_policy: Util.plain(@overlap_policy), first_user_message: Util.plain(@first_user_message), variation_id: Util.plain(@variation_id), system_prompt_data: Util.plain(@system_prompt_data), first_user_message_data: Util.plain(@first_user_message_data), }.reject { |_k, v| v.nil? } end |