deeprails 0.18.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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +92 -0
  3. data/README.md +1 -1
  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 +13 -11
  7. data/lib/deeprails/internal/type/base_stream.rb +83 -0
  8. data/lib/deeprails/internal/util.rb +39 -3
  9. data/lib/deeprails/models/defend_create_workflow_params.rb +14 -1
  10. data/lib/deeprails/models/defend_response.rb +134 -10
  11. data/lib/deeprails/models/defend_retrieve_event_params.rb +7 -1
  12. data/lib/deeprails/models/defend_retrieve_workflow_params.rb +8 -1
  13. data/lib/deeprails/models/defend_submit_and_stream_event_params.rb +92 -0
  14. data/lib/deeprails/models/defend_submit_and_stream_event_response.rb +7 -0
  15. data/lib/deeprails/models/defend_submit_event_params.rb +70 -20
  16. data/lib/deeprails/models/defend_update_response.rb +9 -1
  17. data/lib/deeprails/models/defend_update_workflow_params.rb +138 -5
  18. data/lib/deeprails/models/monitor_create_params.rb +14 -1
  19. data/lib/deeprails/models/monitor_detail_response.rb +60 -17
  20. data/lib/deeprails/models/monitor_event_detail_response.rb +11 -5
  21. data/lib/deeprails/models/monitor_retrieve_event_params.rb +7 -1
  22. data/lib/deeprails/models/monitor_retrieve_params.rb +8 -1
  23. data/lib/deeprails/models/monitor_submit_event_params.rb +70 -20
  24. data/lib/deeprails/models/monitor_update_params.rb +53 -5
  25. data/lib/deeprails/models/workflow_event_detail_response.rb +99 -16
  26. data/lib/deeprails/models/workflow_event_response.rb +9 -1
  27. data/lib/deeprails/models.rb +2 -0
  28. data/lib/deeprails/resources/defend.rb +70 -5
  29. data/lib/deeprails/resources/monitor.rb +16 -7
  30. data/lib/deeprails/version.rb +1 -1
  31. data/lib/deeprails.rb +5 -0
  32. data/manifest.yaml +1 -0
  33. data/rbi/deeprails/internal/stream.rbi +20 -0
  34. data/rbi/deeprails/internal/transport/base_client.rbi +18 -2
  35. data/rbi/deeprails/internal/type/base_stream.rbi +75 -0
  36. data/rbi/deeprails/internal/util.rbi +21 -1
  37. data/rbi/deeprails/models/defend_create_workflow_params.rbi +21 -0
  38. data/rbi/deeprails/models/defend_response.rbi +286 -14
  39. data/rbi/deeprails/models/defend_retrieve_event_params.rbi +10 -2
  40. data/rbi/deeprails/models/defend_retrieve_workflow_params.rbi +10 -1
  41. data/rbi/deeprails/models/defend_submit_and_stream_event_params.rbi +155 -0
  42. data/rbi/deeprails/models/defend_submit_and_stream_event_response.rbi +7 -0
  43. data/rbi/deeprails/models/defend_submit_event_params.rbi +134 -31
  44. data/rbi/deeprails/models/defend_update_response.rbi +14 -3
  45. data/rbi/deeprails/models/defend_update_workflow_params.rbi +304 -4
  46. data/rbi/deeprails/models/monitor_create_params.rbi +21 -0
  47. data/rbi/deeprails/models/monitor_detail_response.rbi +122 -28
  48. data/rbi/deeprails/models/monitor_event_detail_response.rbi +20 -8
  49. data/rbi/deeprails/models/monitor_retrieve_event_params.rbi +10 -2
  50. data/rbi/deeprails/models/monitor_retrieve_params.rbi +10 -1
  51. data/rbi/deeprails/models/monitor_submit_event_params.rbi +134 -31
  52. data/rbi/deeprails/models/monitor_update_params.rbi +113 -4
  53. data/rbi/deeprails/models/workflow_event_detail_response.rbi +204 -24
  54. data/rbi/deeprails/models/workflow_event_response.rbi +8 -0
  55. data/rbi/deeprails/models.rbi +3 -0
  56. data/rbi/deeprails/resources/defend.rbi +101 -6
  57. data/rbi/deeprails/resources/monitor.rbi +31 -8
  58. data/sig/deeprails/internal/stream.rbs +9 -0
  59. data/sig/deeprails/internal/type/base_stream.rbs +38 -0
  60. data/sig/deeprails/internal/util.rbs +10 -0
  61. data/sig/deeprails/models/defend_create_workflow_params.rbs +7 -0
  62. data/sig/deeprails/models/defend_response.rbs +114 -8
  63. data/sig/deeprails/models/defend_retrieve_event_params.rbs +6 -1
  64. data/sig/deeprails/models/defend_retrieve_workflow_params.rbs +6 -1
  65. data/sig/deeprails/models/defend_submit_and_stream_event_params.rbs +73 -0
  66. data/sig/deeprails/models/defend_submit_and_stream_event_response.rbs +5 -0
  67. data/sig/deeprails/models/defend_submit_event_params.rbs +53 -13
  68. data/sig/deeprails/models/defend_update_response.rbs +10 -3
  69. data/sig/deeprails/models/defend_update_workflow_params.rbs +108 -1
  70. data/sig/deeprails/models/monitor_create_params.rbs +7 -0
  71. data/sig/deeprails/models/monitor_detail_response.rbs +48 -13
  72. data/sig/deeprails/models/monitor_event_detail_response.rbs +12 -4
  73. data/sig/deeprails/models/monitor_retrieve_event_params.rbs +6 -1
  74. data/sig/deeprails/models/monitor_retrieve_params.rbs +6 -1
  75. data/sig/deeprails/models/monitor_submit_event_params.rbs +53 -13
  76. data/sig/deeprails/models/monitor_update_params.rbs +50 -1
  77. data/sig/deeprails/models/workflow_event_detail_response.rbs +100 -15
  78. data/sig/deeprails/models/workflow_event_response.rbs +5 -0
  79. data/sig/deeprails/models.rbs +2 -0
  80. data/sig/deeprails/resources/defend.rbs +20 -0
  81. data/sig/deeprails/resources/monitor.rbs +4 -0
  82. metadata +28 -2
