Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.12.0"
".": "0.12.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 29
openapi_spec_hash: 20caa671b1b1a87c0a5cb6ebd7e4b064
config_hash: aaf12ae1da71c62ca5195fc2b66f657c
configured_endpoints: 31
openapi_spec_hash: a574ef9082e992c25120554886a9ab7a
config_hash: f8fb410519268f9f228074c9344acc1f
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.12.1 (2026-04-10)

Full Changelog: [v0.12.0...v0.12.1](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.12.0...v0.12.1)

### Bug Fixes

* multipart encoding for file arrays ([c8b1646](https://github.com/openlayer-ai/openlayer-ruby/commit/c8b16466f4d3c51e4aee14d34fc823e51bd949c4))


### Documentation

* **closes OPEN-9953:** expose endpoints to get and delete a row ([232488e](https://github.com/openlayer-ai/openlayer-ruby/commit/232488ec3989f0233017e289973125c5d489f247))

## 0.12.0 (2026-04-01)

Full Changelog: [v0.11.2...v0.12.0](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.11.2...v0.12.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
openlayer (0.12.0)
openlayer (0.12.1)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "openlayer", "~> 0.12.0"
gem "openlayer", "~> 0.12.1"
```

<!-- x-release-please-end -->
Expand Down
3 changes: 3 additions & 0 deletions lib/openlayer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@
require_relative "openlayer/models/inference_pipeline_retrieve_users_response"
require_relative "openlayer/models/inference_pipelines/data_stream_params"
require_relative "openlayer/models/inference_pipelines/data_stream_response"
require_relative "openlayer/models/inference_pipelines/row_delete_params"
require_relative "openlayer/models/inference_pipelines/row_list_params"
require_relative "openlayer/models/inference_pipelines/row_list_response"
require_relative "openlayer/models/inference_pipelines/row_retrieve_params"
require_relative "openlayer/models/inference_pipelines/row_retrieve_response"
require_relative "openlayer/models/inference_pipelines/row_update_params"
require_relative "openlayer/models/inference_pipelines/row_update_response"
require_relative "openlayer/models/inference_pipelines/test_result_list_params"
Expand Down
4 changes: 3 additions & 1 deletion lib/openlayer/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ def encode_query_params(query)
#
# @return [Array(String, Enumerable<String>)]
private def encode_multipart_streaming(body)
# rubocop:disable Style/CaseEquality
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
boundary = SecureRandom.urlsafe_base64(46)

Expand All @@ -619,7 +620,7 @@ def encode_query_params(query)
in Hash
body.each do |key, val|
case val
in Array if val.all? { primitive?(_1) }
in Array if val.all? { primitive?(_1) || Openlayer::Internal::Type::FileInput === _1 }
val.each do |v|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
end
Expand All @@ -635,6 +636,7 @@ def encode_query_params(query)

fused_io = fused_enum(strio) { closing.each(&:call) }
[boundary, fused_io]
# rubocop:enable Style/CaseEquality
end

# @api private
Expand Down
28 changes: 28 additions & 0 deletions lib/openlayer/models/inference_pipelines/row_delete_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# frozen_string_literal: true

module Openlayer
module Models
module InferencePipelines
# @see Openlayer::Resources::InferencePipelines::Rows#delete
class RowDeleteParams < Openlayer::Internal::Type::BaseModel
extend Openlayer::Internal::Type::RequestParameters::Converter
include Openlayer::Internal::Type::RequestParameters

# @!attribute inference_pipeline_id
#
# @return [String]
required :inference_pipeline_id, String

# @!attribute inference_id
#
# @return [String]
required :inference_id, String

# @!method initialize(inference_pipeline_id:, inference_id:, request_options: {})
# @param inference_pipeline_id [String]
# @param inference_id [String]
# @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
end
end
end
end
28 changes: 28 additions & 0 deletions lib/openlayer/models/inference_pipelines/row_retrieve_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# frozen_string_literal: true

module Openlayer
module Models
module InferencePipelines
# @see Openlayer::Resources::InferencePipelines::Rows#retrieve
class RowRetrieveParams < Openlayer::Internal::Type::BaseModel
extend Openlayer::Internal::Type::RequestParameters::Converter
include Openlayer::Internal::Type::RequestParameters

# @!attribute inference_pipeline_id
#
# @return [String]
required :inference_pipeline_id, String

# @!attribute inference_id
#
# @return [String]
required :inference_id, String

# @!method initialize(inference_pipeline_id:, inference_id:, request_options: {})
# @param inference_pipeline_id [String]
# @param inference_id [String]
# @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}]
end
end
end
end
24 changes: 24 additions & 0 deletions lib/openlayer/models/inference_pipelines/row_retrieve_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# frozen_string_literal: true

module Openlayer
module Models
module InferencePipelines
# @see Openlayer::Resources::InferencePipelines::Rows#retrieve
class RowRetrieveResponse < Openlayer::Internal::Type::BaseModel
# @!attribute row
#
# @return [Object, nil]
optional :row, Openlayer::Internal::Type::Unknown

# @!attribute success
#
# @return [Boolean, nil]
optional :success, Openlayer::Internal::Type::Boolean

# @!method initialize(row: nil, success: nil)
# @param row [Object]
# @param success [Boolean]
end
end
end
end
55 changes: 55 additions & 0 deletions lib/openlayer/resources/inference_pipelines/rows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ module Openlayer
module Resources
class InferencePipelines
class Rows
# Fetch a single inference pipeline row by inference ID, including OTel steps.
#
# @overload retrieve(inference_id, inference_pipeline_id:, request_options: {})
#
# @param inference_id [String]
#
# @param inference_pipeline_id [String] The inference pipeline id (a UUID).
#
# @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [Openlayer::Models::InferencePipelines::RowRetrieveResponse]
#
# @see Openlayer::Models::InferencePipelines::RowRetrieveParams
def retrieve(inference_id, params)
parsed, options = Openlayer::InferencePipelines::RowRetrieveParams.dump_request(params)
inference_pipeline_id =
parsed.delete(:inference_pipeline_id) do
raise ArgumentError.new("missing required path argument #{_1}")
end
@client.request(
method: :get,
path: ["inference-pipelines/%1$s/rows/%2$s", inference_pipeline_id, inference_id],
model: Openlayer::Models::InferencePipelines::RowRetrieveResponse,
options: options
)
end

# Update an inference data point in an inference pipeline.
#
# @overload update(inference_pipeline_id, inference_id:, row:, config: nil, request_options: {})
Expand Down Expand Up @@ -82,6 +109,34 @@ def list(inference_pipeline_id, params = {})
)
end

# Delete a single inference pipeline row by inference ID. Only project admins can
# perform this action.
#
# @overload delete(inference_id, inference_pipeline_id:, request_options: {})
#
# @param inference_id [String]
#
# @param inference_pipeline_id [String] The inference pipeline id (a UUID).
#
# @param request_options [Openlayer::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [nil]
#
# @see Openlayer::Models::InferencePipelines::RowDeleteParams
def delete(inference_id, params)
parsed, options = Openlayer::InferencePipelines::RowDeleteParams.dump_request(params)
inference_pipeline_id =
parsed.delete(:inference_pipeline_id) do
raise ArgumentError.new("missing required path argument #{_1}")
end
@client.request(
method: :delete,
path: ["inference-pipelines/%1$s/rows/%2$s", inference_pipeline_id, inference_id],
model: NilClass,
options: options
)
end

# @api private
#
# @param client [Openlayer::Client]
Expand Down
2 changes: 1 addition & 1 deletion lib/openlayer/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Openlayer
VERSION = "0.12.0"
VERSION = "0.12.1"
end
48 changes: 48 additions & 0 deletions rbi/openlayer/models/inference_pipelines/row_delete_params.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# typed: strong

module Openlayer
module Models
module InferencePipelines
class RowDeleteParams < Openlayer::Internal::Type::BaseModel
extend Openlayer::Internal::Type::RequestParameters::Converter
include Openlayer::Internal::Type::RequestParameters

OrHash =
T.type_alias do
T.any(
Openlayer::InferencePipelines::RowDeleteParams,
Openlayer::Internal::AnyHash
)
end

sig { returns(String) }
attr_accessor :inference_pipeline_id

sig { returns(String) }
attr_accessor :inference_id

sig do
params(
inference_pipeline_id: String,
inference_id: String,
request_options: Openlayer::RequestOptions::OrHash
).returns(T.attached_class)
end
def self.new(inference_pipeline_id:, inference_id:, request_options: {})
end

sig do
override.returns(
{
inference_pipeline_id: String,
inference_id: String,
request_options: Openlayer::RequestOptions
}
)
end
def to_hash
end
end
end
end
end
48 changes: 48 additions & 0 deletions rbi/openlayer/models/inference_pipelines/row_retrieve_params.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# typed: strong

module Openlayer
module Models
module InferencePipelines
class RowRetrieveParams < Openlayer::Internal::Type::BaseModel
extend Openlayer::Internal::Type::RequestParameters::Converter
include Openlayer::Internal::Type::RequestParameters

OrHash =
T.type_alias do
T.any(
Openlayer::InferencePipelines::RowRetrieveParams,
Openlayer::Internal::AnyHash
)
end

sig { returns(String) }
attr_accessor :inference_pipeline_id

sig { returns(String) }
attr_accessor :inference_id

sig do
params(
inference_pipeline_id: String,
inference_id: String,
request_options: Openlayer::RequestOptions::OrHash
).returns(T.attached_class)
end
def self.new(inference_pipeline_id:, inference_id:, request_options: {})
end

sig do
override.returns(
{
inference_pipeline_id: String,
inference_id: String,
request_options: Openlayer::RequestOptions
}
)
end
def to_hash
end
end
end
end
end
39 changes: 39 additions & 0 deletions rbi/openlayer/models/inference_pipelines/row_retrieve_response.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# typed: strong

module Openlayer
module Models
module InferencePipelines
class RowRetrieveResponse < Openlayer::Internal::Type::BaseModel
OrHash =
T.type_alias do
T.any(
Openlayer::Models::InferencePipelines::RowRetrieveResponse,
Openlayer::Internal::AnyHash
)
end

sig { returns(T.nilable(T.anything)) }
attr_reader :row

sig { params(row: T.anything).void }
attr_writer :row

sig { returns(T.nilable(T::Boolean)) }
attr_reader :success

sig { params(success: T::Boolean).void }
attr_writer :success

sig do
params(row: T.anything, success: T::Boolean).returns(T.attached_class)
end
def self.new(row: nil, success: nil)
end

sig { override.returns({ row: T.anything, success: T::Boolean }) }
def to_hash
end
end
end
end
end
Loading