deeprails 0.17.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +71 -0
  3. data/README.md +3 -3
  4. data/lib/deeprails/internal/stream.rb +29 -0
  5. data/lib/deeprails/internal/transport/base_client.rb +3 -1
  6. data/lib/deeprails/internal/transport/pooled_net_requester.rb +12 -10
  7. data/lib/deeprails/internal/type/base_stream.rb +83 -0
  8. data/lib/deeprails/internal/util.rb +7 -2
  9. data/lib/deeprails/models/defend_create_workflow_params.rb +14 -1
  10. data/lib/deeprails/models/defend_response.rb +136 -12
  11. data/lib/deeprails/models/defend_submit_and_stream_event_params.rb +83 -0
  12. data/lib/deeprails/models/defend_submit_and_stream_event_response.rb +7 -0
  13. data/lib/deeprails/models/defend_submit_event_params.rb +52 -16
  14. data/lib/deeprails/models/defend_update_response.rb +9 -1
  15. data/lib/deeprails/models/defend_update_workflow_params.rb +131 -5
  16. data/lib/deeprails/models/file_upload_params.rb +5 -5
  17. data/lib/deeprails/models/monitor_create_params.rb +14 -1
  18. data/lib/deeprails/models/monitor_detail_response.rb +56 -17
  19. data/lib/deeprails/models/monitor_event_detail_response.rb +6 -2
  20. data/lib/deeprails/models/monitor_submit_event_params.rb +52 -16
  21. data/lib/deeprails/models/monitor_update_params.rb +46 -5
  22. data/lib/deeprails/models/workflow_event_detail_response.rb +106 -34
  23. data/lib/deeprails/models/workflow_event_response.rb +9 -1
  24. data/lib/deeprails/models.rb +2 -0
  25. data/lib/deeprails/resources/defend.rb +70 -7
  26. data/lib/deeprails/resources/files.rb +2 -2
  27. data/lib/deeprails/resources/monitor.rb +14 -6
  28. data/lib/deeprails/version.rb +1 -1
  29. data/lib/deeprails.rb +5 -0
  30. data/manifest.yaml +1 -0
  31. data/rbi/deeprails/internal/stream.rbi +20 -0
  32. data/rbi/deeprails/internal/transport/base_client.rbi +18 -2
  33. data/rbi/deeprails/internal/type/base_stream.rbi +75 -0
  34. data/rbi/deeprails/models/defend_create_workflow_params.rbi +21 -0
  35. data/rbi/deeprails/models/defend_response.rbi +288 -16
  36. data/rbi/deeprails/models/defend_submit_and_stream_event_params.rbi +148 -0
  37. data/rbi/deeprails/models/defend_submit_and_stream_event_response.rbi +7 -0
  38. data/rbi/deeprails/models/defend_submit_event_params.rbi +108 -25
  39. data/rbi/deeprails/models/defend_update_response.rbi +14 -3
  40. data/rbi/deeprails/models/defend_update_workflow_params.rbi +298 -4
  41. data/rbi/deeprails/models/file_upload_params.rbi +9 -6
  42. data/rbi/deeprails/models/monitor_create_params.rbi +21 -0
  43. data/rbi/deeprails/models/monitor_detail_response.rbi +107 -26
  44. data/rbi/deeprails/models/monitor_event_detail_response.rbi +4 -2
  45. data/rbi/deeprails/models/monitor_submit_event_params.rbi +108 -25
  46. data/rbi/deeprails/models/monitor_update_params.rbi +107 -4
  47. data/rbi/deeprails/models/workflow_event_detail_response.rbi +209 -66
  48. data/rbi/deeprails/models/workflow_event_response.rbi +8 -0
  49. data/rbi/deeprails/models.rbi +3 -0
  50. data/rbi/deeprails/resources/defend.rbi +99 -9
  51. data/rbi/deeprails/resources/files.rbi +3 -3
  52. data/rbi/deeprails/resources/monitor.rbi +28 -8
  53. data/sig/deeprails/internal/stream.rbs +9 -0
  54. data/sig/deeprails/internal/type/base_stream.rbs +38 -0
  55. data/sig/deeprails/models/defend_create_workflow_params.rbs +7 -0
  56. data/sig/deeprails/models/defend_response.rbs +114 -8
  57. data/sig/deeprails/models/defend_submit_and_stream_event_params.rbs +74 -0
  58. data/sig/deeprails/models/defend_submit_and_stream_event_response.rbs +5 -0
  59. data/sig/deeprails/models/defend_submit_event_params.rbs +39 -10
  60. data/sig/deeprails/models/defend_update_response.rbs +10 -3
  61. data/sig/deeprails/models/defend_update_workflow_params.rbs +103 -1
  62. data/sig/deeprails/models/file_upload_params.rbs +4 -4
  63. data/sig/deeprails/models/monitor_create_params.rbs +7 -0
  64. data/sig/deeprails/models/monitor_detail_response.rbs +36 -9
  65. data/sig/deeprails/models/monitor_submit_event_params.rbs +39 -10
  66. data/sig/deeprails/models/monitor_update_params.rbs +45 -1
  67. data/sig/deeprails/models/workflow_event_detail_response.rbs +100 -27
  68. data/sig/deeprails/models/workflow_event_response.rbs +5 -0
  69. data/sig/deeprails/models.rbs +2 -0
  70. data/sig/deeprails/resources/defend.rbs +20 -0
  71. data/sig/deeprails/resources/files.rbs +1 -1
  72. data/sig/deeprails/resources/monitor.rbs +4 -0
  73. metadata +28 -2
