deeprails 0.11.0 → 0.12.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 +18 -0
- data/README.md +26 -40
- data/lib/deeprails/internal/transport/base_client.rb +7 -1
- data/lib/deeprails/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/deeprails/internal/type/base_model.rb +5 -5
- data/lib/deeprails/models/defend_create_response.rb +51 -0
- data/lib/deeprails/models/defend_create_workflow_params.rb +19 -19
- data/lib/deeprails/models/defend_response.rb +278 -38
- data/lib/deeprails/models/defend_retrieve_workflow_params.rb +13 -1
- data/lib/deeprails/models/defend_update_response.rb +51 -0
- data/lib/deeprails/models/file_response.rb +6 -22
- data/lib/deeprails/models/file_upload_params.rb +3 -3
- data/lib/deeprails/models/monitor_create_response.rb +51 -0
- data/lib/deeprails/models/monitor_detail_response.rb +69 -70
- data/lib/deeprails/models/monitor_event_detail_response.rb +182 -0
- data/lib/deeprails/models/monitor_event_response.rb +1 -9
- data/lib/deeprails/models/monitor_retrieve_params.rb +6 -2
- data/lib/deeprails/models/monitor_update_params.rb +11 -11
- data/lib/deeprails/models/monitor_update_response.rb +51 -0
- data/lib/deeprails/models/workflow_event_detail_response.rb +314 -0
- data/lib/deeprails/models/workflow_event_response.rb +29 -30
- data/lib/deeprails/models.rb +12 -2
- data/lib/deeprails/resources/defend.rb +20 -13
- data/lib/deeprails/resources/files.rb +1 -1
- data/lib/deeprails/resources/monitor.rb +11 -8
- data/lib/deeprails/version.rb +1 -1
- data/lib/deeprails.rb +7 -1
- data/manifest.yaml +1 -0
- data/rbi/deeprails/internal/transport/base_client.rbi +5 -0
- data/rbi/deeprails/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/deeprails/internal/type/base_model.rbi +8 -4
- data/rbi/deeprails/models/defend_create_response.rbi +83 -0
- data/rbi/deeprails/models/defend_create_workflow_params.rbi +33 -27
- data/rbi/deeprails/models/defend_response.rbi +555 -72
- data/rbi/deeprails/models/defend_retrieve_workflow_params.rbi +23 -5
- data/rbi/deeprails/models/defend_update_response.rbi +83 -0
- data/rbi/deeprails/models/file_response.rbi +11 -39
- data/rbi/deeprails/models/file_upload_params.rbi +3 -6
- data/rbi/deeprails/models/monitor_create_response.rbi +83 -0
- data/rbi/deeprails/models/monitor_detail_response.rbi +144 -104
- data/rbi/deeprails/models/monitor_event_detail_response.rbi +383 -0
- data/rbi/deeprails/models/monitor_event_response.rbi +4 -18
- data/rbi/deeprails/models/monitor_retrieve_params.rbi +4 -2
- data/rbi/deeprails/models/monitor_update_params.rbi +21 -38
- data/rbi/deeprails/models/monitor_update_response.rbi +83 -0
- data/rbi/deeprails/models/workflow_event_detail_response.rbi +685 -0
- data/rbi/deeprails/models/workflow_event_response.rbi +49 -42
- data/rbi/deeprails/models.rbi +12 -2
- data/rbi/deeprails/resources/defend.rbi +17 -12
- data/rbi/deeprails/resources/files.rbi +1 -1
- data/rbi/deeprails/resources/monitor.rbi +8 -8
- data/sig/deeprails/internal/transport/base_client.rbs +2 -0
- data/sig/deeprails/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/deeprails/models/defend_create_response.rbs +41 -0
- data/sig/deeprails/models/defend_create_workflow_params.rbs +7 -7
- data/sig/deeprails/models/defend_response.rbs +297 -28
- data/sig/deeprails/models/defend_retrieve_workflow_params.rbs +13 -3
- data/sig/deeprails/models/defend_update_response.rbs +41 -0
- data/sig/deeprails/models/file_response.rbs +5 -27
- data/sig/deeprails/models/file_upload_params.rbs +4 -5
- data/sig/deeprails/models/monitor_create_response.rbs +41 -0
- data/sig/deeprails/models/monitor_detail_response.rbs +72 -61
- data/sig/deeprails/models/monitor_event_detail_response.rbs +181 -0
- data/sig/deeprails/models/monitor_event_response.rbs +2 -15
- data/sig/deeprails/models/monitor_update_params.rbs +13 -13
- data/sig/deeprails/models/monitor_update_response.rbs +41 -0
- data/sig/deeprails/models/workflow_event_detail_response.rbs +315 -0
- data/sig/deeprails/models/workflow_event_response.rbs +24 -24
- data/sig/deeprails/models.rbs +12 -2
- data/sig/deeprails/resources/defend.rbs +5 -4
- data/sig/deeprails/resources/files.rbs +1 -1
- data/sig/deeprails/resources/monitor.rbs +3 -3
- metadata +20 -5
- data/lib/deeprails/models/monitor_response.rb +0 -83
- data/rbi/deeprails/models/monitor_response.rbi +0 -142
- data/sig/deeprails/models/monitor_response.rbs +0 -73
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Deeprails
|
|
4
|
+
module Models
|
|
5
|
+
class WorkflowEventDetailResponse < Deeprails::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Deeprails::WorkflowEventDetailResponse,
|
|
10
|
+
Deeprails::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A unique workflow event ID.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :event_id
|
|
17
|
+
|
|
18
|
+
# Status of the event.
|
|
19
|
+
sig do
|
|
20
|
+
returns(
|
|
21
|
+
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
attr_accessor :event_status
|
|
25
|
+
|
|
26
|
+
# Whether the event was filtered and requires improvement.
|
|
27
|
+
sig { returns(T::Boolean) }
|
|
28
|
+
attr_accessor :filtered
|
|
29
|
+
|
|
30
|
+
# Type of improvement tool used to improve the event.
|
|
31
|
+
sig do
|
|
32
|
+
returns(
|
|
33
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
attr_accessor :improvement_tool_type
|
|
37
|
+
|
|
38
|
+
# Workflow ID associated with the event.
|
|
39
|
+
sig { returns(String) }
|
|
40
|
+
attr_accessor :workflow_id
|
|
41
|
+
|
|
42
|
+
# Mapping of guardrail metric names to tolerance values. Values are strings
|
|
43
|
+
# (`low`, `medium`, `high`) representing automatic tolerance levels.
|
|
44
|
+
sig do
|
|
45
|
+
returns(
|
|
46
|
+
T.nilable(
|
|
47
|
+
T::Hash[
|
|
48
|
+
Symbol,
|
|
49
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
50
|
+
]
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
attr_reader :automatic_hallucination_tolerance_levels
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
automatic_hallucination_tolerance_levels:
|
|
59
|
+
T::Hash[
|
|
60
|
+
Symbol,
|
|
61
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::OrSymbol
|
|
62
|
+
]
|
|
63
|
+
).void
|
|
64
|
+
end
|
|
65
|
+
attr_writer :automatic_hallucination_tolerance_levels
|
|
66
|
+
|
|
67
|
+
# Extended AI capabilities available to the event, if any. Can be `web_search`
|
|
68
|
+
# and/or `file_search`.
|
|
69
|
+
sig do
|
|
70
|
+
returns(
|
|
71
|
+
T.nilable(
|
|
72
|
+
T::Array[Deeprails::WorkflowEventDetailResponse::Capability]
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
attr_reader :capabilities
|
|
77
|
+
|
|
78
|
+
sig do
|
|
79
|
+
params(
|
|
80
|
+
capabilities:
|
|
81
|
+
T::Array[Deeprails::WorkflowEventDetailResponse::Capability::OrHash]
|
|
82
|
+
).void
|
|
83
|
+
end
|
|
84
|
+
attr_writer :capabilities
|
|
85
|
+
|
|
86
|
+
# Mapping of guardrail metric names to threshold values. Values are floating point
|
|
87
|
+
# numbers (0.0-1.0) representing custom thresholds.
|
|
88
|
+
sig { returns(T.nilable(T::Hash[Symbol, Float])) }
|
|
89
|
+
attr_reader :custom_hallucination_threshold_values
|
|
90
|
+
|
|
91
|
+
sig do
|
|
92
|
+
params(
|
|
93
|
+
custom_hallucination_threshold_values: T::Hash[Symbol, Float]
|
|
94
|
+
).void
|
|
95
|
+
end
|
|
96
|
+
attr_writer :custom_hallucination_threshold_values
|
|
97
|
+
|
|
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
|
+
# List of files available to the event, if any. Will only be present if
|
|
127
|
+
# `file_search` is enabled.
|
|
128
|
+
sig do
|
|
129
|
+
returns(
|
|
130
|
+
T.nilable(T::Array[Deeprails::WorkflowEventDetailResponse::File])
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
attr_reader :files
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
params(
|
|
137
|
+
files: T::Array[Deeprails::WorkflowEventDetailResponse::File::OrHash]
|
|
138
|
+
).void
|
|
139
|
+
end
|
|
140
|
+
attr_writer :files
|
|
141
|
+
|
|
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
|
+
sig do
|
|
179
|
+
params(
|
|
180
|
+
event_id: String,
|
|
181
|
+
event_status:
|
|
182
|
+
Deeprails::WorkflowEventDetailResponse::EventStatus::OrSymbol,
|
|
183
|
+
filtered: T::Boolean,
|
|
184
|
+
improvement_tool_type:
|
|
185
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::OrSymbol,
|
|
186
|
+
workflow_id: String,
|
|
187
|
+
automatic_hallucination_tolerance_levels:
|
|
188
|
+
T::Hash[
|
|
189
|
+
Symbol,
|
|
190
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::OrSymbol
|
|
191
|
+
],
|
|
192
|
+
capabilities:
|
|
193
|
+
T::Array[
|
|
194
|
+
Deeprails::WorkflowEventDetailResponse::Capability::OrHash
|
|
195
|
+
],
|
|
196
|
+
custom_hallucination_threshold_values: T::Hash[Symbol, Float],
|
|
197
|
+
evaluation_history:
|
|
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
|
|
210
|
+
).returns(T.attached_class)
|
|
211
|
+
end
|
|
212
|
+
def self.new(
|
|
213
|
+
# A unique workflow event ID.
|
|
214
|
+
event_id:,
|
|
215
|
+
# Status of the event.
|
|
216
|
+
event_status:,
|
|
217
|
+
# Whether the event was filtered and requires improvement.
|
|
218
|
+
filtered:,
|
|
219
|
+
# Type of improvement tool used to improve the event.
|
|
220
|
+
improvement_tool_type:,
|
|
221
|
+
# Workflow ID associated with the event.
|
|
222
|
+
workflow_id:,
|
|
223
|
+
# Mapping of guardrail metric names to tolerance values. Values are strings
|
|
224
|
+
# (`low`, `medium`, `high`) representing automatic tolerance levels.
|
|
225
|
+
automatic_hallucination_tolerance_levels: nil,
|
|
226
|
+
# Extended AI capabilities available to the event, if any. Can be `web_search`
|
|
227
|
+
# and/or `file_search`.
|
|
228
|
+
capabilities: nil,
|
|
229
|
+
# Mapping of guardrail metric names to threshold values. Values are floating point
|
|
230
|
+
# numbers (0.0-1.0) representing custom thresholds.
|
|
231
|
+
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
|
+
# List of files available to the event, if any. Will only be present if
|
|
238
|
+
# `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
|
|
247
|
+
)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
sig do
|
|
251
|
+
override.returns(
|
|
252
|
+
{
|
|
253
|
+
event_id: String,
|
|
254
|
+
event_status:
|
|
255
|
+
Deeprails::WorkflowEventDetailResponse::EventStatus::TaggedSymbol,
|
|
256
|
+
filtered: T::Boolean,
|
|
257
|
+
improvement_tool_type:
|
|
258
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolType::TaggedSymbol,
|
|
259
|
+
workflow_id: String,
|
|
260
|
+
automatic_hallucination_tolerance_levels:
|
|
261
|
+
T::Hash[
|
|
262
|
+
Symbol,
|
|
263
|
+
Deeprails::WorkflowEventDetailResponse::AutomaticHallucinationToleranceLevel::TaggedSymbol
|
|
264
|
+
],
|
|
265
|
+
capabilities:
|
|
266
|
+
T::Array[Deeprails::WorkflowEventDetailResponse::Capability],
|
|
267
|
+
custom_hallucination_threshold_values: T::Hash[Symbol, Float],
|
|
268
|
+
evaluation_history:
|
|
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
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
end
|
|
284
|
+
def to_hash
|
|
285
|
+
end
|
|
286
|
+
|
|
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
|
+
class EvaluationHistory < Deeprails::Internal::Type::BaseModel
|
|
423
|
+
OrHash =
|
|
424
|
+
T.type_alias do
|
|
425
|
+
T.any(
|
|
426
|
+
Deeprails::WorkflowEventDetailResponse::EvaluationHistory,
|
|
427
|
+
Deeprails::Internal::AnyHash
|
|
428
|
+
)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
sig { returns(T.nilable(String)) }
|
|
432
|
+
attr_reader :attempt
|
|
433
|
+
|
|
434
|
+
sig { params(attempt: String).void }
|
|
435
|
+
attr_writer :attempt
|
|
436
|
+
|
|
437
|
+
sig { returns(T.nilable(Time)) }
|
|
438
|
+
attr_reader :created_at
|
|
439
|
+
|
|
440
|
+
sig { params(created_at: Time).void }
|
|
441
|
+
attr_writer :created_at
|
|
442
|
+
|
|
443
|
+
sig { returns(T.nilable(String)) }
|
|
444
|
+
attr_reader :error_message
|
|
445
|
+
|
|
446
|
+
sig { params(error_message: String).void }
|
|
447
|
+
attr_writer :error_message
|
|
448
|
+
|
|
449
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
450
|
+
attr_reader :evaluation_result
|
|
451
|
+
|
|
452
|
+
sig { params(evaluation_result: T::Hash[Symbol, T.anything]).void }
|
|
453
|
+
attr_writer :evaluation_result
|
|
454
|
+
|
|
455
|
+
sig { returns(T.nilable(String)) }
|
|
456
|
+
attr_reader :evaluation_status
|
|
457
|
+
|
|
458
|
+
sig { params(evaluation_status: String).void }
|
|
459
|
+
attr_writer :evaluation_status
|
|
460
|
+
|
|
461
|
+
sig { returns(T.nilable(Float)) }
|
|
462
|
+
attr_reader :evaluation_total_cost
|
|
463
|
+
|
|
464
|
+
sig { params(evaluation_total_cost: Float).void }
|
|
465
|
+
attr_writer :evaluation_total_cost
|
|
466
|
+
|
|
467
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
468
|
+
attr_reader :guardrail_metrics
|
|
469
|
+
|
|
470
|
+
sig { params(guardrail_metrics: T::Array[String]).void }
|
|
471
|
+
attr_writer :guardrail_metrics
|
|
472
|
+
|
|
473
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
474
|
+
attr_reader :model_input
|
|
475
|
+
|
|
476
|
+
sig { params(model_input: T::Hash[Symbol, T.anything]).void }
|
|
477
|
+
attr_writer :model_input
|
|
478
|
+
|
|
479
|
+
sig { returns(T.nilable(String)) }
|
|
480
|
+
attr_reader :model_output
|
|
481
|
+
|
|
482
|
+
sig { params(model_output: String).void }
|
|
483
|
+
attr_writer :model_output
|
|
484
|
+
|
|
485
|
+
sig { returns(T.nilable(Time)) }
|
|
486
|
+
attr_reader :modified_at
|
|
487
|
+
|
|
488
|
+
sig { params(modified_at: Time).void }
|
|
489
|
+
attr_writer :modified_at
|
|
490
|
+
|
|
491
|
+
sig { returns(T.nilable(String)) }
|
|
492
|
+
attr_reader :nametag
|
|
493
|
+
|
|
494
|
+
sig { params(nametag: String).void }
|
|
495
|
+
attr_writer :nametag
|
|
496
|
+
|
|
497
|
+
sig { returns(T.nilable(Integer)) }
|
|
498
|
+
attr_reader :progress
|
|
499
|
+
|
|
500
|
+
sig { params(progress: Integer).void }
|
|
501
|
+
attr_writer :progress
|
|
502
|
+
|
|
503
|
+
sig { returns(T.nilable(String)) }
|
|
504
|
+
attr_reader :run_mode
|
|
505
|
+
|
|
506
|
+
sig { params(run_mode: String).void }
|
|
507
|
+
attr_writer :run_mode
|
|
508
|
+
|
|
509
|
+
sig do
|
|
510
|
+
params(
|
|
511
|
+
attempt: String,
|
|
512
|
+
created_at: Time,
|
|
513
|
+
error_message: String,
|
|
514
|
+
evaluation_result: T::Hash[Symbol, T.anything],
|
|
515
|
+
evaluation_status: String,
|
|
516
|
+
evaluation_total_cost: Float,
|
|
517
|
+
guardrail_metrics: T::Array[String],
|
|
518
|
+
model_input: T::Hash[Symbol, T.anything],
|
|
519
|
+
model_output: String,
|
|
520
|
+
modified_at: Time,
|
|
521
|
+
nametag: String,
|
|
522
|
+
progress: Integer,
|
|
523
|
+
run_mode: String
|
|
524
|
+
).returns(T.attached_class)
|
|
525
|
+
end
|
|
526
|
+
def self.new(
|
|
527
|
+
attempt: nil,
|
|
528
|
+
created_at: nil,
|
|
529
|
+
error_message: nil,
|
|
530
|
+
evaluation_result: nil,
|
|
531
|
+
evaluation_status: nil,
|
|
532
|
+
evaluation_total_cost: nil,
|
|
533
|
+
guardrail_metrics: nil,
|
|
534
|
+
model_input: nil,
|
|
535
|
+
model_output: nil,
|
|
536
|
+
modified_at: nil,
|
|
537
|
+
nametag: nil,
|
|
538
|
+
progress: nil,
|
|
539
|
+
run_mode: nil
|
|
540
|
+
)
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
sig do
|
|
544
|
+
override.returns(
|
|
545
|
+
{
|
|
546
|
+
attempt: String,
|
|
547
|
+
created_at: Time,
|
|
548
|
+
error_message: String,
|
|
549
|
+
evaluation_result: T::Hash[Symbol, T.anything],
|
|
550
|
+
evaluation_status: String,
|
|
551
|
+
evaluation_total_cost: Float,
|
|
552
|
+
guardrail_metrics: T::Array[String],
|
|
553
|
+
model_input: T::Hash[Symbol, T.anything],
|
|
554
|
+
model_output: String,
|
|
555
|
+
modified_at: Time,
|
|
556
|
+
nametag: String,
|
|
557
|
+
progress: Integer,
|
|
558
|
+
run_mode: String
|
|
559
|
+
}
|
|
560
|
+
)
|
|
561
|
+
end
|
|
562
|
+
def to_hash
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
class File < Deeprails::Internal::Type::BaseModel
|
|
567
|
+
OrHash =
|
|
568
|
+
T.type_alias do
|
|
569
|
+
T.any(
|
|
570
|
+
Deeprails::WorkflowEventDetailResponse::File,
|
|
571
|
+
Deeprails::Internal::AnyHash
|
|
572
|
+
)
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
sig { returns(T.nilable(String)) }
|
|
576
|
+
attr_reader :file_id
|
|
577
|
+
|
|
578
|
+
sig { params(file_id: String).void }
|
|
579
|
+
attr_writer :file_id
|
|
580
|
+
|
|
581
|
+
sig { returns(T.nilable(String)) }
|
|
582
|
+
attr_reader :file_name
|
|
583
|
+
|
|
584
|
+
sig { params(file_name: String).void }
|
|
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
|
|
592
|
+
|
|
593
|
+
sig do
|
|
594
|
+
params(
|
|
595
|
+
file_id: String,
|
|
596
|
+
file_name: String,
|
|
597
|
+
file_size: Integer
|
|
598
|
+
).returns(T.attached_class)
|
|
599
|
+
end
|
|
600
|
+
def self.new(file_id: nil, file_name: nil, file_size: nil)
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
sig do
|
|
604
|
+
override.returns(
|
|
605
|
+
{ file_id: String, file_name: String, file_size: Integer }
|
|
606
|
+
)
|
|
607
|
+
end
|
|
608
|
+
def to_hash
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
# Status of the improvement tool used to improve the event.
|
|
613
|
+
module ImprovementToolStatus
|
|
614
|
+
extend Deeprails::Internal::Type::Enum
|
|
615
|
+
|
|
616
|
+
TaggedSymbol =
|
|
617
|
+
T.type_alias do
|
|
618
|
+
T.all(
|
|
619
|
+
Symbol,
|
|
620
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus
|
|
621
|
+
)
|
|
622
|
+
end
|
|
623
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
624
|
+
|
|
625
|
+
IMPROVED =
|
|
626
|
+
T.let(
|
|
627
|
+
:improved,
|
|
628
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
629
|
+
)
|
|
630
|
+
FAILED_ON_MAX_RETRIES =
|
|
631
|
+
T.let(
|
|
632
|
+
:"failed on max retries",
|
|
633
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
634
|
+
)
|
|
635
|
+
IMPROVEMENT_REQUIRED =
|
|
636
|
+
T.let(
|
|
637
|
+
:improvement_required,
|
|
638
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
639
|
+
)
|
|
640
|
+
|
|
641
|
+
sig do
|
|
642
|
+
override.returns(
|
|
643
|
+
T::Array[
|
|
644
|
+
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
645
|
+
]
|
|
646
|
+
)
|
|
647
|
+
end
|
|
648
|
+
def self.values
|
|
649
|
+
end
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
# Type of thresholds used to evaluate the event.
|
|
653
|
+
module ThresholdType
|
|
654
|
+
extend Deeprails::Internal::Type::Enum
|
|
655
|
+
|
|
656
|
+
TaggedSymbol =
|
|
657
|
+
T.type_alias do
|
|
658
|
+
T.all(Symbol, Deeprails::WorkflowEventDetailResponse::ThresholdType)
|
|
659
|
+
end
|
|
660
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
661
|
+
|
|
662
|
+
CUSTOM =
|
|
663
|
+
T.let(
|
|
664
|
+
:custom,
|
|
665
|
+
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol
|
|
666
|
+
)
|
|
667
|
+
AUTOMATIC =
|
|
668
|
+
T.let(
|
|
669
|
+
:automatic,
|
|
670
|
+
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol
|
|
671
|
+
)
|
|
672
|
+
|
|
673
|
+
sig do
|
|
674
|
+
override.returns(
|
|
675
|
+
T::Array[
|
|
676
|
+
Deeprails::WorkflowEventDetailResponse::ThresholdType::TaggedSymbol
|
|
677
|
+
]
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
def self.values
|
|
681
|
+
end
|
|
682
|
+
end
|
|
683
|
+
end
|
|
684
|
+
end
|
|
685
|
+
end
|