Cloud AI Platform v1 API - Class LlmUtilityService.LlmUtilityServiceBase (2.26.0)

[BindServiceMethod(typeof(LlmUtilityService), "BindService")]
public abstract class LlmUtilityService.LlmUtilityServiceBase

Reference documentation and code samples for the Cloud AI Platform v1 API class LlmUtilityService.LlmUtilityServiceBase.

Base class for server-side implementations of LlmUtilityService

Inheritance

object > LlmUtilityService.LlmUtilityServiceBase

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Methods

ComputeTokens(ComputeTokensRequest, ServerCallContext)

public virtual Task<ComputeTokensResponse> ComputeTokens(ComputeTokensRequest request, ServerCallContext context)

Return a list of tokens based on the input text.

Parameters
NameDescription
requestComputeTokensRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskComputeTokensResponse

The response to send back to the client (wrapped by a task).

CountTokens(CountTokensRequest, ServerCallContext)

public virtual Task<CountTokensResponse> CountTokens(CountTokensRequest request, ServerCallContext context)

Perform a token counting.

Parameters
NameDescription
requestCountTokensRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
TaskCountTokensResponse

The response to send back to the client (wrapped by a task).