Class: Deeprails::Models::DefendSubmitEventParams::ModelInput::Context
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Deeprails::Models::DefendSubmitEventParams::ModelInput::Context
- Defined in:
- lib/deeprails/models/defend_submit_event_params.rb
Instance Attribute Summary collapse
-
#content ⇒ String?
The content of the message.
-
#role ⇒ String?
The role of the speaker.
Instance Method Summary collapse
-
#initialize(user_prompt:, context: nil, ground_truth: nil, system_prompt: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Deeprails::Models::DefendSubmitEventParams::ModelInput 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(user_prompt:, context: nil, ground_truth: nil, system_prompt: nil) ⇒ Object
Some parameter documentations has been truncated, see Deeprails::Models::DefendSubmitEventParams::ModelInput for more details.
A dictionary of inputs sent to the LLM to generate output. The dictionary must contain a user_prompt field. For the ground_truth_adherence guardrail metric, ground_truth should be provided.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 117 class Context < Deeprails::Internal::Type::BaseModel # @!attribute content # The content of the message. # # @return [String, nil] optional :content, String # @!attribute role # The role of the speaker. # # @return [String, nil] optional :role, String # @!method initialize(content: nil, role: nil) # @param content [String] The content of the message. # # @param role [String] The role of the speaker. end |
Instance Attribute Details
#content ⇒ String?
The content of the message.
122 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 122 optional :content, String |
#role ⇒ String?
The role of the speaker.
128 |
# File 'lib/deeprails/models/defend_submit_event_params.rb', line 128 optional :role, String |