Class: Replicate::Client
- Inherits:
-
Object
- Object
- Replicate::Client
- Includes:
- Model, Prediction, Training, Upload, Configurable
- Defined in:
- lib/replicate/client.rb,
lib/replicate/client/model.rb,
lib/replicate/client/upload.rb,
lib/replicate/client/training.rb,
lib/replicate/client/prediction.rb
Defined Under Namespace
Modules: Model, Prediction, Training, Upload
Instance Attribute Summary
Attributes included from Configurable
#api_endpoint_url, #api_token, #dreambooth_endpoint_url, #webhook_url
Instance Method Summary collapse
- #api_endpoint ⇒ Object
- #dreambooth_endpoint ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Training
#create_training, #retrieve_training
Methods included from Upload
#create_upload, #update_upload, #upload_zip
Methods included from Prediction
#cancel_prediction, #create_prediction, #list_predictions, #retrieve_prediction
Methods included from Model
#retrieve_collection, #retrieve_model
Methods included from Configurable
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
20 21 22 23 24 25 26 |
# File 'lib/replicate/client.rb', line 20 def initialize( = {}) # Use options passed in, but fall back to module defaults Replicate::Configurable.keys.each do |key| value = .key?(key) ? [key] : Replicate.instance_variable_get(:"@#{key}") instance_variable_set(:"@#{key}", value) end end |