Class: Cadenya::Models::AgentSpec
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Cadenya::Models::AgentSpec
- Defined in:
- lib/cadenya/models/agent_spec.rb
Defined Under Namespace
Modules: Status, VariationSelectionMode
Instance Attribute Summary collapse
-
#description ⇒ String?
Description of the agent’s purpose.
-
#input_data_schema ⇒ Hash{Symbol=>Object}?
InputDataSchema is used for enforcing a data input when objectives are created.
-
#output_definition ⇒ Hash{Symbol=>Object}?
Optional output definition for objectives created for this agent.
-
#status ⇒ Symbol, Cadenya::Models::AgentSpec::Status
Status of the agent.
-
#variation_selection_mode ⇒ Symbol, Cadenya::Models::AgentSpec::VariationSelectionMode
Controls how variations are automatically selected when creating objectives Defaults to RANDOM when unspecified.
-
#webhook_events_url ⇒ String?
The URL that Cadenya will send events for any objective assigned to the agent.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status:, variation_selection_mode:, description: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see AgentSpec for more details.
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(status:, variation_selection_mode:, description: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil) ⇒ Object
Some parameter documentations has been truncated, see Cadenya::Models::AgentSpec for more details.
Agent specification (user-provided configuration)
|
|
# File 'lib/cadenya/models/agent_spec.rb', line 56
|
Instance Attribute Details
#description ⇒ String?
Description of the agent’s purpose
25 |
# File 'lib/cadenya/models/agent_spec.rb', line 25 optional :description, String |
#input_data_schema ⇒ Hash{Symbol=>Object}?
InputDataSchema is used for enforcing a data input when objectives are created. This is valuable when using liquid formatting in agent variation prompts. Input data schema is also valuable when using an agent as a sub-agent, as the schema is used as the tool’s input parameter schema. If omitted, the sub-agent schema will be loaded with a simple “prompt” free text string as its schema.
35 36 37 |
# File 'lib/cadenya/models/agent_spec.rb', line 35 optional :input_data_schema, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown], api_name: :inputDataSchema |
#output_definition ⇒ Hash{Symbol=>Object}?
Optional output definition for objectives created for this agent. When provided, Cadenya will append a tool to that will be called by the LLM in use by the variant to extract information in the format provided here. Use this option when you want structured data to be created by your objectives.
46 47 48 |
# File 'lib/cadenya/models/agent_spec.rb', line 46 optional :output_definition, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown], api_name: :outputDefinition |
#status ⇒ Symbol, Cadenya::Models::AgentSpec::Status
Status of the agent
10 |
# File 'lib/cadenya/models/agent_spec.rb', line 10 required :status, enum: -> { Cadenya::AgentSpec::Status } |
#variation_selection_mode ⇒ Symbol, Cadenya::Models::AgentSpec::VariationSelectionMode
Controls how variations are automatically selected when creating objectives Defaults to RANDOM when unspecified
17 18 19 |
# File 'lib/cadenya/models/agent_spec.rb', line 17 required :variation_selection_mode, enum: -> { Cadenya::AgentSpec::VariationSelectionMode }, api_name: :variationSelectionMode |
#webhook_events_url ⇒ String?
The URL that Cadenya will send events for any objective assigned to the agent.
54 |
# File 'lib/cadenya/models/agent_spec.rb', line 54 optional :webhook_events_url, String, api_name: :webhookEventsUrl |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/cadenya/models/agent_spec.rb', line 85
|