Class: Openlayer::Resources::Projects::InferencePipelines
- Inherits:
-
Object
- Object
- Openlayer::Resources::Projects::InferencePipelines
- Defined in:
- lib/openlayer/resources/projects/inference_pipelines.rb
Instance Method Summary collapse
-
#create(project_id, description:, name:, data_backend: nil, project: nil, workspace: nil, request_options: {}) ⇒ Openlayer::Models::Projects::InferencePipelineCreateResponse
Create an inference pipeline in a project.
-
#initialize(client:) ⇒ InferencePipelines
constructor
private
A new instance of InferencePipelines.
-
#list(project_id, name: nil, page: nil, per_page: nil, request_options: {}) ⇒ Openlayer::Models::Projects::InferencePipelineListResponse
List the inference pipelines in a project.
Constructor Details
#initialize(client:) ⇒ InferencePipelines
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InferencePipelines.
71 72 73 |
# File 'lib/openlayer/resources/projects/inference_pipelines.rb', line 71 def initialize(client:) @client = client end |
Instance Method Details
#create(project_id, description:, name:, data_backend: nil, project: nil, workspace: nil, request_options: {}) ⇒ Openlayer::Models::Projects::InferencePipelineCreateResponse
Create an inference pipeline in a project.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/openlayer/resources/projects/inference_pipelines.rb', line 28 def create(project_id, params) parsed, = Openlayer::Projects::InferencePipelineCreateParams.dump_request(params) @client.request( method: :post, path: ["projects/%1$s/inference-pipelines", project_id], body: parsed, model: Openlayer::Models::Projects::InferencePipelineCreateResponse, options: ) end |
#list(project_id, name: nil, page: nil, per_page: nil, request_options: {}) ⇒ Openlayer::Models::Projects::InferencePipelineListResponse
List the inference pipelines in a project.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/openlayer/resources/projects/inference_pipelines.rb', line 56 def list(project_id, params = {}) parsed, = Openlayer::Projects::InferencePipelineListParams.dump_request(params) query = Openlayer::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["projects/%1$s/inference-pipelines", project_id], query: query.transform_keys(per_page: "perPage"), model: Openlayer::Models::Projects::InferencePipelineListResponse, options: ) end |