Class: Courier::Models::JourneyAINode
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::JourneyAINode
- Defined in:
- lib/courier/models/journey_ai_node.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#conditions ⇒ Array<String>, ...
Condition spec for a journey node.
- #id ⇒ String?
- #model ⇒ String?
-
#output_schema ⇒ Hash{Symbol=>Object}
A JSONSchema object (Draft-07-compatible).
- #type ⇒ Symbol, Courier::Models::JourneyAINode::Type
- #user_prompt ⇒ String?
- #web_search ⇒ Boolean?
Instance Method Summary collapse
-
#initialize(output_schema:, type:, id: nil, conditions: nil, model: nil, user_prompt: nil, web_search: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see JourneyAINode 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(output_schema:, type:, id: nil, conditions: nil, model: nil, user_prompt: nil, web_search: nil) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::JourneyAINode for more details.
Invoke an AI step with ‘user_prompt` and optional `web_search`. Returns a structured response conforming to `output_schema`.
|
|
# File 'lib/courier/models/journey_ai_node.rb', line 45
|
Instance Attribute Details
#conditions ⇒ Array<String>, ...
Condition spec for a journey node. Accepts a single condition atom, an AND/OR group, or an AND/OR nested group. Omit the ‘conditions` property entirely to express “no conditions”.
28 |
# File 'lib/courier/models/journey_ai_node.rb', line 28 optional :conditions, union: -> { Courier::JourneyConditionsField } |
#id ⇒ String?
20 |
# File 'lib/courier/models/journey_ai_node.rb', line 20 optional :id, String |
#model ⇒ String?
33 |
# File 'lib/courier/models/journey_ai_node.rb', line 33 optional :model, String |
#output_schema ⇒ Hash{Symbol=>Object}
A JSONSchema object (Draft-07-compatible). Validated at runtime by Ajv.
10 |
# File 'lib/courier/models/journey_ai_node.rb', line 10 required :output_schema, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown] |
#type ⇒ Symbol, Courier::Models::JourneyAINode::Type
15 |
# File 'lib/courier/models/journey_ai_node.rb', line 15 required :type, enum: -> { Courier::JourneyAINode::Type } |
#user_prompt ⇒ String?
38 |
# File 'lib/courier/models/journey_ai_node.rb', line 38 optional :user_prompt, String |