@@ -45,9 +45,22 @@ module Deeprails
45
45
  }
46
46
 
47
47
  type model_input =
48
- { ground_truth: String, system_prompt: String, user_prompt: String }
48
+ {
49
+ user_prompt: String,
50
+ context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context],
51
+ ground_truth: String,
52
+ system_prompt: String
53
+ }
49
54
 
50
55
  class ModelInput < Deeprails::Internal::Type::BaseModel
56
+ attr_accessor user_prompt: String
57
+
58
+ attr_reader context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context]?
59
+
60
+ def context=: (
61
+ ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context]
62
+ ) -> ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context]
63
+
51
64
  attr_reader ground_truth: String?
52
65
 
53
66
  def ground_truth=: (String) -> String
@@ -56,28 +69,44 @@ module Deeprails
56
69
 
57
70
  def system_prompt=: (String) -> String
58
71
 
59
- attr_reader user_prompt: String?
60
-
61
- def user_prompt=: (String) -> String
62
-
63
72
  def initialize: (
73
+ user_prompt: String,
74
+ ?context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context],
64
75
  ?ground_truth: String,
65
- ?system_prompt: String,
66
- ?user_prompt: String
76
+ ?system_prompt: String
67
77
  ) -> void
68
78
 
69
79
  def to_hash: -> {
80
+ user_prompt: String,
81
+ context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context],
70
82
  ground_truth: String,
71
- system_prompt: String,
72
- user_prompt: String
83
+ system_prompt: String
73
84
  }
85
+
86
+ type context = { content: String, role: String }
87
+
88
+ class Context < Deeprails::Internal::Type::BaseModel
89
+ attr_reader content: String?
90
+
91
+ def content=: (String) -> String
92
+
93
+ attr_reader role: String?
94
+
95
+ def role=: (String) -> String
96
+
97
+ def initialize: (?content: String, ?role: String) -> void
98
+
99
+ def to_hash: -> { content: String, role: String }
100
+ end
74
101
  end
75
102
 
76
- type run_mode = :precision_plus | :precision | :smart | :economy
103
+ type run_mode =
104
+ :precision_plus_codex | :precision_plus | :precision | :smart | :economy
77
105
 
78
106
  module RunMode
79
107
  extend Deeprails::Internal::Type::Enum
80
108
 
109
+ PRECISION_PLUS_CODEX: :precision_plus_codex
81
110
  PRECISION_PLUS: :precision_plus
82
111
  PRECISION: :precision
83
112
  SMART: :smart
@@ -4,7 +4,8 @@ module Deeprails
4
4
  {
5
5
  modified_at: Time,
6
6
  status: Deeprails::Models::DefendUpdateResponse::status,
7
- workflow_id: String
7
+ workflow_id: String,
8
+ name: String
8
9
  }
9
10
 
