getHandlerList(); $list->appendBuild($this->predictEndpoint(), 'ml.predict_endpoint'); } /** * Changes the endpoint of the Predict operation to the provided endpoint. * * @return callable */ private function predictEndpoint() { return static function (callable $handler) { return function ( CommandInterface $command, RequestInterface $request = null ) use ($handler) { if ($command->getName() === 'Predict') { $request = $request->withUri(new Uri($command['PredictEndpoint'])); } return $handler($command, $request); }; }; } }