Class: Deeprails::Models::MonitorSubmitEventParams::ModelInput

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/deeprails/models/monitor_submit_event_params.rb

Defined Under Namespace

Classes: Context

Instance Attribute Summary collapse

Instance Method Summary collapse

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(monitor_id:, model_input:, model_output:, nametag: nil, run_mode: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Deeprails::Models::MonitorSubmitEventParams for more details.

Parameters:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/deeprails/models/monitor_submit_event_params.rb', line 63

class ModelInput < Deeprails::Internal::Type::BaseModel
  # @!attribute user_prompt
  #   The user prompt used to generate the output.
  #
  #   @return [String]
  required :user_prompt, String

  # @!attribute context
  #   Any structured information that directly relates to the model’s input and
  #   expected output—e.g., the recent turn-by-turn history between an AI tutor and a
  #   student, facts or state passed through an agentic workflow, or other
  #   domain-specific signals your system already knows and wants the model to
  #   condition on.
  #
  #   @return [Array<Deeprails::Models::MonitorSubmitEventParams::ModelInput::Context>, nil]
  optional :context,
           -> { Deeprails::Internal::Type::ArrayOf[Deeprails::MonitorSubmitEventParams::ModelInput::Context] }

  # @!attribute ground_truth
  #   The ground truth for evaluating Ground Truth Adherence guardrail.
  #
  #   @return [String, nil]
  optional :ground_truth, String

  # @!attribute system_prompt
  #   The system prompt used to generate the output.
  #
  #   @return [String, nil]
  optional :system_prompt, String

  # @!method initialize(user_prompt:, context: nil, ground_truth: nil, system_prompt: nil)
  #   Some parameter documentations has been truncated, see
  #   {Deeprails::Models::MonitorSubmitEventParams::ModelInput} for more details.
  #
  #   A dictionary of inputs sent to the LLM to generate output. The dictionary must
  #   contain a `user_prompt` field. For ground_truth_adherence guardrail metric,
  #   `ground_truth` should be provided.
  #
  #   @param user_prompt [String] The user prompt used to generate the output.
  #
  #   @param context [Array<Deeprails::Models::MonitorSubmitEventParams::ModelInput::Context>] Any structured information that directly relates to the model’s input and expect
  #
  #   @param ground_truth [String] The ground truth for evaluating Ground Truth Adherence guardrail.
  #
  #   @param system_prompt [String] The system prompt used to generate the output.

  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
end

Instance Attribute Details

#contextArray<Deeprails::Models::MonitorSubmitEventParams::ModelInput::Context>?

Any structured information that directly relates to the model’s input and expected output—e.g., the recent turn-by-turn history between an AI tutor and a student, facts or state passed through an agentic workflow, or other domain-specific signals your system already knows and wants the model to condition on.



78
79
# File 'lib/deeprails/models/monitor_submit_event_params.rb', line 78

optional :context,
-> { Deeprails::Internal::Type::ArrayOf[Deeprails::MonitorSubmitEventParams::ModelInput::Context] }

#ground_truthString?

The ground truth for evaluating Ground Truth Adherence guardrail.

Returns:

  • (String, nil)


85
# File 'lib/deeprails/models/monitor_submit_event_params.rb', line 85

optional :ground_truth, String

#system_promptString?

The system prompt used to generate the output.

Returns:

  • (String, nil)


91
# File 'lib/deeprails/models/monitor_submit_event_params.rb', line 91

optional :system_prompt, String

#user_promptString

The user prompt used to generate the output.

Returns:

  • (String)


68
# File 'lib/deeprails/models/monitor_submit_event_params.rb', line 68

required :user_prompt, String