10
11
  class DefendUpdateResponse < Deeprails::Internal::Type::BaseModel
@@ -14,16 +15,22 @@ module Deeprails
14
15
 
15
16
  attr_accessor workflow_id: String
16
17
 
18
+ attr_reader name: String?
19
+
20
+ def name=: (String) -> String
21
+
17
22
  def initialize: (
18
23
  modified_at: Time,
19
24
  status: Deeprails::Models::DefendUpdateResponse::status,
20
- workflow_id: String
25
+ workflow_id: String,
26
+ ?name: String
21
27
  ) -> void
22
28
 
23
29
  def to_hash: -> {
24
30
  modified_at: Time,
25
31
  status: Deeprails::Models::DefendUpdateResponse::status,
26
- workflow_id: String
32
+ workflow_id: String,
33
+ name: String
27
34
  }
28
35
 
29
36
  type status = :inactive | :active
@@ -1,32 +1,134 @@
1
1
  module Deeprails
2
2
  module Models
3
3
  type defend_update_workflow_params =
4
- { description: String, name: String }
4
+ {
5
+ automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
6
+ context_awareness: bool,
7
+ custom_hallucination_threshold_values: ::Hash[Symbol, Float],
8
+ description: String,
9
+ file_search: ::Array[String],
10
+ improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action,
11
+ max_improvement_attempts: Integer,
12
+ name: String,
13
+ threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type,
14
+ web_search: bool
15
+ }
5
16
  & Deeprails::Internal::Type::request_parameters
6
17
 
7
18
  class DefendUpdateWorkflowParams < Deeprails::Internal::Type::BaseModel
8
19
  extend Deeprails::Internal::Type::RequestParameters::Converter
9
20
  include Deeprails::Internal::Type::RequestParameters
10
21
 
22
+ attr_reader automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]?
23
+
24
+ def automatic_hallucination_tolerance_levels=: (
25
+ ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]
26
+ ) -> ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]
27
+
28
+ attr_reader context_awareness: bool?
29
+
30
+ def context_awareness=: (bool) -> bool
31
+
32
+ attr_reader custom_hallucination_threshold_values: ::Hash[Symbol, Float]?
33
+
34
+ def custom_hallucination_threshold_values=: (
35
+ ::Hash[Symbol, Float]
36
+ ) -> ::Hash[Symbol, Float]
37
+
11
38
  attr_reader description: String?
12
39
 
13
40
  def description=: (String) -> String
14
41
 
42
+ attr_reader file_search: ::Array[String]?
43
+
44
+ def file_search=: (::Array[String]) -> ::Array[String]
45
+
46
+ attr_reader improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action?
47
+
48
+ def improvement_action=: (
49
+ Deeprails::Models::DefendUpdateWorkflowParams::improvement_action
50
+ ) -> Deeprails::Models::DefendUpdateWorkflowParams::improvement_action
51
+
52
+ attr_reader max_improvement_attempts: Integer?
53
+
54
+ def max_improvement_attempts=: (Integer) -> Integer
55
+
15
56
  attr_reader name: String?
16
57
 
17
58
  def name=: (String) -> String
18
59
 
60
+ attr_reader threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type?
61
+
62
+ def threshold_type=: (
63
+ Deeprails::Models::DefendUpdateWorkflowParams::threshold_type
64
+ ) -> Deeprails::Models::DefendUpdateWorkflowParams::threshold_type
65
+
66
+ attr_reader web_search: bool?
67
+
68
+ def web_search=: (bool) -> bool
69
+
19
70
  def initialize: (
71
+ ?automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
72
+ ?context_awareness: bool,
73
+ ?custom_hallucination_threshold_values: ::Hash[Symbol, Float],
20
74
  ?description: String,
75
+ ?file_search: ::Array[String],
76
+ ?improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action,
77
+ ?max_improvement_attempts: Integer,
21
78
  ?name: String,
79
+ ?threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type,
80
+ ?web_search: bool,
22
81
  ?request_options: Deeprails::request_opts
23
82
  ) -> void
24
83
 
