deeprails 0.12.0 → 0.14.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +9 -9
- data/lib/deeprails/models/defend_response.rb +95 -70
- data/lib/deeprails/models/monitor_detail_response.rb +59 -59
- data/lib/deeprails/models/monitor_event_detail_response.rb +1 -0
- data/lib/deeprails/models/monitor_retrieve_event_params.rb +20 -0
- data/lib/deeprails/models/workflow_event_detail_response.rb +116 -116
- data/lib/deeprails/models.rb +2 -0
- data/lib/deeprails/resources/monitor.rb +27 -0
- data/lib/deeprails/version.rb +1 -1
- data/lib/deeprails.rb +1 -0
- data/rbi/deeprails/models/defend_response.rbi +163 -165
- data/rbi/deeprails/models/monitor_detail_response.rbi +82 -121
- data/rbi/deeprails/models/monitor_event_detail_response.rbi +7 -4
- data/rbi/deeprails/models/monitor_retrieve_event_params.rbi +38 -0
- data/rbi/deeprails/models/workflow_event_detail_response.rbi +250 -278
- data/rbi/deeprails/models.rbi +2 -0
- data/rbi/deeprails/resources/monitor.rbi +17 -0
- data/sig/deeprails/models/defend_response.rbs +72 -85
- data/sig/deeprails/models/monitor_detail_response.rbs +39 -59
- data/sig/deeprails/models/monitor_retrieve_event_params.rbs +23 -0
- data/sig/deeprails/models/workflow_event_detail_response.rbs +98 -110
- data/sig/deeprails/models.rbs +2 -0
- data/sig/deeprails/resources/monitor.rbs +6 -0
- metadata +5 -2
|
@@ -11,6 +11,19 @@ module Deeprails
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# History of evaluations for the event.
|
|
15
|
+
sig do
|
|
16
|
+
returns(
|
|
17
|
+
T::Array[Deeprails::WorkflowEventDetailResponse::EvaluationHistory]
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
attr_accessor :evaluation_history
|
|
21
|
+
|
|
22
|
+
# Evaluation result consisting of average scores and rationales for each of the
|
|
23
|
+
# evaluated guardrail metrics.
|
|
24
|
+
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
25
|
+
attr_accessor :evaluation_result
|
|
26
|
+
|
|
14
27
|
# A unique workflow event ID.
|
|
15
28
|
sig { returns(String) }
|
|
16
29
|
attr_accessor :event_id
|
|
@@ -27,13 +40,36 @@ module Deeprails
|
|
|
27
40
|
sig { returns(T::Boolean) }
|
|
28
41
|
attr_accessor :filtered
|
|
29
42
|
|
|
30
|
-
#
|
|
43
|
+
# Improved model output after improvement tool was applied and each metric passed
|
|
44
|
+
# evaluation.
|
|
45
|
+
sig { returns(String) }
|
|
46
|
+
attr_accessor :improved_model_output
|
|
47
|
+
|
|
48
|
+
# Type of improvement action used to improve the event.
|
|
49
|
+
sig do
|
|
50
|
+
returns(
|
|
51
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
attr_accessor :improvement_action
|
|
55
|
+
|
|
56
|
+
# Status of the improvement tool used to improve the event.
|
|
57
|
+
sig do
|
|
58
|
+
returns(
|
|
59
|
+
T.nilable(
|
|
60
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
attr_accessor :improvement_tool_status
|
|
65
|
+
|
|
66
|
+
# Type of thresholds used to evaluate the event.
|
|
31
67
|
sig do
|
|
32
68
|
returns(
|
|
33
|
-
Deeprails::WorkflowEventDetailResponse::
|
|
69
|
+
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol
|
|
34
70
|
)
|
|
35
71
|
end
|
|
36
|
-
attr_accessor :
|
|
72
|
+
attr_accessor :threshold_type
|
|
37
73
|
|
|
38
74
|
# Workflow ID associated with the event.
|
|
39
75
|
sig { returns(String) }
|
|
@@ -95,34 +131,6 @@ module Deeprails
|
|
|
95
131
|
end
|
|
96
132
|
attr_writer :custom_hallucination_threshold_values
|
|
97
133
|
|
|
98
|
-
# History of evaluations for the event.
|
|
99
|
-
sig do
|
|
100
|
-
returns(
|
|
101
|
-
T.nilable(
|
|
102
|
-
T::Array[Deeprails::WorkflowEventDetailResponse::EvaluationHistory]
|
|
103
|
-
)
|
|
104
|
-
)
|
|
105
|
-
end
|
|
106
|
-
attr_reader :evaluation_history
|
|
107
|
-
|
|
108
|
-
sig do
|
|
109
|
-
params(
|
|
110
|
-
evaluation_history:
|
|
111
|
-
T::Array[
|
|
112
|
-
Deeprails::WorkflowEventDetailResponse::EvaluationHistory::OrHash
|
|
113
|
-
]
|
|
114
|
-
).void
|
|
115
|
-
end
|
|
116
|
-
attr_writer :evaluation_history
|
|
117
|
-
|
|
118
|
-
# Evaluation result consisting of average scores and rationales for each of the
|
|
119
|
-
# evaluated guardrail metrics.
|
|
120
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
121
|
-
attr_reader :evaluation_result
|
|
122
|
-
|
|
123
|
-
sig { params(evaluation_result: T::Hash[Symbol, T.anything]).void }
|
|
124
|
-
attr_writer :evaluation_result
|
|
125
|
-
|
|
126
134
|
# List of files available to the event, if any. Will only be present if
|
|
127
135
|
# `file_search` is enabled.
|
|
128
136
|
sig do
|
|
@@ -139,50 +147,26 @@ module Deeprails
|
|
|
139
147
|
end
|
|
140
148
|
attr_writer :files
|
|
141
149
|
|
|
142
|
-
# Improved model output after improvement tool was applied and each metric passed
|
|
143
|
-
# evaluation.
|
|
144
|
-
sig { returns(T.nilable(String)) }
|
|
145
|
-
attr_reader :improved_model_output
|
|
146
|
-
|
|
147
|
-
sig { params(improved_model_output: String).void }
|
|
148
|
-
attr_writer :improved_model_output
|
|
149
|
-
|
|
150
|
-
# Status of the improvement tool used to improve the event.
|
|
151
|
-
sig do
|
|
152
|
-
returns(
|
|
153
|
-
T.nilable(
|
|
154
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
155
|
-
)
|
|
156
|
-
)
|
|
157
|
-
end
|
|
158
|
-
attr_accessor :improvement_tool_status
|
|
159
|
-
|
|
160
|
-
# Type of thresholds used to evaluate the event.
|
|
161
|
-
sig do
|
|
162
|
-
returns(
|
|
163
|
-
T.nilable(
|
|
164
|
-
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol
|
|
165
|
-
)
|
|
166
|
-
)
|
|
167
|
-
end
|
|
168
|
-
attr_reader :threshold_type
|
|
169
|
-
|
|
170
|
-
sig do
|
|
171
|
-
params(
|
|
172
|
-
threshold_type:
|
|
173
|
-
Deeprails::WorkflowEventDetailResponse::ThresholdType::OrSymbol
|
|
174
|
-
).void
|
|
175
|
-
end
|
|
176
|
-
attr_writer :threshold_type
|
|
177
|
-
|
|
178
150
|
sig do
|
|
179
151
|
params(
|
|
152
|
+
evaluation_history:
|
|
153
|
+
T::Array[
|
|
154
|
+
Deeprails::WorkflowEventDetailResponse::EvaluationHistory::OrHash
|
|
155
|
+
],
|
|
156
|
+
evaluation_result: T::Hash[Symbol, T.anything],
|
|
180
157
|
event_id: String,
|
|
181
158
|
event_status:
|
|
182
159
|
Deeprails::WorkflowEventDetailResponse::EventStatus::OrSymbol,
|
|
183
160
|
filtered: T::Boolean,
|
|
184
|
-
|
|
185
|
-
|
|
161
|
+
improved_model_output: String,
|
|
162
|
+
improvement_action:
|
|
163
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::OrSymbol,
|
|
164
|
+
improvement_tool_status:
|
|
165
|
+
T.nilable(
|
|
166
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::OrSymbol
|
|
167
|
+
),
|
|
168
|
+
threshold_type:
|
|
169
|
+
Deeprails::WorkflowEventDetailResponse::ThresholdType::OrSymbol,
|
|
186
170
|
workflow_id: String,
|
|
187
171
|
automatic_hallucination_tolerance_levels:
|
|
188
172
|
T::Hash[
|
|
@@ -194,30 +178,30 @@ module Deeprails
|
|
|
194
178
|
Deeprails::WorkflowEventDetailResponse::Capability::OrHash
|
|
195
179
|
],
|
|
196
180
|
custom_hallucination_threshold_values: T::Hash[Symbol, Float],
|
|
197
|
-
|
|
198
|
-
T::Array[
|
|
199
|
-
Deeprails::WorkflowEventDetailResponse::EvaluationHistory::OrHash
|
|
200
|
-
],
|
|
201
|
-
evaluation_result: T::Hash[Symbol, T.anything],
|
|
202
|
-
files: T::Array[Deeprails::WorkflowEventDetailResponse::File::OrHash],
|
|
203
|
-
improved_model_output: String,
|
|
204
|
-
improvement_tool_status:
|
|
205
|
-
T.nilable(
|
|
206
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::OrSymbol
|
|
207
|
-
),
|
|
208
|
-
threshold_type:
|
|
209
|
-
Deeprails::WorkflowEventDetailResponse::ThresholdType::OrSymbol
|
|
181
|
+
files: T::Array[Deeprails::WorkflowEventDetailResponse::File::OrHash]
|
|
210
182
|
).returns(T.attached_class)
|
|
211
183
|
end
|
|
212
184
|
def self.new(
|
|
185
|
+
# History of evaluations for the event.
|
|
186
|
+
evaluation_history:,
|
|
187
|
+
# Evaluation result consisting of average scores and rationales for each of the
|
|
188
|
+
# evaluated guardrail metrics.
|
|
189
|
+
evaluation_result:,
|
|
213
190
|
# A unique workflow event ID.
|
|
214
191
|
event_id:,
|
|
215
192
|
# Status of the event.
|
|
216
193
|
event_status:,
|
|
217
194
|
# Whether the event was filtered and requires improvement.
|
|
218
195
|
filtered:,
|
|
219
|
-
#
|
|
220
|
-
|
|
196
|
+
# Improved model output after improvement tool was applied and each metric passed
|
|
197
|
+
# evaluation.
|
|
198
|
+
improved_model_output:,
|
|
199
|
+
# Type of improvement action used to improve the event.
|
|
200
|
+
improvement_action:,
|
|
201
|
+
# Status of the improvement tool used to improve the event.
|
|
202
|
+
improvement_tool_status:,
|
|
203
|
+
# Type of thresholds used to evaluate the event.
|
|
204
|
+
threshold_type:,
|
|
221
205
|
# Workflow ID associated with the event.
|
|
222
206
|
workflow_id:,
|
|
223
207
|
# Mapping of guardrail metric names to tolerance values. Values are strings
|
|
@@ -229,33 +213,33 @@ module Deeprails
|
|
|
229
213
|
# Mapping of guardrail metric names to threshold values. Values are floating point
|
|
230
214
|
# numbers (0.0-1.0) representing custom thresholds.
|
|
231
215
|
custom_hallucination_threshold_values: nil,
|
|
232
|
-
# History of evaluations for the event.
|
|
233
|
-
evaluation_history: nil,
|
|
234
|
-
# Evaluation result consisting of average scores and rationales for each of the
|
|
235
|
-
# evaluated guardrail metrics.
|
|
236
|
-
evaluation_result: nil,
|
|
237
216
|
# List of files available to the event, if any. Will only be present if
|
|
238
217
|
# `file_search` is enabled.
|
|
239
|
-
files: nil
|
|
240
|
-
# Improved model output after improvement tool was applied and each metric passed
|
|
241
|
-
# evaluation.
|
|
242
|
-
improved_model_output: nil,
|
|
243
|
-
# Status of the improvement tool used to improve the event.
|
|
244
|
-
improvement_tool_status: nil,
|
|
245
|
-
# Type of thresholds used to evaluate the event.
|
|
246
|
-
threshold_type: nil
|
|
218
|
+
files: nil
|
|
247
219
|
)
|
|
248
220
|
end
|
|
249
221
|
|
|
250
222
|
sig do
|
|
251
223
|
override.returns(
|
|
252
224
|
{
|
|
225
|
+
evaluation_history:
|
|
226
|
+
T::Array[
|
|
227
|
+
Deeprails::WorkflowEventDetailResponse::EvaluationHistory
|
|
228
|
+
],
|
|
229
|
+
evaluation_result: T::Hash[Symbol, T.anything],
|
|
253
230
|
event_id: String,
|
|
254
231
|
event_status:
|
|
255
232
|
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol,
|
|
256
233
|
filtered: T::Boolean,
|
|
257
|
-
|
|
258
|
-
|
|
234
|
+
improved_model_output: String,
|
|
235
|
+
improvement_action:
|
|
236
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol,
|
|
237
|
+
improvement_tool_status:
|
|
238
|
+
T.nilable(
|
|
239
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
240
|
+
),
|
|
241
|
+
threshold_type:
|
|
242
|
+
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol,
|
|
259
243
|
workflow_id: String,
|
|
260
244
|
automatic_hallucination_tolerance_levels:
|
|
261
245
|
T::Hash[
|
|
@@ -265,160 +249,13 @@ module Deeprails
|
|
|
265
249
|
capabilities:
|
|
266
250
|
T::Array[Deeprails::WorkflowEventDetailResponse::Capability],
|
|
267
251
|
custom_hallucination_threshold_values: T::Hash[Symbol, Float],
|
|
268
|
-
|
|
269
|
-
T::Array[
|
|
270
|
-
Deeprails::WorkflowEventDetailResponse::EvaluationHistory
|
|
271
|
-
],
|
|
272
|
-
evaluation_result: T::Hash[Symbol, T.anything],
|
|
273
|
-
files: T::Array[Deeprails::WorkflowEventDetailResponse::File],
|
|
274
|
-
improved_model_output: String,
|
|
275
|
-
improvement_tool_status:
|
|
276
|
-
T.nilable(
|
|
277
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
278
|
-
),
|
|
279
|
-
threshold_type:
|
|
280
|
-
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol
|
|
252
|
+
files: T::Array[Deeprails::WorkflowEventDetailResponse::File]
|
|
281
253
|
}
|
|
282
254
|
)
|
|
283
255
|
end
|
|
284
256
|
def to_hash
|
|
285
257
|
end
|
|
286
258
|
|
|
287
|
-
# Status of the event.
|
|
288
|
-
module EventStatus
|
|
289
|
-
extend Deeprails::Internal::Type::Enum
|
|
290
|
-
|
|
291
|
-
TaggedSymbol =
|
|
292
|
-
T.type_alias do
|
|
293
|
-
T.all(Symbol, Deeprails::WorkflowEventDetailResponse::EventStatus)
|
|
294
|
-
end
|
|
295
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
296
|
-
|
|
297
|
-
IN_PROGRESS =
|
|
298
|
-
T.let(
|
|
299
|
-
:"In Progress",
|
|
300
|
-
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
301
|
-
)
|
|
302
|
-
COMPLETED =
|
|
303
|
-
T.let(
|
|
304
|
-
:Completed,
|
|
305
|
-
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
306
|
-
)
|
|
307
|
-
|
|
308
|
-
sig do
|
|
309
|
-
override.returns(
|
|
310
|
-
T::Array[
|
|
311
|
-
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
312
|
-
]
|
|
313
|
-
)
|
|
314
|
-
end
|
|
315
|
-
def self.values
|
|
316
|
-
end
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
# Type of improvement tool used to improve the event.
|
|
320
|
-
module ImprovementToolType
|
|
321
|
-
extend Deeprails::Internal::Type::Enum
|
|
322
|
-
|
|
323
|
-
TaggedSymbol =
|
|
324
|
-
T.type_alias do
|
|
325
|
-
T.all(
|
|
326
|
-
Symbol,
|
|
327
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolType
|
|
328
|
-
)
|
|
329
|
-
end
|
|
330
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
331
|
-
|
|
332
|
-
REGEN =
|
|
333
|
-
T.let(
|
|
334
|
-
:regen,
|
|
335
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
|
|
336
|
-
)
|
|
337
|
-
FIXIT =
|
|
338
|
-
T.let(
|
|
339
|
-
:fixit,
|
|
340
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
|
|
341
|
-
)
|
|
342
|
-
DO_NOTHING =
|
|
343
|
-
T.let(
|
|
344
|
-
:do_nothing,
|
|
345
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
|
|
346
|
-
)
|
|
347
|
-
|
|
348
|
-
sig do
|
|
349
|
-
override.returns(
|
|
350
|
-
T::Array[
|
|
351
|
-
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
|
|
352
|
-
]
|
|
353
|
-
)
|
|
354
|
-
end
|
|
355
|
-
def self.values
|
|
356
|
-
end
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
module AutomaticHallucinationToleranceLevel
|
|
360
|
-
extend Deeprails::Internal::Type::Enum
|
|
361
|
-
|
|
362
|
-
TaggedSymbol =
|
|
363
|
-
T.type_alias do
|
|
364
|
-
T.all(
|
|
365
|
-
Symbol,
|
|
366
|
-
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel
|
|
367
|
-
)
|
|
368
|
-
end
|
|
369
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
370
|
-
|
|
371
|
-
LOW =
|
|
372
|
-
T.let(
|
|
373
|
-
:low,
|
|
374
|
-
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
375
|
-
)
|
|
376
|
-
MEDIUM =
|
|
377
|
-
T.let(
|
|
378
|
-
:medium,
|
|
379
|
-
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
380
|
-
)
|
|
381
|
-
HIGH =
|
|
382
|
-
T.let(
|
|
383
|
-
:high,
|
|
384
|
-
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
385
|
-
)
|
|
386
|
-
|
|
387
|
-
sig do
|
|
388
|
-
override.returns(
|
|
389
|
-
T::Array[
|
|
390
|
-
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
391
|
-
]
|
|
392
|
-
)
|
|
393
|
-
end
|
|
394
|
-
def self.values
|
|
395
|
-
end
|
|
396
|
-
end
|
|
397
|
-
|
|
398
|
-
class Capability < Deeprails::Internal::Type::BaseModel
|
|
399
|
-
OrHash =
|
|
400
|
-
T.type_alias do
|
|
401
|
-
T.any(
|
|
402
|
-
Deeprails::WorkflowEventDetailResponse::Capability,
|
|
403
|
-
Deeprails::Internal::AnyHash
|
|
404
|
-
)
|
|
405
|
-
end
|
|
406
|
-
|
|
407
|
-
sig { returns(T.nilable(String)) }
|
|
408
|
-
attr_reader :capability
|
|
409
|
-
|
|
410
|
-
sig { params(capability: String).void }
|
|
411
|
-
attr_writer :capability
|
|
412
|
-
|
|
413
|
-
sig { params(capability: String).returns(T.attached_class) }
|
|
414
|
-
def self.new(capability: nil)
|
|
415
|
-
end
|
|
416
|
-
|
|
417
|
-
sig { override.returns({ capability: String }) }
|
|
418
|
-
def to_hash
|
|
419
|
-
end
|
|
420
|
-
end
|
|
421
|
-
|
|
422
259
|
class EvaluationHistory < Deeprails::Internal::Type::BaseModel
|
|
423
260
|
OrHash =
|
|
424
261
|
T.type_alias do
|
|
@@ -563,49 +400,75 @@ module Deeprails
|
|
|
563
400
|
end
|
|
564
401
|
end
|
|
565
402
|
|
|
566
|
-
|
|
567
|
-
|
|
403
|
+
# Status of the event.
|
|
404
|
+
module EventStatus
|
|
405
|
+
extend Deeprails::Internal::Type::Enum
|
|
406
|
+
|
|
407
|
+
TaggedSymbol =
|
|
568
408
|
T.type_alias do
|
|
569
|
-
T.
|
|
570
|
-
Deeprails::WorkflowEventDetailResponse::File,
|
|
571
|
-
Deeprails::Internal::AnyHash
|
|
572
|
-
)
|
|
409
|
+
T.all(Symbol, Deeprails::WorkflowEventDetailResponse::EventStatus)
|
|
573
410
|
end
|
|
411
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
574
412
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
attr_writer :file_name
|
|
586
|
-
|
|
587
|
-
sig { returns(T.nilable(Integer)) }
|
|
588
|
-
attr_reader :file_size
|
|
589
|
-
|
|
590
|
-
sig { params(file_size: Integer).void }
|
|
591
|
-
attr_writer :file_size
|
|
413
|
+
IN_PROGRESS =
|
|
414
|
+
T.let(
|
|
415
|
+
:"In Progress",
|
|
416
|
+
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
417
|
+
)
|
|
418
|
+
COMPLETED =
|
|
419
|
+
T.let(
|
|
420
|
+
:Completed,
|
|
421
|
+
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
422
|
+
)
|
|
592
423
|
|
|
593
424
|
sig do
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
)
|
|
425
|
+
override.returns(
|
|
426
|
+
T::Array[
|
|
427
|
+
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
428
|
+
]
|
|
429
|
+
)
|
|
599
430
|
end
|
|
600
|
-
def self.
|
|
431
|
+
def self.values
|
|
601
432
|
end
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
# Type of improvement action used to improve the event.
|
|
436
|
+
module ImprovementAction
|
|
437
|
+
extend Deeprails::Internal::Type::Enum
|
|
438
|
+
|
|
439
|
+
TaggedSymbol =
|
|
440
|
+
T.type_alias do
|
|
441
|
+
T.all(
|
|
442
|
+
Symbol,
|
|
443
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction
|
|
444
|
+
)
|
|
445
|
+
end
|
|
446
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
447
|
+
|
|
448
|
+
REGEN =
|
|
449
|
+
T.let(
|
|
450
|
+
:regen,
|
|
451
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
|
|
452
|
+
)
|
|
453
|
+
FIXIT =
|
|
454
|
+
T.let(
|
|
455
|
+
:fixit,
|
|
456
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
|
|
457
|
+
)
|
|
458
|
+
DO_NOTHING =
|
|
459
|
+
T.let(
|
|
460
|
+
:do_nothing,
|
|
461
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
|
|
462
|
+
)
|
|
602
463
|
|
|
603
464
|
sig do
|
|
604
465
|
override.returns(
|
|
605
|
-
|
|
466
|
+
T::Array[
|
|
467
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementAction::TaggedSymbol
|
|
468
|
+
]
|
|
606
469
|
)
|
|
607
470
|
end
|
|
608
|
-
def
|
|
471
|
+
def self.values
|
|
609
472
|
end
|
|
610
473
|
end
|
|
611
474
|
|
|
@@ -680,6 +543,115 @@ module Deeprails
|
|
|
680
543
|
def self.values
|
|
681
544
|
end
|
|
682
545
|
end
|
|
546
|
+
|
|
547
|
+
module AutomaticHallucinationToleranceLevel
|
|
548
|
+
extend Deeprails::Internal::Type::Enum
|
|
549
|
+
|
|
550
|
+
TaggedSymbol =
|
|
551
|
+
T.type_alias do
|
|
552
|
+
T.all(
|
|
553
|
+
Symbol,
|
|
554
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel
|
|
555
|
+
)
|
|
556
|
+
end
|
|
557
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
558
|
+
|
|
559
|
+
LOW =
|
|
560
|
+
T.let(
|
|
561
|
+
:low,
|
|
562
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
563
|
+
)
|
|
564
|
+
MEDIUM =
|
|
565
|
+
T.let(
|
|
566
|
+
:medium,
|
|
567
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
568
|
+
)
|
|
569
|
+
HIGH =
|
|
570
|
+
T.let(
|
|
571
|
+
:high,
|
|
572
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
sig do
|
|
576
|
+
override.returns(
|
|
577
|
+
T::Array[
|
|
578
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
579
|
+
]
|
|
580
|
+
)
|
|
581
|
+
end
|
|
582
|
+
def self.values
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
class Capability < Deeprails::Internal::Type::BaseModel
|
|
587
|
+
OrHash =
|
|
588
|
+
T.type_alias do
|
|
589
|
+
T.any(
|
|
590
|
+
Deeprails::WorkflowEventDetailResponse::Capability,
|
|
591
|
+
Deeprails::Internal::AnyHash
|
|
592
|
+
)
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
sig { returns(T.nilable(String)) }
|
|
596
|
+
attr_reader :capability
|
|
597
|
+
|
|
598
|
+
sig { params(capability: String).void }
|
|
599
|
+
attr_writer :capability
|
|
600
|
+
|
|
601
|
+
sig { params(capability: String).returns(T.attached_class) }
|
|
602
|
+
def self.new(capability: nil)
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
sig { override.returns({ capability: String }) }
|
|
606
|
+
def to_hash
|
|
607
|
+
end
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
class File < Deeprails::Internal::Type::BaseModel
|
|
611
|
+
OrHash =
|
|
612
|
+
T.type_alias do
|
|
613
|
+
T.any(
|
|
614
|
+
Deeprails::WorkflowEventDetailResponse::File,
|
|
615
|
+
Deeprails::Internal::AnyHash
|
|
616
|
+
)
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
sig { returns(T.nilable(String)) }
|
|
620
|
+
attr_reader :file_id
|
|
621
|
+
|
|
622
|
+
sig { params(file_id: String).void }
|
|
623
|
+
attr_writer :file_id
|
|
624
|
+
|
|
625
|
+
sig { returns(T.nilable(String)) }
|
|
626
|
+
attr_reader :file_name
|
|
627
|
+
|
|
628
|
+
sig { params(file_name: String).void }
|
|
629
|
+
attr_writer :file_name
|
|
630
|
+
|
|
631
|
+
sig { returns(T.nilable(Integer)) }
|
|
632
|
+
attr_reader :file_size
|
|
633
|
+
|
|
634
|
+
sig { params(file_size: Integer).void }
|
|
635
|
+
attr_writer :file_size
|
|
636
|
+
|
|
637
|
+
sig do
|
|
638
|
+
params(
|
|
639
|
+
file_id: String,
|
|
640
|
+
file_name: String,
|
|
641
|
+
file_size: Integer
|
|
642
|
+
).returns(T.attached_class)
|
|
643
|
+
end
|
|
644
|
+
def self.new(file_id: nil, file_name: nil, file_size: nil)
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
sig do
|
|
648
|
+
override.returns(
|
|
649
|
+
{ file_id: String, file_name: String, file_size: Integer }
|
|
650
|
+
)
|
|
651
|
+
end
|
|
652
|
+
def to_hash
|
|
653
|
+
end
|
|
654
|
+
end
|
|
683
655
|
end
|
|
684
656
|
end
|
|
685
657
|
end
|
data/rbi/deeprails/models.rbi
CHANGED
|
@@ -31,6 +31,8 @@ module Deeprails
|
|
|
31
31
|
|
|
32
32
|
MonitorEventResponse = Deeprails::Models::MonitorEventResponse
|
|
33
33
|
|
|
34
|
+
MonitorRetrieveEventParams = Deeprails::Models::MonitorRetrieveEventParams
|
|
35
|
+
|
|
34
36
|
MonitorRetrieveParams = Deeprails::Models::MonitorRetrieveParams
|
|
35
37
|
|
|
36
38
|
MonitorSubmitEventParams = Deeprails::Models::MonitorSubmitEventParams
|
|
@@ -79,6 +79,23 @@ module Deeprails
|
|
|
79
79
|
)
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
# Use this endpoint to retrieve the details of a specific monitor event
|
|
83
|
+
sig do
|
|
84
|
+
params(
|
|
85
|
+
event_id: String,
|
|
86
|
+
monitor_id: String,
|
|
87
|
+
request_options: Deeprails::RequestOptions::OrHash
|
|
88
|
+
).returns(Deeprails::MonitorEventDetailResponse)
|
|
89
|
+
end
|
|
90
|
+
def retrieve_event(
|
|
91
|
+
# The ID of the requested monitor event.
|
|
92
|
+
event_id,
|
|
93
|
+
# The ID of the monitor associated with this event.
|
|
94
|
+
monitor_id:,
|
|
95
|
+
request_options: {}
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
82
99
|
# Use this endpoint to submit a model input and output pair to a monitor for
|
|
83
100
|
# evaluation
|
|
84
101
|
sig do
|