Class: Deeprails::Models::DefendSubmitEventParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Deeprails::Models::DefendSubmitEventParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/deeprails/models/defend_submit_event_params.rb
Overview
Defined Under Namespace
Modules: RunMode Classes: ModelInput
Instance Attribute Summary collapse
-
#model_input ⇒ Deeprails::Models::DefendSubmitEventParams::ModelInput
A dictionary of inputs sent to the LLM to generate output.
-
#model_output ⇒ String
Output generated by the LLM to be evaluated.
-
#model_used ⇒ String
Model ID used to generate the output, like ‘gpt-4o` or `o3`.
-
#nametag ⇒ String?
An optional, user-defined tag for the event.
-
#run_mode ⇒ Symbol, Deeprails::Models::DefendSubmitEventParams::RunMode
Run mode for the workflow event.
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize(ground_truth: nil, system_prompt: nil, user_prompt: nil) ⇒ Object
constructor
A dictionary of inputs sent to the LLM to generate output.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(ground_truth: nil, system_prompt: nil, user_prompt: nil) ⇒ Object
A dictionary of inputs sent to the LLM to generate output. The dictionary must contain at least a ‘user_prompt` field or a `system_prompt` field. For the ground_truth_adherence guardrail metric, `ground_truth` should be provided.
|
|
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 80
|
Instance Attribute Details
#model_input ⇒ Deeprails::Models::DefendSubmitEventParams::ModelInput
A dictionary of inputs sent to the LLM to generate output. The dictionary must contain at least a ‘user_prompt` field or a `system_prompt` field. For the ground_truth_adherence guardrail metric, `ground_truth` should be provided.
16 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 16 required :model_input, -> { Deeprails::DefendSubmitEventParams::ModelInput } |
#model_output ⇒ String
Output generated by the LLM to be evaluated.
22 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 22 required :model_output, String |
#model_used ⇒ String
Model ID used to generate the output, like ‘gpt-4o` or `o3`.
28 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 28 required :model_used, String |
#nametag ⇒ String?
An optional, user-defined tag for the event.
43 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 43 optional :nametag, String |
#run_mode ⇒ Symbol, Deeprails::Models::DefendSubmitEventParams::RunMode
Run mode for the workflow event. The run mode allows the user to optimize for speed, accuracy, and cost by determining which models are used to evaluate the event. Available run modes include ‘precision_plus`, `precision`, `smart`, and `economy`. Defaults to `smart`.
37 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 37 required :run_mode, enum: -> { Deeprails::DefendSubmitEventParams::RunMode } |