openlayer 0.11.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d475908d0a1f51b7480b1d9094aced4d62421f32dbe90118eddfcdddb8806192
4
- data.tar.gz: 459acbfe236cd6e52fde0381c517500f27df9085d8501b850cba0b649342acaa
3
+ metadata.gz: f04a416055cd159ce3d2f0ae5a9e63d70f8a7e1559e33dc11dce9ff2ffe0dd1b
4
+ data.tar.gz: d3781b5b15427edb154c788b71abdb35fa52b3de17d3a64e4aba77d80f066fc1
5
5
  SHA512:
6
- metadata.gz: 1a8433105072a5235da9f92fd81e753ae539d1fb3fb18198872b3b6ea548a87eb7f83afa6761bd2ed53b0db05a7cbbdb9e32ccc9254a87361ad3f39adc90af35
7
- data.tar.gz: a3f7eb91d3cbafd5b2191830bc7c13bce6336a10fe4cd68d6d7d4030f0584e16b457d1e94c6b2412424dc53235b7d2cd25f9b13260c74a64d37161e68c73fde0
6
+ metadata.gz: 9532865d2c62fbf6ec93aa57a0b6702045cb8e8f4e9bacea0ab15a41d3a7fa63ec31e6e3411817552365e4bcd422990b44c5b5eb3b1e5593cfad187063640624
7
+ data.tar.gz: 4d0096fe405da60b58e2982e0431772078e699eac24779a3dc60e893bf7d68fe70dfefa0bc9fa65e728ffc0558a00fd3b2b79d16d312fd6c26cb5e165ca09341
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.0 (2026-04-01)
4
+
5
+ Full Changelog: [v0.11.2...v0.12.0](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.11.2...v0.12.0)
6
+
7
+ ### Features
8
+
9
+ * Cid/fetching endpoints ([8295c08](https://github.com/openlayer-ai/openlayer-ruby/commit/8295c08689e01d33e8b21fd93028da4df3e8269f))
10
+
3
11
  ## 0.11.2 (2026-04-01)
4
12
 
5
13
  Full Changelog: [v0.11.1...v0.11.2](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.11.1...v0.11.2)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "openlayer", "~> 0.11.2"
20
+ gem "openlayer", "~> 0.12.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,278 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ # @see Openlayer::Resources::InferencePipelines#retrieve_sessions
6
+ class InferencePipelineRetrieveSessionsParams < Openlayer::Internal::Type::BaseModel
7
+ extend Openlayer::Internal::Type::RequestParameters::Converter
8
+ include Openlayer::Internal::Type::RequestParameters
9
+
10
+ # @!attribute inference_pipeline_id
11
+ #
12
+ # @return [String]
13
+ required :inference_pipeline_id, String
14
+
15
+ # @!attribute asc
16
+ # Whether or not to sort on the sortColumn in ascending order.
17
+ #
18
+ # @return [Boolean, nil]
19
+ optional :asc, Openlayer::Internal::Type::Boolean
20
+
21
+ # @!attribute page
22
+ # The page to return in a paginated query.
23
+ #
24
+ # @return [Integer, nil]
25
+ optional :page, Integer
26
+
27
+ # @!attribute per_page
28
+ # Maximum number of items to return per page.
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :per_page, Integer
32
+
33
+ # @!attribute sort_column
34
+ # Name of the column to sort on
35
+ #
36
+ # @return [String, nil]
37
+ optional :sort_column, String
38
+
39
+ # @!attribute column_filters
40
+ #
41
+ # @return [Array<Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter>, nil]
42
+ optional :column_filters,
43
+ -> {
44
+ Openlayer::Internal::Type::ArrayOf[union: Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter]
45
+ },
46
+ api_name: :columnFilters,
47
+ nil?: true
48
+
49
+ # @!attribute exclude_row_id_list
50
+ #
51
+ # @return [Array<Integer>, nil]
52
+ optional :exclude_row_id_list,
53
+ Openlayer::Internal::Type::ArrayOf[Integer],
54
+ api_name: :excludeRowIdList,
55
+ nil?: true
56
+
57
+ # @!attribute not_search_query_and
58
+ #
59
+ # @return [Array<String>, nil]
60
+ optional :not_search_query_and,
61
+ Openlayer::Internal::Type::ArrayOf[String],
62
+ api_name: :notSearchQueryAnd,
63
+ nil?: true
64
+
65
+ # @!attribute not_search_query_or
66
+ #
67
+ # @return [Array<String>, nil]
68
+ optional :not_search_query_or,
69
+ Openlayer::Internal::Type::ArrayOf[String],
70
+ api_name: :notSearchQueryOr,
71
+ nil?: true
72
+
73
+ # @!attribute row_id_list
74
+ #
75
+ # @return [Array<Integer>, nil]
76
+ optional :row_id_list, Openlayer::Internal::Type::ArrayOf[Integer], api_name: :rowIdList, nil?: true
77
+
78
+ # @!attribute search_query_and
79
+ #
80
+ # @return [Array<String>, nil]
81
+ optional :search_query_and,
82
+ Openlayer::Internal::Type::ArrayOf[String],
83
+ api_name: :searchQueryAnd,
84
+ nil?: true
85
+
86
+ # @!attribute search_query_or
87
+ #
88
+ # @return [Array<String>, nil]
89
+ optional :search_query_or,
90
+ Openlayer::Internal::Type::ArrayOf[String],
91
+ api_name: :searchQueryOr,
92
+ nil?: true
93
+
94
+ # @!method initialize(inference_pipeline_id:, asc: nil, page: nil, per_page: nil, sort_column: nil, column_filters: nil, exclude_row_id_list: nil, not_search_query_and: nil, not_search_query_or: nil, row_id_list: nil, search_query_and: nil, search_query_or: nil, request_options: {})
95
+ # @param inference_pipeline_id [String]
96
+ #
97
+ # @param asc [Boolean] Whether or not to sort on the sortColumn in ascending order.
98
+ #
99
+ # @param page [Integer] The page to return in a paginated query.
100
+ #
101
+ # @param per_page [Integer] Maximum number of items to return per page.
102
+ #
103
+ # @param sort_column [String] Name of the column to sort on
104
+ #
105
+ # @param column_filters [Array<Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter>, nil]
106
+ #
107
+ # @param exclude_row_id_list [Array<Integer>, nil]
108
+ #
109
+ # @param not_search_query_and [Array<String>, nil]
110
+ #
111
+ # @param not_search_query_or [Array<String>, nil]
112
+ #
113
+ # @param row_id_list [Array<Integer>, nil]
114
+ #
115
+ # @param search_query_and [Array<String>, nil]
116
+ #
117
+ # @param search_query_or [Array<String>, nil]
118
+ #
119
+ # @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
120
+
121
+ module ColumnFilter
122
+ extend Openlayer::Internal::Type::Union
123
+
124
+ variant -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter }
125
+
126
+ variant -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter }
127
+
128
+ variant -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter }
129
+
130
+ class SetColumnFilter < Openlayer::Internal::Type::BaseModel
131
+ # @!attribute measurement
132
+ # The name of the column.
133
+ #
134
+ # @return [String]
135
+ required :measurement, String
136
+
137
+ # @!attribute operator
138
+ #
139
+ # @return [Symbol, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter::Operator]
140
+ required :operator,
141
+ enum: -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter::Operator }
142
+
143
+ # @!attribute value
144
+ #
145
+ # @return [Array<String, Float>]
146
+ required :value,
147
+ -> { Openlayer::Internal::Type::ArrayOf[union: Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter::Value] }
148
+
149
+ # @!method initialize(measurement:, operator:, value:)
150
+ # @param measurement [String] The name of the column.
151
+ #
152
+ # @param operator [Symbol, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter::Operator]
153
+ #
154
+ # @param value [Array<String, Float>]
155
+
156
+ # @see Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter#operator
157
+ module Operator
158
+ extend Openlayer::Internal::Type::Enum
159
+
160
+ CONTAINS_NONE = :contains_none
161
+ CONTAINS_ANY = :contains_any
162
+ CONTAINS_ALL = :contains_all
163
+ ONE_OF = :one_of
164
+ NONE_OF = :none_of
165
+
166
+ # @!method self.values
167
+ # @return [Array<Symbol>]
168
+ end
169
+
170
+ module Value
171
+ extend Openlayer::Internal::Type::Union
172
+
173
+ variant String
174
+
175
+ variant Float
176
+
177
+ # @!method self.variants
178
+ # @return [Array(String, Float)]
179
+ end
180
+ end
181
+
182
+ class NumericColumnFilter < Openlayer::Internal::Type::BaseModel
183
+ # @!attribute measurement
184
+ # The name of the column.
185
+ #
186
+ # @return [String]
187
+ required :measurement, String
188
+
189
+ # @!attribute operator
190
+ #
191
+ # @return [Symbol, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter::Operator]
192
+ required :operator,
193
+ enum: -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter::Operator }
194
+
195
+ # @!attribute value
196
+ #
197
+ # @return [Float, nil]
198
+ required :value, Float, nil?: true
199
+
200
+ # @!method initialize(measurement:, operator:, value:)
201
+ # @param measurement [String] The name of the column.
202
+ #
203
+ # @param operator [Symbol, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter::Operator]
204
+ #
205
+ # @param value [Float, nil]
206
+
207
+ # @see Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter#operator
208
+ module Operator
209
+ extend Openlayer::Internal::Type::Enum
210
+
211
+ GREATER = :>
212
+ GREATER_OR_EQUALS = :">="
213
+ IS = :is
214
+ LESS = :<
215
+ LESS_OR_EQUALS = :"<="
216
+ NOT_EQUALS = :"!="
217
+
218
+ # @!method self.values
219
+ # @return [Array<Symbol>]
220
+ end
221
+ end
222
+
223
+ class StringColumnFilter < Openlayer::Internal::Type::BaseModel
224
+ # @!attribute measurement
225
+ # The name of the column.
226
+ #
227
+ # @return [String]
228
+ required :measurement, String
229
+
230
+ # @!attribute operator
231
+ #
232
+ # @return [Symbol, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter::Operator]
233
+ required :operator,
234
+ enum: -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter::Operator }
235
+
236
+ # @!attribute value
237
+ #
238
+ # @return [String, Boolean]
239
+ required :value,
240
+ union: -> { Openlayer::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter::Value }
241
+
242
+ # @!method initialize(measurement:, operator:, value:)
243
+ # @param measurement [String] The name of the column.
244
+ #
245
+ # @param operator [Symbol, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter::Operator]
246
+ #
247
+ # @param value [String, Boolean]
248
+
249
+ # @see Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter#operator
250
+ module Operator
251
+ extend Openlayer::Internal::Type::Enum
252
+
253
+ IS = :is
254
+ NOT_EQUALS = :"!="
255
+
256
+ # @!method self.values
257
+ # @return [Array<Symbol>]
258
+ end
259
+
260
+ # @see Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter#value
261
+ module Value
262
+ extend Openlayer::Internal::Type::Union
263
+
264
+ variant String
265
+
266
+ variant Openlayer::Internal::Type::Boolean
267
+
268
+ # @!method self.variants
269
+ # @return [Array(String, Boolean)]
270
+ end
271
+ end
272
+
273
+ # @!method self.variants
274
+ # @return [Array(Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::SetColumnFilter, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::NumericColumnFilter, Openlayer::Models::InferencePipelineRetrieveSessionsParams::ColumnFilter::StringColumnFilter)]
275
+ end
276
+ end
277
+ end
278
+ end
@@ -0,0 +1,121 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Openlayer
4
+ module Models
5
+ # @see Openlayer::Resources::InferencePipelines#retrieve_sessions
6
+ class InferencePipelineRetrieveSessionsResponse < Openlayer::Internal::Type::BaseModel
7
+ # @!attribute items
8
+ # Array of session aggregation data
9
+ #
10
+ # @return [Array<Openlayer::Models::InferencePipelineRetrieveSessionsResponse::Item>]
11
+ required :items,
12
+ -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::InferencePipelineRetrieveSessionsResponse::Item] }
13
+
14
+ # @!method initialize(items:)
15
+ # @param items [Array<Openlayer::Models::InferencePipelineRetrieveSessionsResponse::Item>] Array of session aggregation data
16
+
17
+ class Item < Openlayer::Internal::Type::BaseModel
18
+ # @!attribute id
19
+ # The unique session identifier
20
+ #
21
+ # @return [String]
22
+ required :id, String
23
+
24
+ # @!attribute cost
25
+ # Total cost for the session
26
+ #
27
+ # @return [Float]
28
+ required :cost, Float
29
+
30
+ # @!attribute date_created
31
+ # Latest/most recent timestamp in the session
32
+ #
33
+ # @return [Time]
34
+ required :date_created, Time, api_name: :dateCreated
35
+
36
+ # @!attribute date_of_first_record
37
+ # Timestamp of the first request in the session
38
+ #
39
+ # @return [Time]
40
+ required :date_of_first_record, Time, api_name: :dateOfFirstRecord
41
+
42
+ # @!attribute date_of_last_record
43
+ # Timestamp of the last request in the session
44
+ #
45
+ # @return [Time]
46
+ required :date_of_last_record, Time, api_name: :dateOfLastRecord
47
+
48
+ # @!attribute duration
49
+ # Duration between first and last request (in milliseconds)
50
+ #
51
+ # @return [Float]
52
+ required :duration, Float
53
+
54
+ # @!attribute first_record
55
+ # The complete first record in the session
56
+ #
57
+ # @return [Hash{Symbol=>Object}]
58
+ required :first_record,
59
+ Openlayer::Internal::Type::HashOf[Openlayer::Internal::Type::Unknown],
60
+ api_name: :firstRecord
61
+
62
+ # @!attribute last_record
63
+ # The complete last record in the session
64
+ #
65
+ # @return [Hash{Symbol=>Object}]
66
+ required :last_record,
67
+ Openlayer::Internal::Type::HashOf[Openlayer::Internal::Type::Unknown],
68
+ api_name: :lastRecord
69
+
70
+ # @!attribute latency
71
+ # Total latency for the session (in milliseconds)
72
+ #
73
+ # @return [Float]
74
+ required :latency, Float
75
+
76
+ # @!attribute records
77
+ # Total number of records/traces in the session
78
+ #
79
+ # @return [Integer]
80
+ required :records, Integer
81
+
82
+ # @!attribute tokens
83
+ # Total token count for the session
84
+ #
85
+ # @return [Float]
86
+ required :tokens, Float
87
+
88
+ # @!attribute user_ids
89
+ # List of unique user IDs that participated in this session
90
+ #
91
+ # @return [Array<String>]
92
+ required :user_ids, Openlayer::Internal::Type::ArrayOf[String], api_name: :userIds
93
+
94
+ # @!method initialize(id:, cost:, date_created:, date_of_first_record:, date_of_last_record:, duration:, first_record:, last_record:, latency:, records:, tokens:, user_ids:)
95
+ # @param id [String] The unique session identifier
96
+ #
97
+ # @param cost [Float] Total cost for the session
98
+ #
99
+ # @param date_created [Time] Latest/most recent timestamp in the session
100
+ #
101
+ # @param date_of_first_record [Time] Timestamp of the first request in the session
102
+ #
103
+ # @param date_of_last_record [Time] Timestamp of the last request in the session
104
+ #
105
+ # @param duration [Float] Duration between first and last request (in milliseconds)
106
+ #
107
+ # @param first_record [Hash{Symbol=>Object}] The complete first record in the session
108
+ #
109
+ # @param last_record [Hash{Symbol=>Object}] The complete last record in the session
110
+ #
111
+ # @param latency [Float] Total latency for the session (in milliseconds)
112
+ #
113
+ # @param records [Integer] Total number of records/traces in the session
114
+ #
115
+ # @param tokens [Float] Total token count for the session
116
+ #
117
+ # @param user_ids [Array<String>] List of unique user IDs that participated in this session
118
+ end
119
+ end
120
+ end
121
+ end