Class: Openlayer::Resources::Projects::InferencePipelines

Inherits:
Object
  • Object
show all
Defined in:
lib/openlayer/resources/projects/inference_pipelines.rb

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



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, options = 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: 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.

Parameters:

  • project_id (String)

    The project id.

  • name (String)

    Filter list of items by name.

  • page (Integer)

    The page to return in a paginated query.

  • per_page (Integer)

    Maximum number of items to return per page.

  • request_options (Openlayer::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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, options = 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: options
  )
end