Class: Replicate::Record::ModelVersion

Inherits:
Base
  • Object
show all
Defined in:
lib/replicate/record/model_version.rb

Instance Attribute Summary

Attributes inherited from Base

#client, #data

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #method_missing

Constructor Details

This class inherits a constructor from Replicate::Record::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Replicate::Record::Base

Instance Method Details

#predict(input, webhook_completed = nil) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/replicate/record/model_version.rb', line 6

def predict(input, webhook_completed = nil)
  params = {}
  params[:version] = id
  params[:input] = input
  params[:webhook_completed] = webhook_completed
  client.create_prediction(params)
end