AI-PredictionClient

 view release on metacpan or  search on metacpan

lib/AI/PredictionClient/CPP/PredictionGrpcCpp.pm  view on Meta::CPAN

  PredictionClient(std::string server_port);
  std::string callPredict(std::string serialized_request_object);

private:
  std::unique_ptr<PredictionService::Stub> stub_;
  std::string to_base64(std::string text);
};

PredictionClient::PredictionClient(std::string server_port)
    : stub_(PredictionService::NewStub(grpc::CreateChannel(
          server_port, grpc::InsecureChannelCredentials()))) {}

std::string PredictionClient::callPredict(std::string serialized_request_object) {
  PredictRequest predictRequest;
  PredictResponse response;
  ClientContext context;
  std::string serialized_result_object;

  google::protobuf::util::JsonPrintOptions jprint_options;
  google::protobuf::util::JsonParseOptions jparse_options;



( run in 0.448 second using v1.01-cache-2.11-cpan-39bf76dae61 )