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: , 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.
68 69 70 |
# File 'lib/openlayer/resources/projects/inference_pipelines.rb', line 68 def initialize(client:) @client = client end |
Instance Method Details
#create(project_id, description: , name: , project: nil, workspace: nil, request_options: {}) ⇒ Openlayer::Models::Projects::InferencePipelineCreateResponse
Create an inference pipeline in a project.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/openlayer/resources/projects/inference_pipelines.rb', line 26 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.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/openlayer/resources/projects/inference_pipelines.rb', line 54 def list(project_id, params = {}) parsed, = Openlayer::Projects::InferencePipelineListParams.dump_request(params) @client.request( method: :get, path: ["projects/%1$s/inference-pipelines", project_id], query: parsed.transform_keys(per_page: "perPage"), model: Openlayer::Models::Projects::InferencePipelineListResponse, options: ) end |