deeprails 0.23.0 → 0.24.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 +30 -0
- data/README.md +1 -1
- data/lib/deeprails/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/deeprails/internal/util.rb +32 -1
- data/lib/deeprails/models/defend_retrieve_event_params.rb +7 -1
- data/lib/deeprails/models/defend_retrieve_workflow_params.rb +8 -1
- data/lib/deeprails/models/defend_submit_and_stream_event_params.rb +21 -12
- data/lib/deeprails/models/defend_submit_event_params.rb +23 -9
- data/lib/deeprails/models/defend_update_workflow_params.rb +8 -1
- data/lib/deeprails/models/monitor_detail_response.rb +7 -3
- data/lib/deeprails/models/monitor_event_detail_response.rb +5 -3
- data/lib/deeprails/models/monitor_retrieve_event_params.rb +7 -1
- data/lib/deeprails/models/monitor_retrieve_params.rb +8 -1
- data/lib/deeprails/models/monitor_submit_event_params.rb +23 -9
- data/lib/deeprails/models/monitor_update_params.rb +8 -1
- data/lib/deeprails/models/workflow_event_detail_response.rb +14 -3
- data/lib/deeprails/resources/defend.rb +9 -7
- data/lib/deeprails/resources/monitor.rb +2 -1
- data/lib/deeprails/version.rb +1 -1
- data/rbi/deeprails/internal/util.rbi +21 -1
- data/rbi/deeprails/models/defend_retrieve_event_params.rbi +10 -2
- data/rbi/deeprails/models/defend_retrieve_workflow_params.rbi +10 -1
- data/rbi/deeprails/models/defend_submit_and_stream_event_params.rbi +27 -20
- data/rbi/deeprails/models/defend_submit_event_params.rbi +34 -14
- data/rbi/deeprails/models/defend_update_workflow_params.rbi +6 -0
- data/rbi/deeprails/models/monitor_detail_response.rbi +19 -6
- data/rbi/deeprails/models/monitor_event_detail_response.rbi +16 -6
- data/rbi/deeprails/models/monitor_retrieve_event_params.rbi +10 -2
- data/rbi/deeprails/models/monitor_retrieve_params.rbi +10 -1
- data/rbi/deeprails/models/monitor_submit_event_params.rbi +34 -14
- data/rbi/deeprails/models/monitor_update_params.rbi +6 -0
- data/rbi/deeprails/models/workflow_event_detail_response.rbi +37 -3
- data/rbi/deeprails/resources/defend.rbi +13 -8
- data/rbi/deeprails/resources/monitor.rbi +5 -2
- data/sig/deeprails/internal/util.rbs +10 -0
- data/sig/deeprails/models/defend_retrieve_event_params.rbs +6 -1
- data/sig/deeprails/models/defend_retrieve_workflow_params.rbs +6 -1
- data/sig/deeprails/models/defend_submit_and_stream_event_params.rbs +7 -8
- data/sig/deeprails/models/defend_submit_event_params.rbs +16 -5
- data/sig/deeprails/models/defend_update_workflow_params.rbs +5 -0
- data/sig/deeprails/models/monitor_detail_response.rbs +12 -4
- data/sig/deeprails/models/monitor_event_detail_response.rbs +12 -4
- data/sig/deeprails/models/monitor_retrieve_event_params.rbs +6 -1
- data/sig/deeprails/models/monitor_retrieve_params.rbs +6 -1
- data/sig/deeprails/models/monitor_submit_event_params.rbs +16 -5
- data/sig/deeprails/models/monitor_update_params.rbs +5 -0
- data/sig/deeprails/models/workflow_event_detail_response.rbs +16 -4
- metadata +1 -1
|
@@ -11,6 +11,9 @@ module Deeprails
|
|
|
11
11
|
T.any(Deeprails::MonitorUpdateParams, Deeprails::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :monitor_id
|
|
16
|
+
|
|
14
17
|
# New description of the monitor.
|
|
15
18
|
sig { returns(T.nilable(String)) }
|
|
16
19
|
attr_reader :description
|
|
@@ -73,6 +76,7 @@ module Deeprails
|
|
|
73
76
|
|
|
74
77
|
sig do
|
|
75
78
|
params(
|
|
79
|
+
monitor_id: String,
|
|
76
80
|
description: String,
|
|
77
81
|
file_search: T::Array[String],
|
|
78
82
|
guardrail_metrics:
|
|
@@ -84,6 +88,7 @@ module Deeprails
|
|
|
84
88
|
).returns(T.attached_class)
|
|
85
89
|
end
|
|
86
90
|
def self.new(
|
|
91
|
+
monitor_id:,
|
|
87
92
|
# New description of the monitor.
|
|
88
93
|
description: nil,
|
|
89
94
|
# An array of file IDs to search in the monitor's evaluations. Files must be
|
|
@@ -106,6 +111,7 @@ module Deeprails
|
|
|
106
111
|
sig do
|
|
107
112
|
override.returns(
|
|
108
113
|
{
|
|
114
|
+
monitor_id: String,
|
|
109
115
|
description: String,
|
|
110
116
|
file_search: T::Array[String],
|
|
111
117
|
guardrail_metrics:
|
|
@@ -63,7 +63,11 @@ module Deeprails
|
|
|
63
63
|
end
|
|
64
64
|
attr_accessor :improvement_tool_status
|
|
65
65
|
|
|
66
|
-
sig
|
|
66
|
+
sig do
|
|
67
|
+
returns(
|
|
68
|
+
T::Array[Deeprails::WorkflowEventDetailResponse::KeyImprovement]
|
|
69
|
+
)
|
|
70
|
+
end
|
|
67
71
|
attr_accessor :key_improvements
|
|
68
72
|
|
|
69
73
|
# Status of the event.
|
|
@@ -181,7 +185,10 @@ module Deeprails
|
|
|
181
185
|
T.nilable(
|
|
182
186
|
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::OrSymbol
|
|
183
187
|
),
|
|
184
|
-
key_improvements:
|
|
188
|
+
key_improvements:
|
|
189
|
+
T::Array[
|
|
190
|
+
Deeprails::WorkflowEventDetailResponse::KeyImprovement::OrHash
|
|
191
|
+
],
|
|
185
192
|
status: Deeprails::WorkflowEventDetailResponse::Status::OrSymbol,
|
|
186
193
|
threshold_type:
|
|
187
194
|
Deeprails::WorkflowEventDetailResponse::ThresholdType::OrSymbol,
|
|
@@ -266,7 +273,8 @@ module Deeprails
|
|
|
266
273
|
T.nilable(
|
|
267
274
|
Deeprails::WorkflowEventDetailResponse::ImprovementToolStatus::TaggedSymbol
|
|
268
275
|
),
|
|
269
|
-
key_improvements:
|
|
276
|
+
key_improvements:
|
|
277
|
+
T::Array[Deeprails::WorkflowEventDetailResponse::KeyImprovement],
|
|
270
278
|
status:
|
|
271
279
|
Deeprails::WorkflowEventDetailResponse::Status::TaggedSymbol,
|
|
272
280
|
threshold_type:
|
|
@@ -597,6 +605,32 @@ module Deeprails
|
|
|
597
605
|
end
|
|
598
606
|
end
|
|
599
607
|
|
|
608
|
+
class KeyImprovement < Deeprails::Internal::Type::BaseModel
|
|
609
|
+
OrHash =
|
|
610
|
+
T.type_alias do
|
|
611
|
+
T.any(
|
|
612
|
+
Deeprails::WorkflowEventDetailResponse::KeyImprovement,
|
|
613
|
+
Deeprails::Internal::AnyHash
|
|
614
|
+
)
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
618
|
+
attr_reader :key_improvement
|
|
619
|
+
|
|
620
|
+
sig { params(key_improvement: T::Array[String]).void }
|
|
621
|
+
attr_writer :key_improvement
|
|
622
|
+
|
|
623
|
+
sig do
|
|
624
|
+
params(key_improvement: T::Array[String]).returns(T.attached_class)
|
|
625
|
+
end
|
|
626
|
+
def self.new(key_improvement: nil)
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
sig { override.returns({ key_improvement: T::Array[String] }) }
|
|
630
|
+
def to_hash
|
|
631
|
+
end
|
|
632
|
+
end
|
|
633
|
+
|
|
600
634
|
# Status of the event.
|
|
601
635
|
module Status
|
|
602
636
|
extend Deeprails::Internal::Type::Enum
|
|
@@ -106,8 +106,8 @@ module Deeprails
|
|
|
106
106
|
)
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
# Use this endpoint to
|
|
110
|
-
#
|
|
109
|
+
# Use this endpoint to submit a model input and output pair to a workflow for
|
|
110
|
+
# evaluation with streaming responses.
|
|
111
111
|
sig do
|
|
112
112
|
params(
|
|
113
113
|
workflow_id: String,
|
|
@@ -130,11 +130,13 @@ module Deeprails
|
|
|
130
130
|
model_output:,
|
|
131
131
|
# Body param: The model that generated the output (e.g., "gpt-4", "claude-3").
|
|
132
132
|
model_used:,
|
|
133
|
-
# Body param: The evaluation run mode. Streaming
|
|
134
|
-
# and
|
|
133
|
+
# Body param: The evaluation run mode. Streaming is supported on all run modes
|
|
134
|
+
# except precision_max and precision_max_codex. Note: super_fast does not support
|
|
135
|
+
# Web Search or File Search — if your workflow has these enabled, use a different
|
|
136
|
+
# run mode or disable the capability on the workflow.
|
|
135
137
|
run_mode:,
|
|
136
|
-
# Query param: Enable SSE streaming for real-time token feedback.
|
|
137
|
-
#
|
|
138
|
+
# Query param: Enable SSE streaming for real-time token feedback. Supported on all
|
|
139
|
+
# run modes except precision_max and precision_max_codex.
|
|
138
140
|
stream: nil,
|
|
139
141
|
# Body param: Optional tag to identify this event.
|
|
140
142
|
nametag: nil,
|
|
@@ -168,8 +170,11 @@ module Deeprails
|
|
|
168
170
|
model_used:,
|
|
169
171
|
# Run mode for the workflow event. The run mode allows the user to optimize for
|
|
170
172
|
# speed, accuracy, and cost by determining which models are used to evaluate the
|
|
171
|
-
# event. Available run modes
|
|
172
|
-
# `precision`, `
|
|
173
|
+
# event. Available run modes (fastest to most thorough): `super_fast`, `fast`,
|
|
174
|
+
# `precision`, `precision_codex`, `precision_max`, and `precision_max_codex`.
|
|
175
|
+
# Defaults to `fast`. Note: `super_fast` does not support Web Search or File
|
|
176
|
+
# Search — if your workflow has these capabilities enabled, use a different run
|
|
177
|
+
# mode or edit the workflow to disable them.
|
|
173
178
|
run_mode:,
|
|
174
179
|
# An optional, user-defined tag for the event.
|
|
175
180
|
nametag: nil,
|
|
@@ -141,8 +141,11 @@ module Deeprails
|
|
|
141
141
|
nametag: nil,
|
|
142
142
|
# Run mode for the monitor event. The run mode allows the user to optimize for
|
|
143
143
|
# speed, accuracy, and cost by determining which models are used to evaluate the
|
|
144
|
-
# event. Available run modes
|
|
145
|
-
# `precision`, `
|
|
144
|
+
# event. Available run modes (fastest to most thorough): `super_fast`, `fast`,
|
|
145
|
+
# `precision`, `precision_codex`, `precision_max`, and `precision_max_codex`.
|
|
146
|
+
# Defaults to `fast`. Note: `super_fast` does not support Web Search or File
|
|
147
|
+
# Search — if your monitor has these capabilities enabled, use a different run
|
|
148
|
+
# mode or edit the monitor to disable them.
|
|
146
149
|
run_mode: nil,
|
|
147
150
|
request_options: {}
|
|
148
151
|
)
|
|
@@ -106,6 +106,16 @@ module Deeprails
|
|
|
106
106
|
JSON_CONTENT: Regexp
|
|
107
107
|
JSONL_CONTENT: Regexp
|
|
108
108
|
|
|
109
|
+
def encode_query_params: (
|
|
110
|
+
::Hash[Symbol, top] query
|
|
111
|
+
) -> ::Hash[Symbol, top]
|
|
112
|
+
|
|
113
|
+
private def write_query_param_element!: (
|
|
114
|
+
::Hash[Symbol, top] collection,
|
|
115
|
+
String key,
|
|
116
|
+
top element
|
|
117
|
+
) -> nil
|
|
118
|
+
|
|
109
119
|
def self?.write_multipart_content: (
|
|
110
120
|
Enumerator::Yielder y,
|
|
111
121
|
val: top,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
module Deeprails
|
|
2
2
|
module Models
|
|
3
3
|
type defend_retrieve_event_params =
|
|
4
|
-
{ workflow_id: String
|
|
4
|
+
{ workflow_id: String, event_id: String }
|
|
5
|
+
& Deeprails::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class DefendRetrieveEventParams < Deeprails::Internal::Type::BaseModel
|
|
7
8
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
@@ -9,13 +10,17 @@ module Deeprails
|
|
|
9
10
|
|
|
10
11
|
attr_accessor workflow_id: String
|
|
11
12
|
|
|
13
|
+
attr_accessor event_id: String
|
|
14
|
+
|
|
12
15
|
def initialize: (
|
|
13
16
|
workflow_id: String,
|
|
17
|
+
event_id: String,
|
|
14
18
|
?request_options: Deeprails::request_opts
|
|
15
19
|
) -> void
|
|
16
20
|
|
|
17
21
|
def to_hash: -> {
|
|
18
22
|
workflow_id: String,
|
|
23
|
+
event_id: String,
|
|
19
24
|
request_options: Deeprails::RequestOptions
|
|
20
25
|
}
|
|
21
26
|
end
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
module Deeprails
|
|
2
2
|
module Models
|
|
3
3
|
type defend_retrieve_workflow_params =
|
|
4
|
-
{ limit: Integer }
|
|
4
|
+
{ workflow_id: String, limit: Integer }
|
|
5
|
+
& Deeprails::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class DefendRetrieveWorkflowParams < Deeprails::Internal::Type::BaseModel
|
|
7
8
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
8
9
|
include Deeprails::Internal::Type::RequestParameters
|
|
9
10
|
|
|
11
|
+
attr_accessor workflow_id: String
|
|
12
|
+
|
|
10
13
|
attr_reader limit: Integer?
|
|
11
14
|
|
|
12
15
|
def limit=: (Integer) -> Integer
|
|
13
16
|
|
|
14
17
|
def initialize: (
|
|
18
|
+
workflow_id: String,
|
|
15
19
|
?limit: Integer,
|
|
16
20
|
?request_options: Deeprails::request_opts
|
|
17
21
|
) -> void
|
|
18
22
|
|
|
19
23
|
def to_hash: -> {
|
|
24
|
+
workflow_id: String,
|
|
20
25
|
limit: Integer,
|
|
21
26
|
request_options: Deeprails::RequestOptions
|
|
22
27
|
}
|
|
@@ -2,6 +2,7 @@ module Deeprails
|
|
|
2
2
|
module Models
|
|
3
3
|
type defend_submit_and_stream_event_params =
|
|
4
4
|
{
|
|
5
|
+
workflow_id: String,
|
|
5
6
|
model_input: ::Hash[Symbol, top],
|
|
6
7
|
model_output: String,
|
|
7
8
|
model_used: String,
|
|
@@ -15,6 +16,8 @@ module Deeprails
|
|
|
15
16
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
16
17
|
include Deeprails::Internal::Type::RequestParameters
|
|
17
18
|
|
|
19
|
+
attr_accessor workflow_id: String
|
|
20
|
+
|
|
18
21
|
attr_accessor model_input: ::Hash[Symbol, top]
|
|
19
22
|
|
|
20
23
|
attr_accessor model_output: String
|
|
@@ -32,6 +35,7 @@ module Deeprails
|
|
|
32
35
|
def nametag=: (String) -> String
|
|
33
36
|
|
|
34
37
|
def initialize: (
|
|
38
|
+
workflow_id: String,
|
|
35
39
|
model_input: ::Hash[Symbol, top],
|
|
36
40
|
model_output: String,
|
|
37
41
|
model_used: String,
|
|
@@ -42,6 +46,7 @@ module Deeprails
|
|
|
42
46
|
) -> void
|
|
43
47
|
|
|
44
48
|
def to_hash: -> {
|
|
49
|
+
workflow_id: String,
|
|
45
50
|
model_input: ::Hash[Symbol, top],
|
|
46
51
|
model_output: String,
|
|
47
52
|
model_used: String,
|
|
@@ -51,21 +56,15 @@ module Deeprails
|
|
|
51
56
|
request_options: Deeprails::RequestOptions
|
|
52
57
|
}
|
|
53
58
|
|
|
54
|
-
type run_mode =
|
|
55
|
-
:fast
|
|
56
|
-
| :precision
|
|
57
|
-
| :precision_codex
|
|
58
|
-
| :precision_max
|
|
59
|
-
| :precision_max_codex
|
|
59
|
+
type run_mode = :super_fast | :fast | :precision | :precision_codex
|
|
60
60
|
|
|
61
61
|
module RunMode
|
|
62
62
|
extend Deeprails::Internal::Type::Enum
|
|
63
63
|
|
|
64
|
+
SUPER_FAST: :super_fast
|
|
64
65
|
FAST: :fast
|
|
65
66
|
PRECISION: :precision
|
|
66
67
|
PRECISION_CODEX: :precision_codex
|
|
67
|
-
PRECISION_MAX: :precision_max
|
|
68
|
-
PRECISION_MAX_CODEX: :precision_max_codex
|
|
69
68
|
|
|
70
69
|
def self?.values: -> ::Array[Deeprails::Models::DefendSubmitAndStreamEventParams::run_mode]
|
|
71
70
|
end
|
|
@@ -2,6 +2,7 @@ module Deeprails
|
|
|
2
2
|
module Models
|
|
3
3
|
type defend_submit_event_params =
|
|
4
4
|
{
|
|
5
|
+
workflow_id: String,
|
|
5
6
|
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
|
|
6
7
|
model_output: String,
|
|
7
8
|
model_used: String,
|
|
@@ -14,6 +15,8 @@ module Deeprails
|
|
|
14
15
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
15
16
|
include Deeprails::Internal::Type::RequestParameters
|
|
16
17
|
|
|
18
|
+
attr_accessor workflow_id: String
|
|
19
|
+
|
|
17
20
|
attr_accessor model_input: Deeprails::DefendSubmitEventParams::ModelInput
|
|
18
21
|
|
|
19
22
|
attr_accessor model_output: String
|
|
@@ -27,6 +30,7 @@ module Deeprails
|
|
|
27
30
|
def nametag=: (String) -> String
|
|
28
31
|
|
|
29
32
|
def initialize: (
|
|
33
|
+
workflow_id: String,
|
|
30
34
|
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
|
|
31
35
|
model_output: String,
|
|
32
36
|
model_used: String,
|
|
@@ -36,6 +40,7 @@ module Deeprails
|
|
|
36
40
|
) -> void
|
|
37
41
|
|
|
38
42
|
def to_hash: -> {
|
|
43
|
+
workflow_id: String,
|
|
39
44
|
model_input: Deeprails::DefendSubmitEventParams::ModelInput,
|
|
40
45
|
model_output: String,
|
|
41
46
|
model_used: String,
|
|
@@ -101,16 +106,22 @@ module Deeprails
|
|
|
101
106
|
end
|
|
102
107
|
|
|
103
108
|
type run_mode =
|
|
104
|
-
:
|
|
109
|
+
:super_fast
|
|
110
|
+
| :fast
|
|
111
|
+
| :precision
|
|
112
|
+
| :precision_codex
|
|
113
|
+
| :precision_max
|
|
114
|
+
| :precision_max_codex
|
|
105
115
|
|
|
106
116
|
module RunMode
|
|
107
117
|
extend Deeprails::Internal::Type::Enum
|
|
108
118
|
|
|
109
|
-
|
|
110
|
-
|
|
119
|
+
SUPER_FAST: :super_fast
|
|
120
|
+
FAST: :fast
|
|
111
121
|
PRECISION: :precision
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
PRECISION_CODEX: :precision_codex
|
|
123
|
+
PRECISION_MAX: :precision_max
|
|
124
|
+
PRECISION_MAX_CODEX: :precision_max_codex
|
|
114
125
|
|
|
115
126
|
def self?.values: -> ::Array[Deeprails::Models::DefendSubmitEventParams::run_mode]
|
|
116
127
|
end
|
|
@@ -2,6 +2,7 @@ module Deeprails
|
|
|
2
2
|
module Models
|
|
3
3
|
type defend_update_workflow_params =
|
|
4
4
|
{
|
|
5
|
+
workflow_id: String,
|
|
5
6
|
automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
|
|
6
7
|
context_awareness: bool,
|
|
7
8
|
custom_hallucination_threshold_values: ::Hash[Symbol, Float],
|
|
@@ -19,6 +20,8 @@ module Deeprails
|
|
|
19
20
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
20
21
|
include Deeprails::Internal::Type::RequestParameters
|
|
21
22
|
|
|
23
|
+
attr_accessor workflow_id: String
|
|
24
|
+
|
|
22
25
|
attr_reader automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]?
|
|
23
26
|
|
|
24
27
|
def automatic_hallucination_tolerance_levels=: (
|
|
@@ -68,6 +71,7 @@ module Deeprails
|
|
|
68
71
|
def web_search=: (bool) -> bool
|
|
69
72
|
|
|
70
73
|
def initialize: (
|
|
74
|
+
workflow_id: String,
|
|
71
75
|
?automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
|
|
72
76
|
?context_awareness: bool,
|
|
73
77
|
?custom_hallucination_threshold_values: ::Hash[Symbol, Float],
|
|
@@ -82,6 +86,7 @@ module Deeprails
|
|
|
82
86
|
) -> void
|
|
83
87
|
|
|
84
88
|
def to_hash: -> {
|
|
89
|
+
workflow_id: String,
|
|
85
90
|
automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
|
|
86
91
|
context_awareness: bool,
|
|
87
92
|
custom_hallucination_threshold_values: ::Hash[Symbol, Float],
|
|
@@ -228,15 +228,23 @@ module Deeprails
|
|
|
228
228
|
end
|
|
229
229
|
end
|
|
230
230
|
|
|
231
|
-
type run_mode =
|
|
231
|
+
type run_mode =
|
|
232
|
+
:super_fast
|
|
233
|
+
| :fast
|
|
234
|
+
| :precision
|
|
235
|
+
| :precision_codex
|
|
236
|
+
| :precision_max
|
|
237
|
+
| :precision_max_codex
|
|
232
238
|
|
|
233
239
|
module RunMode
|
|
234
240
|
extend Deeprails::Internal::Type::Enum
|
|
235
241
|
|
|
236
|
-
|
|
242
|
+
SUPER_FAST: :super_fast
|
|
243
|
+
FAST: :fast
|
|
237
244
|
PRECISION: :precision
|
|
238
|
-
|
|
239
|
-
|
|
245
|
+
PRECISION_CODEX: :precision_codex
|
|
246
|
+
PRECISION_MAX: :precision_max
|
|
247
|
+
PRECISION_MAX_CODEX: :precision_max_codex
|
|
240
248
|
|
|
241
249
|
def self?.values: -> ::Array[Deeprails::Models::MonitorDetailResponse::Evaluation::run_mode]
|
|
242
250
|
end
|
|
@@ -150,15 +150,23 @@ module Deeprails
|
|
|
150
150
|
}
|
|
151
151
|
end
|
|
152
152
|
|
|
153
|
-
type run_mode =
|
|
153
|
+
type run_mode =
|
|
154
|
+
:super_fast
|
|
155
|
+
| :fast
|
|
156
|
+
| :precision
|
|
157
|
+
| :precision_codex
|
|
158
|
+
| :precision_max
|
|
159
|
+
| :precision_max_codex
|
|
154
160
|
|
|
155
161
|
module RunMode
|
|
156
162
|
extend Deeprails::Internal::Type::Enum
|
|
157
163
|
|
|
158
|
-
|
|
164
|
+
SUPER_FAST: :super_fast
|
|
165
|
+
FAST: :fast
|
|
159
166
|
PRECISION: :precision
|
|
160
|
-
|
|
161
|
-
|
|
167
|
+
PRECISION_CODEX: :precision_codex
|
|
168
|
+
PRECISION_MAX: :precision_max
|
|
169
|
+
PRECISION_MAX_CODEX: :precision_max_codex
|
|
162
170
|
|
|
163
171
|
def self?.values: -> ::Array[Deeprails::Models::MonitorEventDetailResponse::run_mode]
|
|
164
172
|
end
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
module Deeprails
|
|
2
2
|
module Models
|
|
3
3
|
type monitor_retrieve_event_params =
|
|
4
|
-
{ monitor_id: String
|
|
4
|
+
{ monitor_id: String, event_id: String }
|
|
5
|
+
& Deeprails::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class MonitorRetrieveEventParams < Deeprails::Internal::Type::BaseModel
|
|
7
8
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
@@ -9,13 +10,17 @@ module Deeprails
|
|
|
9
10
|
|
|
10
11
|
attr_accessor monitor_id: String
|
|
11
12
|
|
|
13
|
+
attr_accessor event_id: String
|
|
14
|
+
|
|
12
15
|
def initialize: (
|
|
13
16
|
monitor_id: String,
|
|
17
|
+
event_id: String,
|
|
14
18
|
?request_options: Deeprails::request_opts
|
|
15
19
|
) -> void
|
|
16
20
|
|
|
17
21
|
def to_hash: -> {
|
|
18
22
|
monitor_id: String,
|
|
23
|
+
event_id: String,
|
|
19
24
|
request_options: Deeprails::RequestOptions
|
|
20
25
|
}
|
|
21
26
|
end
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
module Deeprails
|
|
2
2
|
module Models
|
|
3
3
|
type monitor_retrieve_params =
|
|
4
|
-
{ limit: Integer }
|
|
4
|
+
{ monitor_id: String, limit: Integer }
|
|
5
|
+
& Deeprails::Internal::Type::request_parameters
|
|
5
6
|
|
|
6
7
|
class MonitorRetrieveParams < Deeprails::Internal::Type::BaseModel
|
|
7
8
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
8
9
|
include Deeprails::Internal::Type::RequestParameters
|
|
9
10
|
|
|
11
|
+
attr_accessor monitor_id: String
|
|
12
|
+
|
|
10
13
|
attr_reader limit: Integer?
|
|
11
14
|
|
|
12
15
|
def limit=: (Integer) -> Integer
|
|
13
16
|
|
|
14
17
|
def initialize: (
|
|
18
|
+
monitor_id: String,
|
|
15
19
|
?limit: Integer,
|
|
16
20
|
?request_options: Deeprails::request_opts
|
|
17
21
|
) -> void
|
|
18
22
|
|
|
19
23
|
def to_hash: -> {
|
|
24
|
+
monitor_id: String,
|
|
20
25
|
limit: Integer,
|
|
21
26
|
request_options: Deeprails::RequestOptions
|
|
22
27
|
}
|
|
@@ -2,6 +2,7 @@ module Deeprails
|
|
|
2
2
|
module Models
|
|
3
3
|
type monitor_submit_event_params =
|
|
4
4
|
{
|
|
5
|
+
monitor_id: String,
|
|
5
6
|
model_input: Deeprails::MonitorSubmitEventParams::ModelInput,
|
|
6
7
|
model_output: String,
|
|
7
8
|
nametag: String,
|
|
@@ -13,6 +14,8 @@ module Deeprails
|
|
|
13
14
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
14
15
|
include Deeprails::Internal::Type::RequestParameters
|
|
15
16
|
|
|
17
|
+
attr_accessor monitor_id: String
|
|
18
|
+
|
|
16
19
|
attr_accessor model_input: Deeprails::MonitorSubmitEventParams::ModelInput
|
|
17
20
|
|
|
18
21
|
attr_accessor model_output: String
|
|
@@ -28,6 +31,7 @@ module Deeprails
|
|
|
28
31
|
) -> Deeprails::Models::MonitorSubmitEventParams::run_mode
|
|
29
32
|
|
|
30
33
|
def initialize: (
|
|
34
|
+
monitor_id: String,
|
|
31
35
|
model_input: Deeprails::MonitorSubmitEventParams::ModelInput,
|
|
32
36
|
model_output: String,
|
|
33
37
|
?nametag: String,
|
|
@@ -36,6 +40,7 @@ module Deeprails
|
|
|
36
40
|
) -> void
|
|
37
41
|
|
|
38
42
|
def to_hash: -> {
|
|
43
|
+
monitor_id: String,
|
|
39
44
|
model_input: Deeprails::MonitorSubmitEventParams::ModelInput,
|
|
40
45
|
model_output: String,
|
|
41
46
|
nametag: String,
|
|
@@ -100,16 +105,22 @@ module Deeprails
|
|
|
100
105
|
end
|
|
101
106
|
|
|
102
107
|
type run_mode =
|
|
103
|
-
:
|
|
108
|
+
:super_fast
|
|
109
|
+
| :fast
|
|
110
|
+
| :precision
|
|
111
|
+
| :precision_codex
|
|
112
|
+
| :precision_max
|
|
113
|
+
| :precision_max_codex
|
|
104
114
|
|
|
105
115
|
module RunMode
|
|
106
116
|
extend Deeprails::Internal::Type::Enum
|
|
107
117
|
|
|
108
|
-
|
|
109
|
-
|
|
118
|
+
SUPER_FAST: :super_fast
|
|
119
|
+
FAST: :fast
|
|
110
120
|
PRECISION: :precision
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
PRECISION_CODEX: :precision_codex
|
|
122
|
+
PRECISION_MAX: :precision_max
|
|
123
|
+
PRECISION_MAX_CODEX: :precision_max_codex
|
|
113
124
|
|
|
114
125
|
def self?.values: -> ::Array[Deeprails::Models::MonitorSubmitEventParams::run_mode]
|
|
115
126
|
end
|
|
@@ -2,6 +2,7 @@ module Deeprails
|
|
|
2
2
|
module Models
|
|
3
3
|
type monitor_update_params =
|
|
4
4
|
{
|
|
5
|
+
monitor_id: String,
|
|
5
6
|
description: String,
|
|
6
7
|
file_search: ::Array[String],
|
|
7
8
|
guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric],
|
|
@@ -15,6 +16,8 @@ module Deeprails
|
|
|
15
16
|
extend Deeprails::Internal::Type::RequestParameters::Converter
|
|
16
17
|
include Deeprails::Internal::Type::RequestParameters
|
|
17
18
|
|
|
19
|
+
attr_accessor monitor_id: String
|
|
20
|
+
|
|
18
21
|
attr_reader description: String?
|
|
19
22
|
|
|
20
23
|
def description=: (String) -> String
|
|
@@ -44,6 +47,7 @@ module Deeprails
|
|
|
44
47
|
def web_search=: (bool) -> bool
|
|
45
48
|
|
|
46
49
|
def initialize: (
|
|
50
|
+
monitor_id: String,
|
|
47
51
|
?description: String,
|
|
48
52
|
?file_search: ::Array[String],
|
|
49
53
|
?guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric],
|
|
@@ -54,6 +58,7 @@ module Deeprails
|
|
|
54
58
|
) -> void
|
|
55
59
|
|
|
56
60
|
def to_hash: -> {
|
|
61
|
+
monitor_id: String,
|
|
57
62
|
description: String,
|
|
58
63
|
file_search: ::Array[String],
|
|
59
64
|
guardrail_metrics: ::Array[Deeprails::Models::MonitorUpdateParams::guardrail_metric],
|
|
@@ -10,7 +10,7 @@ module Deeprails
|
|
|
10
10
|
improved_model_output: String,
|
|
11
11
|
improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action,
|
|
12
12
|
improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?,
|
|
13
|
-
key_improvements: ::Array[
|
|
13
|
+
key_improvements: ::Array[Deeprails::WorkflowEventDetailResponse::KeyImprovement],
|
|
14
14
|
status: Deeprails::Models::WorkflowEventDetailResponse::status,
|
|
15
15
|
threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type,
|
|
16
16
|
workflow_id: String,
|
|
@@ -38,7 +38,7 @@ module Deeprails
|
|
|
38
38
|
|
|
39
39
|
attr_accessor improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?
|
|
40
40
|
|
|
41
|
-
attr_accessor key_improvements: ::Array[
|
|
41
|
+
attr_accessor key_improvements: ::Array[Deeprails::WorkflowEventDetailResponse::KeyImprovement]
|
|
42
42
|
|
|
43
43
|
attr_accessor status: Deeprails::Models::WorkflowEventDetailResponse::status
|
|
44
44
|
|
|
@@ -83,7 +83,7 @@ module Deeprails
|
|
|
83
83
|
improved_model_output: String,
|
|
84
84
|
improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action,
|
|
85
85
|
improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?,
|
|
86
|
-
key_improvements: ::Array[
|
|
86
|
+
key_improvements: ::Array[Deeprails::WorkflowEventDetailResponse::KeyImprovement],
|
|
87
87
|
status: Deeprails::Models::WorkflowEventDetailResponse::status,
|
|
88
88
|
threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type,
|
|
89
89
|
workflow_id: String,
|
|
@@ -103,7 +103,7 @@ module Deeprails
|
|
|
103
103
|
improved_model_output: String,
|
|
104
104
|
improvement_action: Deeprails::Models::WorkflowEventDetailResponse::improvement_action,
|
|
105
105
|
improvement_tool_status: Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status?,
|
|
106
|
-
key_improvements: ::Array[
|
|
106
|
+
key_improvements: ::Array[Deeprails::WorkflowEventDetailResponse::KeyImprovement],
|
|
107
107
|
status: Deeprails::Models::WorkflowEventDetailResponse::status,
|
|
108
108
|
threshold_type: Deeprails::Models::WorkflowEventDetailResponse::threshold_type,
|
|
109
109
|
workflow_id: String,
|
|
@@ -279,6 +279,18 @@ module Deeprails
|
|
|
279
279
|
def self?.values: -> ::Array[Deeprails::Models::WorkflowEventDetailResponse::improvement_tool_status]
|
|
280
280
|
end
|
|
281
281
|
|
|
282
|
+
type key_improvement = { key_improvement: ::Array[String] }
|
|
283
|
+
|
|
284
|
+
class KeyImprovement < Deeprails::Internal::Type::BaseModel
|
|
285
|
+
attr_reader key_improvement: ::Array[String]?
|
|
286
|
+
|
|
287
|
+
def key_improvement=: (::Array[String]) -> ::Array[String]
|
|
288
|
+
|
|
289
|
+
def initialize: (?key_improvement: ::Array[String]) -> void
|
|
290
|
+
|
|
291
|
+
def to_hash: -> { key_improvement: ::Array[String] }
|
|
292
|
+
end
|
|
293
|
+
|
|
282
294
|
type status = :"In Progress" | :Completed
|
|
283
295
|
|
|
284
296
|
module Status
|