25
84
  def to_hash: -> {
85
+ automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
86
+ context_awareness: bool,
87
+ custom_hallucination_threshold_values: ::Hash[Symbol, Float],
26
88
  description: String,
89
+ file_search: ::Array[String],
90
+ improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action,
91
+ max_improvement_attempts: Integer,
27
92
  name: String,
93
+ threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type,
94
+ web_search: bool,
28
95
  request_options: Deeprails::RequestOptions
29
96
  }
97
+
98
+ type automatic_hallucination_tolerance_level = :low | :medium | :high
99
+
100
+ module AutomaticHallucinationToleranceLevel
101
+ extend Deeprails::Internal::Type::Enum
102
+
103
+ LOW: :low
104
+ MEDIUM: :medium
105
+ HIGH: :high
106
+
107
+ def self?.values: -> ::Array[Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]
108
+ end
109
+
110
+ type improvement_action = :regen | :fixit | :do_nothing
111
+
112
+ module ImprovementAction
113
+ extend Deeprails::Internal::Type::Enum
114
+
115
+ REGEN: :regen
116
+ FIXIT: :fixit
117
+ DO_NOTHING: :do_nothing
118
+
119
+ def self?.values: -> ::Array[Deeprails::Models::DefendUpdateWorkflowParams::improvement_action]
120
+ end
121
+
122
+ type threshold_type = :automatic | :custom
123
+
124
+ module ThresholdType
125
+ extend Deeprails::Internal::Type::Enum
126
+
127
+ AUTOMATIC: :automatic
128
+ CUSTOM: :custom
129
+
130
+ def self?.values: -> ::Array[Deeprails::Models::DefendUpdateWorkflowParams::threshold_type]
131
+ end
30
132
  end
31
133
  end
32
134
  end
@@ -1,21 +1,21 @@
1
1
  module Deeprails
2
2
  module Models
3
3
  type file_upload_params =
4
- { file: ::Array[String] } & Deeprails::Internal::Type::request_parameters
4
+ { files: ::Array[String] } & Deeprails::Internal::Type::request_parameters
5
5
 
6
6
  class FileUploadParams < Deeprails::Internal::Type::BaseModel
7
7
  extend Deeprails::Internal::Type::RequestParameters::Converter
8
8
  include Deeprails::Internal::Type::RequestParameters
9
9
 
10
- attr_accessor file: ::Array[String]
10
+ attr_accessor files: ::Array[String]
11
11
 
12
12
  def initialize: (
13
- file: ::Array[String],
13
+ files: ::Array[String],
14
14
  ?request_options: Deeprails::request_opts
15
15
  ) -> void
16
16
 
17
17
  def to_hash: -> {
18
- file: ::Array[String],
18
+ files: ::Array[String],
19
19
  request_options: Deeprails::RequestOptions
20
20
  }
21
21
  end