@@ -0,0 +1,73 @@
1
+ module Deeprails
2
+ module Models
3
+ type defend_submit_and_stream_event_params =
4
+ {
5
+ workflow_id: String,
6
+ model_input: ::Hash[Symbol, top],
7
+ model_output: String,
8
+ model_used: String,
9
+ run_mode: Deeprails::Models::DefendSubmitAndStreamEventParams::run_mode,
10
+ stream: bool,
11
+ nametag: String
12
+ }
13
+ & Deeprails::Internal::Type::request_parameters
14
+
15
+ class DefendSubmitAndStreamEventParams < Deeprails::Internal::Type::BaseModel
16
+ extend Deeprails::Internal::Type::RequestParameters::Converter
17
+ include Deeprails::Internal::Type::RequestParameters
18
+
19
+ attr_accessor workflow_id: String
20
+
21
+ attr_accessor model_input: ::Hash[Symbol, top]
22
+
23
+ attr_accessor model_output: String
24
+
25
+ attr_accessor model_used: String
26
+
27
+ attr_accessor run_mode: Deeprails::Models::DefendSubmitAndStreamEventParams::run_mode
28
+
29
+ attr_reader stream: bool?
30
+
31
+ def stream=: (bool) -> bool
32
+
33
+ attr_reader nametag: String?
34
+
35
+ def nametag=: (String) -> String
36
+
37
+ def initialize: (
38
+ workflow_id: String,
39
+ model_input: ::Hash[Symbol, top],
40
+ model_output: String,
41
+ model_used: String,
42
+ run_mode: Deeprails::Models::DefendSubmitAndStreamEventParams::run_mode,
43
+ ?stream: bool,
44
+ ?nametag: String,
45
+ ?request_options: Deeprails::request_opts
46
+ ) -> void
47
+
48
+ def to_hash: -> {
49
+ workflow_id: String,
50
+ model_input: ::Hash[Symbol, top],
51
+ model_output: String,
52
+ model_used: String,
53
+ run_mode: Deeprails::Models::DefendSubmitAndStreamEventParams::run_mode,
54
+ stream: bool,
55
+ nametag: String,
56
+ request_options: Deeprails::RequestOptions
57
+ }
58
+
59
+ type run_mode = :super_fast | :fast | :precision | :precision_codex
60
+
61
+ module RunMode
62
+ extend Deeprails::Internal::Type::Enum
63
+
64
+ SUPER_FAST: :super_fast
65
+ FAST: :fast
66
+ PRECISION: :precision
67
+ PRECISION_CODEX: :precision_codex
68
+
69
+ def self?.values: -> ::Array[Deeprails::Models::DefendSubmitAndStreamEventParams::run_mode]
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,5 @@
1
+ module Deeprails
2
+ module Models
3
+ class DefendSubmitAndStreamEventResponse = String
4
+ end
5
+ 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,
@@ -45,9 +50,22 @@ module Deeprails
45
50
  }
46
51
 
47
52
  type model_input =
48
- { ground_truth: String, system_prompt: String, user_prompt: String }
53
+ {
54
+ user_prompt: String,
55
+ context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context],
56
+ ground_truth: String,
57
+ system_prompt: String
58
+ }
49
59
 
