Represents a LlmUtilityService
Inheritance
$protobuf.rpc.Service > protos.google.cloud.aiplatform.v1beta1.LlmUtilityServicePackage
@google-cloud/aiplatformConstructors
(constructor)(rpcImpl, requestDelimited, responseDelimited)
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new LlmUtilityService service.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Name | Description |
request |
IComputeTokensRequest
ComputeTokensRequest message or plain object |
callback |
ComputeTokensCallback
Node-style callback called with the error, if any, and ComputeTokensResponse |
Returns | |
---|---|
Type | Description |
void |
computeTokens(request)
public computeTokens(request: google.cloud.aiplatform.v1beta1.IComputeTokensRequest): Promise<google.cloud.aiplatform.v1beta1.ComputeTokensResponse>;
Calls ComputeTokens.
Parameter | |
---|---|
Name | Description |
request |
IComputeTokensRequest
ComputeTokensRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
ICountTokensRequest
CountTokensRequest message or plain object |
callback |
CountTokensCallback
Node-style callback called with the error, if any, and CountTokensResponse |
Returns | |
---|---|
Type | Description |
void |
countTokens(request)
public countTokens(request: google.cloud.aiplatform.v1beta1.ICountTokensRequest): Promise<google.cloud.aiplatform.v1beta1.CountTokensResponse>;
Calls CountTokens.
Parameter | |
---|---|
Name | Description |
request |
ICountTokensRequest
CountTokensRequest message or plain object |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
rpcImpl |
$protobuf.RPCImpl
RPC implementation |
requestDelimited |
boolean
Whether requests are length-delimited |
responseDelimited |
boolean
Whether responses are length-delimited |
Returns | |
---|---|
Type | Description |
LlmUtilityService | RPC service. Useful where requests and/or responses are streamed. |