@@ -4,6 +4,7 @@ module Deeprails
4
4
  {
5
5
  guardrail_metrics: ::Array[Deeprails::Models::MonitorCreateParams::guardrail_metric],
6
6
  name: String,
7
+ context_awareness: bool,
7
8
  description: String,
8
9
  file_search: ::Array[String],
9
10
  web_search: bool
@@ -18,6 +19,10 @@ module Deeprails
18
19
 
19
20
  attr_accessor name: String
20
21
 
22
+ attr_reader context_awareness: bool?
23
+
24
+ def context_awareness=: (bool) -> bool
25
+
21
26
  attr_reader description: String?
22
27
 
23
28
  def description=: (String) -> String
@@ -33,6 +38,7 @@ module Deeprails
33
38
  def initialize: (
34
39
  guardrail_metrics: ::Array[Deeprails::Models::MonitorCreateParams::guardrail_metric],
35
40
  name: String,
41
+ ?context_awareness: bool,
36
42
  ?description: String,
37
43
  ?file_search: ::Array[String],
38
44
  ?web_search: bool,
@@ -42,6 +48,7 @@ module Deeprails
42
48
  def to_hash: -> {
43
49
  guardrail_metrics: ::Array[Deeprails::Models::MonitorCreateParams::guardrail_metric],
44
50
  name: String,
51
+ context_awareness: bool,
45
52
  description: String,
46
53
  file_search: ::Array[String],
47
54
  web_search: bool,
@@ -173,9 +173,22 @@ module Deeprails
173
173
  end
174
174
 
175
175
  type model_input =
176
- { ground_truth: String, system_prompt: String, user_prompt: String }
176
+ {
177
+ user_prompt: String,
178
+ context: ::Array[Deeprails::MonitorDetailResponse::Evaluation::ModelInput::Context],
179
+ ground_truth: String,
180
+ system_prompt: String
181
+ }
177
182
 
178
183
  class ModelInput < Deeprails::Internal::Type::BaseModel
184
+ attr_accessor user_prompt: String
185
+
186
+ attr_reader context: ::Array[Deeprails::MonitorDetailResponse::Evaluation::ModelInput::Context]?
187
+
188
+ def context=: (
189
+ ::Array[Deeprails::MonitorDetailResponse::Evaluation::ModelInput::Context]
190
+ ) -> ::Array[Deeprails::MonitorDetailResponse::Evaluation::ModelInput::Context]
191
+
179
192
  attr_reader ground_truth: String?
180
193
 
181
194
  def ground_truth=: (String) -> String
@@ -184,21 +197,35 @@ module Deeprails
184
197
 
185
198
  def system_prompt=: (String) -> String
186
199
 
187
- attr_reader user_prompt: String?
188
-
189
- def user_prompt=: (String) -> String
190
-
191
200
  def initialize: (
201
+ user_prompt: String,
202
+ ?context: ::Array[Deeprails::MonitorDetailResponse::Evaluation::ModelInput::Context],
192
203
  ?ground_truth: String,
193
- ?system_prompt: String,
194
- ?user_prompt: String
204
+ ?system_prompt: String
195
205
  ) -> void
196
206
 
197
207
  def to_hash: -> {
208
+ user_prompt: String,
209
+ context: ::Array[Deeprails::MonitorDetailResponse::Evaluation::ModelInput::Context],
198
210
  ground_truth: String,
199
- system_prompt: String,
200
- user_prompt: String
211
+ system_prompt: String
201
212
  }
213
+
214
+ type context = { content: String, role: String }
215
+
216
+ class Context < Deeprails::Internal::Type::BaseModel
217
+ attr_reader content: String?
218
+
219
+ def content=: (String) -> String
220
+
221
+ attr_reader role: String?
222
+
223
+ def role=: (String) -> String
224
+
225
+ def initialize: (?content: String, ?role: String) -> void
226
+
227
+ def to_hash: -> { content: String, role: String }
228
+ end
202
229
  end
203
230
 
204
231
  type run_mode = :precision_plus | :precision | :smart | :economy
@@ -44,9 +44,22 @@ module Deeprails
44
44
  }
45
45
 
46
46
  type model_input =
47
- { ground_truth: String, system_prompt: String, user_prompt: String }
47
+ {
48
+ user_prompt: String,
49
+ context: ::Array[Deeprails::MonitorSubmitEventParams::ModelInput::Context],
50
+ ground_truth: String,
51
+ system_prompt: String
52
+ }
48
53
 
49
54
  class ModelInput < Deeprails::Internal::Type::BaseModel
55
+ attr_accessor user_prompt: String
56
+
57
+ attr_reader context: ::Array[Deeprails::MonitorSubmitEventParams::ModelInput::Context]?
58
+
59
+ def context=: (
60
+ ::Array[Deeprails::MonitorSubmitEventParams::ModelInput::Context]
61
+ ) -> ::Array[Deeprails::MonitorSubmitEventParams::ModelInput::Context]
62
+
50
63
  attr_reader ground_truth: String?
51
64
 
52
65
  def ground_truth=: (String) -> String
@@ -55,28 +68,44 @@ module Deeprails
55
68
 
56
69
  def system_prompt=: (String) -> String
57
70
 
58
- attr_reader user_prompt: String?
59
-
60
- def user_prompt=: (String) -> String
61
-
62
71
  def initialize: (
72
+ user_prompt: String,
73
+ ?context: ::Array[Deeprails::MonitorSubmitEventParams::ModelInput::Context],
63
74
  ?ground_truth: String,
64
- ?system_prompt: String,
65
- ?user_prompt: String
75
+ ?system_prompt: String
66
76
  ) -> void
67
77
 
68
78
  def to_hash: -> {
79
+ user_prompt: String,
80
+ context: ::Array[Deeprails::MonitorSubmitEventParams::ModelInput::Context],
69
81
  ground_truth: String,
70
- system_prompt: String,
71
- user_prompt: String
82
+ system_prompt: String
72
83
  }
84
+
85
+ type context = { content: String, role: String }
86
+
87
+ class Context < Deeprails::Internal::Type::BaseModel
88
+ attr_reader content: String?
89
+
90
+ def content=: (String) -> String
91
+
92
+ attr_reader role: String?
93
+
94
+ def role=: (String) -> String
95
+
96
+ def initialize: (?content: String, ?role: String) -> void
97
+
98
+ def to_hash: -> { content: String, role: String }
99
+ end
73
100
  end
74
101
 
75
- type run_mode = :precision_plus | :precision | :smart | :economy
102
+ type run_mode =
103
+ :precision_plus_codex | :precision_plus | :precision | :smart | :economy
76
104
 
77
105
  module RunMode
78
106
  extend Deeprails::Internal::Type::Enum
79
107
 
108
+ PRECISION_PLUS_CODEX: :precision_plus_codex
80
109
  PRECISION_PLUS: :precision_plus
81
110
  PRECISION: :precision
82
111
  SMART: :smart
@@ -3,8 +3,11 @@ module Deeprails
3
3
  type monitor_update_params =
4
4
  {
5
5
  description: String,
6
+ file_search: ::Array[String],
7
+ guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric],
6
8
  name: String,
7
- status: Deeprails::Models::MonitorUpdateParams::status
9
+ status: Deeprails::Models::MonitorUpdateParams::status,
10
+ web_search: bool
8
11
  }
9
12
  & Deeprails::Internal::Type::request_parameters
10
13
 
@@ -16,6 +19,16 @@ module Deeprails
16
19
 
17
20
  def description=: (String) -> String
18
21
 
22
+ attr_reader file_search: ::Array[String]?
23
+
24
+ def file_search=: (::Array[String]) -> ::Array[String]
25
+
26
+ attr_reader guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric]?
27
+
28
+ def guardrail_metrics=: (
29
+ ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric]
30
+ ) -> ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric]
31
+
19
32
  attr_reader name: String?
