Class protos.google.cloud.aiplatform.v1beta1.PredictionService (3.13.0)

Represents a PredictionService

Inheritance

$protobuf.rpc.Service > protos.google.cloud.aiplatform.v1beta1.PredictionService

Package

@google-cloud/aiplatform

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new PredictionService service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

countTokens(request, callback)

public countTokens(request: google.cloud.aiplatform.v1beta1.ICountTokensRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.CountTokensCallback): void;

Calls CountTokens.

Parameters
NameDescription
request ICountTokensRequest

CountTokensRequest message or plain object

callback CountTokensCallback

Node-style callback called with the error, if any, and CountTokensResponse

Returns
TypeDescription
void

countTokens(request)

public countTokens(request: google.cloud.aiplatform.v1beta1.ICountTokensRequest): Promise<google.cloud.aiplatform.v1beta1.CountTokensResponse>;

Calls CountTokens.

Parameter
NameDescription
request ICountTokensRequest

CountTokensRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.CountTokensResponse>

Promise

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PredictionService;

Creates new PredictionService service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
PredictionService

RPC service. Useful where requests and/or responses are streamed.

directPredict(request, callback)

public directPredict(request: google.cloud.aiplatform.v1beta1.IDirectPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.DirectPredictCallback): void;

Calls DirectPredict.

Parameters
NameDescription
request IDirectPredictRequest

DirectPredictRequest message or plain object

callback DirectPredictCallback

Node-style callback called with the error, if any, and DirectPredictResponse

Returns
TypeDescription
void

directPredict(request)

public directPredict(request: google.cloud.aiplatform.v1beta1.IDirectPredictRequest): Promise<google.cloud.aiplatform.v1beta1.DirectPredictResponse>;

Calls DirectPredict.

Parameter
NameDescription
request IDirectPredictRequest

DirectPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.DirectPredictResponse>

Promise

directRawPredict(request, callback)

public directRawPredict(request: google.cloud.aiplatform.v1beta1.IDirectRawPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.DirectRawPredictCallback): void;

Calls DirectRawPredict.

Parameters
NameDescription
request IDirectRawPredictRequest

DirectRawPredictRequest message or plain object

callback DirectRawPredictCallback

Node-style callback called with the error, if any, and DirectRawPredictResponse

Returns
TypeDescription
void

directRawPredict(request)

public directRawPredict(request: google.cloud.aiplatform.v1beta1.IDirectRawPredictRequest): Promise<google.cloud.aiplatform.v1beta1.DirectRawPredictResponse>;

Calls DirectRawPredict.

Parameter
NameDescription
request IDirectRawPredictRequest

DirectRawPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.DirectRawPredictResponse>

Promise

explain(request, callback)

public explain(request: google.cloud.aiplatform.v1beta1.IExplainRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.ExplainCallback): void;

Calls Explain.

Parameters
NameDescription
request IExplainRequest

ExplainRequest message or plain object

callback ExplainCallback

Node-style callback called with the error, if any, and ExplainResponse

Returns
TypeDescription
void

explain(request)

public explain(request: google.cloud.aiplatform.v1beta1.IExplainRequest): Promise<google.cloud.aiplatform.v1beta1.ExplainResponse>;

Calls Explain.

Parameter
NameDescription
request IExplainRequest

ExplainRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.ExplainResponse>

Promise

generateContent(request, callback)

public generateContent(request: google.cloud.aiplatform.v1beta1.IGenerateContentRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.GenerateContentCallback): void;

Calls GenerateContent.

Parameters
NameDescription
request IGenerateContentRequest

GenerateContentRequest message or plain object

callback GenerateContentCallback

Node-style callback called with the error, if any, and GenerateContentResponse

Returns
TypeDescription
void

generateContent(request)

public generateContent(request: google.cloud.aiplatform.v1beta1.IGenerateContentRequest): Promise<google.cloud.aiplatform.v1beta1.GenerateContentResponse>;

Calls GenerateContent.

Parameter
NameDescription
request IGenerateContentRequest

GenerateContentRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.GenerateContentResponse>

Promise

predict(request, callback)

public predict(request: google.cloud.aiplatform.v1beta1.IPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.PredictCallback): void;

Calls Predict.

Parameters
NameDescription
request IPredictRequest

PredictRequest message or plain object

callback PredictCallback

Node-style callback called with the error, if any, and PredictResponse

Returns
TypeDescription
void

predict(request)

public predict(request: google.cloud.aiplatform.v1beta1.IPredictRequest): Promise<google.cloud.aiplatform.v1beta1.PredictResponse>;

Calls Predict.

Parameter
NameDescription
request IPredictRequest

PredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.PredictResponse>

Promise

rawPredict(request, callback)

public rawPredict(request: google.cloud.aiplatform.v1beta1.IRawPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.RawPredictCallback): void;

Calls RawPredict.

Parameters
NameDescription
request IRawPredictRequest

RawPredictRequest message or plain object

callback RawPredictCallback

Node-style callback called with the error, if any, and HttpBody

Returns
TypeDescription
void

rawPredict(request)

public rawPredict(request: google.cloud.aiplatform.v1beta1.IRawPredictRequest): Promise<google.api.HttpBody>;

Calls RawPredict.

Parameter
NameDescription
request IRawPredictRequest

RawPredictRequest message or plain object

