Service Client: Google::Ai::Generativelanguage::V1alpha::PredictionService::PredictionServiceClient

Client stub representing the remote PredictionService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to ai.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Ai::Generativelanguage::V1alpha::PredictionService - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1alpha/prediction_service.proto

SYNOPSIS

use Google::Ai::Generativelanguage::V1alpha::PredictionService;

my $msg = Google::Ai::Generativelanguage::V1alpha::PredictionService::PredictRequest->new({
    model => $model,
    instances => $instances,
    parameters => $parameters,
});

# Read or update a field
my $val = $msg->model();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Ai::Generativelanguage::V1alpha::PredictionService::PredictRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1alpha/prediction_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Ai::Generativelanguage::V1alpha::PredictionService::PredictRequest

Request message for [PredictionService.Predict][google.ai.generativelanguage.v1alpha.PredictionService.Predict].

Inherits from Protobuf::Message.

Accessors

  • $msg->model() / $msg->model($value)

    Type: String

    Required. The name of the model for prediction. Format: `name=models/{model}`.

  • $msg->instances() / $msg->instances($value)

    Type: Message (Google::Protobuf::Struct::Value)

    Required. The instances that are the input to the prediction call.

  • $msg->parameters() / $msg->parameters($value)

    Type: Message (Google::Protobuf::Struct::Value)

    Optional. The parameters that govern the prediction call.

Google::Ai::Generativelanguage::V1alpha::PredictionService::PredictResponse

Response message for [PredictionService.Predict].

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Ai::Generativelanguage::V1alpha::PredictionService::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.