20
33
 
21
34
  def name=: (String) -> String
@@ -26,20 +39,51 @@ module Deeprails
26
39
  Deeprails::Models::MonitorUpdateParams::status
27
40
  ) -> Deeprails::Models::MonitorUpdateParams::status
28
41
 
42
+ attr_reader web_search: bool?
43
+
44
+ def web_search=: (bool) -> bool
45
+
29
46
  def initialize: (
30
47
  ?description: String,
48
+ ?file_search: ::Array[String],
49
+ ?guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric],
31
50
  ?name: String,
32
51
  ?status: Deeprails::Models::MonitorUpdateParams::status,
52
+ ?web_search: bool,
33
53
  ?request_options: Deeprails::request_opts
34
54
  ) -> void
35
55
 
36
56
  def to_hash: -> {
37
57
  description: String,
58
+ file_search: ::Array[String],
59
+ guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric],
38
60
  name: String,
39
61
  status: Deeprails::Models::MonitorUpdateParams::status,
62
+ web_search: bool,
40
63
  request_options: Deeprails::RequestOptions
41
64
  }
42
65
 
66
+ type guardrail_metric =
67
+ :correctness
68
+ | :completeness
69
+ | :instruction_adherence
70
+ | :context_adherence
71
+ | :ground_truth_adherence
72
+ | :comprehensive_safety
73
+
74
+ module GuardrailMetric
75
+ extend Deeprails::Internal::Type::Enum
76
+
77
+ CORRECTNESS: :correctness
78
+ COMPLETENESS: :completeness
79
+ INSTRUCTION_ADHERENCE: :instruction_adherence
80
+ CONTEXT_ADHERENCE: :context_adherence
81
+ GROUND_TRUTH_ADHERENCE: :ground_truth_adherence
82
+ COMPREHENSIVE_SAFETY: :comprehensive_safety
83
+
84
+ def self?.values: -> ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric]
85
+ end
86
+
43
87
  type status = :active | :inactive
44
88
 
45
89
  module Status