50
60
  class ModelInput < Deeprails::Internal::Type::BaseModel
61
+ attr_accessor user_prompt: String
62
+
63
+ attr_reader context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context]?
64
+
65
+ def context=: (
66
+ ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context]
67
+ ) -> ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context]
68
+
51
69
  attr_reader ground_truth: String?
52
70
 
53
71
  def ground_truth=: (String) -> String
@@ -56,32 +74,54 @@ module Deeprails
56
74
 
57
75
  def system_prompt=: (String) -> String
58
76
 
59
- attr_reader user_prompt: String?
60
-
61
- def user_prompt=: (String) -> String
62
-
63
77
  def initialize: (
78
+ user_prompt: String,
79
+ ?context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context],
64
80
  ?ground_truth: String,
65
- ?system_prompt: String,
66
- ?user_prompt: String
81
+ ?system_prompt: String
67
82
  ) -> void
68
83
 
69
84
  def to_hash: -> {
85
+ user_prompt: String,
86
+ context: ::Array[Deeprails::DefendSubmitEventParams::ModelInput::Context],
70
87
  ground_truth: String,
71
- system_prompt: String,
72
- user_prompt: String
88
+ system_prompt: String
73
89
  }
90
+
91
+ type context = { content: String, role: String }
92
+
93
+ class Context < Deeprails::Internal::Type::BaseModel
94
+ attr_reader content: String?
95
+
96
+ def content=: (String) -> String
97
+
98
+ attr_reader role: String?
99
+
100
+ def role=: (String) -> String
101
+
102
+ def initialize: (?content: String, ?role: String) -> void
103
+
104
+ def to_hash: -> { content: String, role: String }
105
+ end
74
106
  end
75
107
 
76
- type run_mode = :precision_plus | :precision | :smart | :economy
108
+ type run_mode =
109
+ :super_fast
110
+ | :fast
111
+ | :precision
112
+ | :precision_codex
113
+ | :precision_max
114
+ | :precision_max_codex
77
115
 
78
116
  module RunMode
79
117
  extend Deeprails::Internal::Type::Enum
80
118
 
81
- PRECISION_PLUS: :precision_plus
119
+ SUPER_FAST: :super_fast
120
+ FAST: :fast
82
121
  PRECISION: :precision
83
- SMART: :smart
84
- ECONOMY: :economy
122
+ PRECISION_CODEX: :precision_codex
123
+ PRECISION_MAX: :precision_max
124
+ PRECISION_MAX_CODEX: :precision_max_codex
85
125
 
86
126
  def self?.values: -> ::Array[Deeprails::Models::DefendSubmitEventParams::run_mode]
87
127
  end
@@ -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,139 @@
1
1
  module Deeprails
2
2
  module Models
3
3
  type defend_update_workflow_params =
4
- { description: String, name: String }
4
+ {
5
+ workflow_id: String,
6
+ automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
7
+ context_awareness: bool,
8
+ custom_hallucination_threshold_values: ::Hash[Symbol, Float],
9
+ description: String,
10
+ file_search: ::Array[String],
11
+ improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action,
12
+ max_improvement_attempts: Integer,
13
+ name: String,
14
+ threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type,
15
+ web_search: bool
16
+ }
5
17
  & Deeprails::Internal::Type::request_parameters
6
18
 
7
19
  class DefendUpdateWorkflowParams < Deeprails::Internal::Type::BaseModel
8
20
  extend Deeprails::Internal::Type::RequestParameters::Converter
9
21
  include Deeprails::Internal::Type::RequestParameters
10
22
 
23
+ attr_accessor workflow_id: String
24
+
25
+ attr_reader automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]?
26
+
27
+ def automatic_hallucination_tolerance_levels=: (
28
+ ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]
29
+ ) -> ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]
30
+
31
+ attr_reader context_awareness: bool?
32
+
33
+ def context_awareness=: (bool) -> bool
34
+
35
+ attr_reader custom_hallucination_threshold_values: ::Hash[Symbol, Float]?
36
+
37
+ def custom_hallucination_threshold_values=: (
38
+ ::Hash[Symbol, Float]
39
+ ) -> ::Hash[Symbol, Float]
40
+
11
41
  attr_reader description: String?
12
42
 
13
43
  def description=: (String) -> String
14
44
 
45
+ attr_reader file_search: ::Array[String]?
46
+
47
+ def file_search=: (::Array[String]) -> ::Array[String]
48
+
49
+ attr_reader improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action?
50
+
51
+ def improvement_action=: (
52
+ Deeprails::Models::DefendUpdateWorkflowParams::improvement_action
53
+ ) -> Deeprails::Models::DefendUpdateWorkflowParams::improvement_action
54
+
55
+ attr_reader max_improvement_attempts: Integer?
56
+
57
+ def max_improvement_attempts=: (Integer) -> Integer
58
+
15
59
  attr_reader name: String?
