Class protos.google.cloud.aiplatform.v1beta1.LlmUtilityService (3.11.0)

Represents a LlmUtilityService

Inheritance

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

Package

@google-cloud/aiplatform

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

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

Constructs a new LlmUtilityService service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

computeTokens(request, callback)

public computeTokens(request: google.cloud.aiplatform.v1beta1.IComputeTokensRequest, callback: google.cloud.aiplatform.v1beta1.LlmUtilityService.ComputeTokensCallback): void;

Calls ComputeTokens.

Parameters
NameDescription
request IComputeTokensRequest

ComputeTokensRequest message or plain object

callback ComputeTokensCallback

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

Returns
TypeDescription
void

computeTokens(request)

public computeTokens(request: google.cloud.aiplatform.v1beta1.IComputeTokensRequest): Promise<google.cloud.aiplatform.v1beta1.ComputeTokensResponse>;

Calls ComputeTokens.

Parameter
NameDescription
request IComputeTokensRequest

ComputeTokensRequest message or plain object

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

Promise

countTokens(request, callback)

public countTokens(request: google.cloud.aiplatform.v1beta1.ICountTokensRequest, callback: google.cloud.aiplatform.v1beta1.LlmUtilityService.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): LlmUtilityService;

Creates new LlmUtilityService 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
LlmUtilityService

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