Returns
TypeDescription
Promise<google.api.HttpBody>

Promise

serverStreamingPredict(request, callback)

public serverStreamingPredict(request: google.cloud.aiplatform.v1beta1.IStreamingPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.ServerStreamingPredictCallback): void;

Calls ServerStreamingPredict.

Parameters
NameDescription
request IStreamingPredictRequest

StreamingPredictRequest message or plain object

callback ServerStreamingPredictCallback

Node-style callback called with the error, if any, and StreamingPredictResponse

Returns
TypeDescription
void

serverStreamingPredict(request)

public serverStreamingPredict(request: google.cloud.aiplatform.v1beta1.IStreamingPredictRequest): Promise<google.cloud.aiplatform.v1beta1.StreamingPredictResponse>;

Calls ServerStreamingPredict.

Parameter
NameDescription
request IStreamingPredictRequest

StreamingPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.StreamingPredictResponse>

Promise

streamDirectPredict(request, callback)

public streamDirectPredict(request: google.cloud.aiplatform.v1beta1.IStreamDirectPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.StreamDirectPredictCallback): void;

Calls StreamDirectPredict.

Parameters
NameDescription
request IStreamDirectPredictRequest

StreamDirectPredictRequest message or plain object

callback StreamDirectPredictCallback

Node-style callback called with the error, if any, and StreamDirectPredictResponse

Returns
TypeDescription
void

streamDirectPredict(request)

public streamDirectPredict(request: google.cloud.aiplatform.v1beta1.IStreamDirectPredictRequest): Promise<google.cloud.aiplatform.v1beta1.StreamDirectPredictResponse>;

Calls StreamDirectPredict.

Parameter
NameDescription
request IStreamDirectPredictRequest

StreamDirectPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.StreamDirectPredictResponse>

Promise

streamDirectRawPredict(request, callback)

public streamDirectRawPredict(request: google.cloud.aiplatform.v1beta1.IStreamDirectRawPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.StreamDirectRawPredictCallback): void;

Calls StreamDirectRawPredict.

Parameters
NameDescription
request IStreamDirectRawPredictRequest

StreamDirectRawPredictRequest message or plain object

callback StreamDirectRawPredictCallback

Node-style callback called with the error, if any, and StreamDirectRawPredictResponse

Returns
TypeDescription
void

streamDirectRawPredict(request)

public streamDirectRawPredict(request: google.cloud.aiplatform.v1beta1.IStreamDirectRawPredictRequest): Promise<google.cloud.aiplatform.v1beta1.StreamDirectRawPredictResponse>;

Calls StreamDirectRawPredict.

Parameter
NameDescription
request IStreamDirectRawPredictRequest

StreamDirectRawPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.StreamDirectRawPredictResponse>

Promise

streamGenerateContent(request, callback)

public streamGenerateContent(request: google.cloud.aiplatform.v1beta1.IGenerateContentRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.StreamGenerateContentCallback): void;

Calls StreamGenerateContent.

Parameters
NameDescription
request IGenerateContentRequest

GenerateContentRequest message or plain object

callback StreamGenerateContentCallback

Node-style callback called with the error, if any, and GenerateContentResponse

Returns
TypeDescription
void

streamGenerateContent(request)

public streamGenerateContent(request: google.cloud.aiplatform.v1beta1.IGenerateContentRequest): Promise<google.cloud.aiplatform.v1beta1.GenerateContentResponse>;

Calls StreamGenerateContent.

Parameter
NameDescription
request IGenerateContentRequest

GenerateContentRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.GenerateContentResponse>

Promise

streamingPredict(request, callback)

public streamingPredict(request: google.cloud.aiplatform.v1beta1.IStreamingPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.StreamingPredictCallback): void;

Calls StreamingPredict.

Parameters
NameDescription
request IStreamingPredictRequest

StreamingPredictRequest message or plain object

callback StreamingPredictCallback

Node-style callback called with the error, if any, and StreamingPredictResponse

Returns
TypeDescription
void

streamingPredict(request)

public streamingPredict(request: google.cloud.aiplatform.v1beta1.IStreamingPredictRequest): Promise<google.cloud.aiplatform.v1beta1.StreamingPredictResponse>;

Calls StreamingPredict.

Parameter
NameDescription
request IStreamingPredictRequest

StreamingPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.StreamingPredictResponse>

Promise

streamingRawPredict(request, callback)

public streamingRawPredict(request: google.cloud.aiplatform.v1beta1.IStreamingRawPredictRequest, callback: google.cloud.aiplatform.v1beta1.PredictionService.StreamingRawPredictCallback): void;

Calls StreamingRawPredict.

Parameters
NameDescription
request IStreamingRawPredictRequest

StreamingRawPredictRequest message or plain object

callback StreamingRawPredictCallback

Node-style callback called with the error, if any, and StreamingRawPredictResponse

Returns
TypeDescription
void

streamingRawPredict(request)

public streamingRawPredict(request: google.cloud.aiplatform.v1beta1.IStreamingRawPredictRequest): Promise<google.cloud.aiplatform.v1beta1.StreamingRawPredictResponse>;

Calls StreamingRawPredict.

Parameter
NameDescription
request IStreamingRawPredictRequest

StreamingRawPredictRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.aiplatform.v1beta1.StreamingRawPredictResponse>

Promise