16
60
 
17
61
  def name=: (String) -> String
18
62
 
63
+ attr_reader threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type?
64
+
65
+ def threshold_type=: (
66
+ Deeprails::Models::DefendUpdateWorkflowParams::threshold_type
67
+ ) -> Deeprails::Models::DefendUpdateWorkflowParams::threshold_type
68
+
69
+ attr_reader web_search: bool?
70
+
71
+ def web_search=: (bool) -> bool
72
+
19
73
  def initialize: (
74
+ workflow_id: String,
75
+ ?automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
76
+ ?context_awareness: bool,
77
+ ?custom_hallucination_threshold_values: ::Hash[Symbol, Float],
20
78
  ?description: String,
79
+ ?file_search: ::Array[String],
80
+ ?improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action,
81
+ ?max_improvement_attempts: Integer,
21
82
  ?name: String,
83
+ ?threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type,
84
+ ?web_search: bool,
22
85
  ?request_options: Deeprails::request_opts
23
86
  ) -> void
24
87
 
25
88
  def to_hash: -> {
89
+ workflow_id: String,
90
+ automatic_hallucination_tolerance_levels: ::Hash[Symbol, Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level],
91
+ context_awareness: bool,
92
+ custom_hallucination_threshold_values: ::Hash[Symbol, Float],
26
93
  description: String,
94
+ file_search: ::Array[String],
95
+ improvement_action: Deeprails::Models::DefendUpdateWorkflowParams::improvement_action,
96
+ max_improvement_attempts: Integer,
27
97
  name: String,
98
+ threshold_type: Deeprails::Models::DefendUpdateWorkflowParams::threshold_type,
99
+ web_search: bool,
28
100
  request_options: Deeprails::RequestOptions
29
101
  }
102
+
103
+ type automatic_hallucination_tolerance_level = :low | :medium | :high
104
+
105
+ module AutomaticHallucinationToleranceLevel
106
+ extend Deeprails::Internal::Type::Enum
107
+
108
+ LOW: :low
109
+ MEDIUM: :medium
110
+ HIGH: :high
111
+
112
+ def self?.values: -> ::Array[Deeprails::Models::DefendUpdateWorkflowParams::automatic_hallucination_tolerance_level]
113
+ end
114
+
115
+ type improvement_action = :regen | :fixit | :do_nothing
116
+
117
+ module ImprovementAction
118
+ extend Deeprails::Internal::Type::Enum
119
+
120
+ REGEN: :regen
121
+ FIXIT: :fixit
122
+ DO_NOTHING: :do_nothing
123
+
124
+ def self?.values: -> ::Array[Deeprails::Models::DefendUpdateWorkflowParams::improvement_action]
125
+ end
126
+
127
+ type threshold_type = :automatic | :custom
128
+
129
+ module ThresholdType
130
+ extend Deeprails::Internal::Type::Enum
131
+
132
+ AUTOMATIC: :automatic
133
+ CUSTOM: :custom
134
+
135
+ def self?.values: -> ::Array[Deeprails::Models::DefendUpdateWorkflowParams::threshold_type]
136
+ end
30
137
  end
31
138
  end
32
139
  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,32 +197,54 @@ 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
- type run_mode = :precision_plus | :precision | :smart | :economy
231
+ type run_mode =
232
+ :super_fast
233
+ | :fast
234
+ | :precision
235
+ | :precision_codex
236
+ | :precision_max
237
+ | :precision_max_codex
205
238
 
206
239
  module RunMode
207
240
  extend Deeprails::Internal::Type::Enum
208
241
 
209
- PRECISION_PLUS: :precision_plus
242
+ SUPER_FAST: :super_fast
243
+ FAST: :fast
210
244
  PRECISION: :precision
211
- SMART: :smart
212
- ECONOMY: :economy
245
+ PRECISION_CODEX: :precision_codex
246
+ PRECISION_MAX: :precision_max
247
+ PRECISION_MAX_CODEX: :precision_max_codex
213
248
 
214
249
  def self?.values: -> ::Array[Deeprails::Models::MonitorDetailResponse::Evaluation::run_mode]
215
250
  end
@@ -150,15 +150,23 @@ module Deeprails
150
150
  }
151
151
  end
152
152
 
153
- type run_mode = :precision_plus | :precision | :smart | :economy
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
- PRECISION_PLUS: :precision_plus
164
+ SUPER_FAST: :super_fast
165
+ FAST: :fast
159
166
  PRECISION: :precision
160
- SMART: :smart
161
- ECONOMY: :economy
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 } & Deeprails::Internal::Type::request_parameters
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 } & Deeprails::Internal::Type::request_parameters
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
  }