It's inflexible. It can't accommodate future changes to requirements for creating a prediction. For example, creating predictions for a model without a version or for a deployment.
Its last arguments are vague. There's no clue for what nil for webhook and false for stream mean at the call site.
This PR explores a new approach that uses functional arguments. For backwards compatibility, it adds new CreatePredictionWithOptions and CreateTrainingWithOptions methods, and ports the existing create methods to wrap them. In a future release, we could deprecate these older create methods and rename CreatePredictionWithOptions to CreatePrediction.
The method signature for
CreatePrediction
is less than ideal:nil
for webhook andfalse
for stream mean at the call site.This PR explores a new approach that uses functional arguments. For backwards compatibility, it adds new
CreatePredictionWithOptions
andCreateTrainingWithOptions
methods, and ports the existing create methods to wrap them. In a future release, we could deprecate these older create methods and renameCreatePredictionWithOptions
toCreatePrediction
.