1.0.0-beta87 (latest) 1.0.0-beta86

    public sealed class LlmUtilityServiceClientImpl : LlmUtilityServiceClient

Reference documentation and code samples for the Vertex AI v1beta1 API class LlmUtilityServiceClientImpl.

LlmUtilityService client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [LlmUtilityServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient) \> LlmUtilityServiceClientImpl

## Inherited Members

[LlmUtilityServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_DefaultEndpoint) [LlmUtilityServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_DefaultScopes) [LlmUtilityServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ServiceMetadata) [LlmUtilityServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_CreateAsync_System_Threading_CancellationToken_) [LlmUtilityServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_Create) [LlmUtilityServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ShutdownDefaultChannelsAsync) [LlmUtilityServiceClient.ComputeTokensAsync(ComputeTokensRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokensAsync_Google_Cloud_AIPlatform_V1Beta1_ComputeTokensRequest_System_Threading_CancellationToken_) [LlmUtilityServiceClient.ComputeTokens(string, IEnumerable\<Value\>, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokens_System_String_System_Collections_Generic_IEnumerable_Google_Protobuf_WellKnownTypes_Value__Google_Api_Gax_Grpc_CallSettings_) [LlmUtilityServiceClient.ComputeTokensAsync(string, IEnumerable\<Value\>, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokensAsync_System_String_System_Collections_Generic_IEnumerable_Google_Protobuf_WellKnownTypes_Value__Google_Api_Gax_Grpc_CallSettings_) [LlmUtilityServiceClient.ComputeTokensAsync(string, IEnumerable\<Value\>, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokensAsync_System_String_System_Collections_Generic_IEnumerable_Google_Protobuf_WellKnownTypes_Value__System_Threading_CancellationToken_) [LlmUtilityServiceClient.ComputeTokens(EndpointName, IEnumerable\<Value\>, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokens_Google_Cloud_AIPlatform_V1Beta1_EndpointName_System_Collections_Generic_IEnumerable_Google_Protobuf_WellKnownTypes_Value__Google_Api_Gax_Grpc_CallSettings_) [LlmUtilityServiceClient.ComputeTokensAsync(EndpointName, IEnumerable\<Value\>, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokensAsync_Google_Cloud_AIPlatform_V1Beta1_EndpointName_System_Collections_Generic_IEnumerable_Google_Protobuf_WellKnownTypes_Value__Google_Api_Gax_Grpc_CallSettings_) [LlmUtilityServiceClient.ComputeTokensAsync(EndpointName, IEnumerable\<Value\>, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokensAsync_Google_Cloud_AIPlatform_V1Beta1_EndpointName_System_Collections_Generic_IEnumerable_Google_Protobuf_WellKnownTypes_Value__System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.AIPlatform.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)

## Assembly

Google.Cloud.AIPlatform.V1Beta1.dll

## Remarks

Service for LLM related utility functions.

## Constructors

### LlmUtilityServiceClientImpl(LlmUtilityServiceClient, LlmUtilityServiceSettings, ILogger)

    public LlmUtilityServiceClientImpl(LlmUtilityService.LlmUtilityServiceClient grpcClient, LlmUtilityServiceSettings settings, ILogger logger)

Constructs a client wrapper for the LlmUtilityService service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityService.LlmUtilityServiceClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceSettings` The base [LlmUtilityServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override LlmUtilityService.LlmUtilityServiceClient GrpcClient { get; }

The underlying gRPC LlmUtilityService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityService.LlmUtilityServiceClient` |   |

**Overrides** [LlmUtilityServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_GrpcClient)

### IAMPolicyClient

    public override IAMPolicyClient IAMPolicyClient { get; }

The [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.html` |   |

**Overrides** [LlmUtilityServiceClient.IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_IAMPolicyClient)

### LocationsClient

    public override LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

**Overrides** [LlmUtilityServiceClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_LocationsClient)

## Methods

### ComputeTokens(ComputeTokensRequest, CallSettings)

    public override ComputeTokensResponse ComputeTokens(ComputeTokensRequest request, CallSettings callSettings = null)

Return a list of tokens based on the input text.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ComputeTokensRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ComputeTokensResponse` | The RPC response. |

**Overrides** [LlmUtilityServiceClient.ComputeTokens(ComputeTokensRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokens_Google_Cloud_AIPlatform_V1Beta1_ComputeTokensRequest_Google_Api_Gax_Grpc_CallSettings_)

### ComputeTokensAsync(ComputeTokensRequest, CallSettings)

    public override Task<ComputeTokensResponse> ComputeTokensAsync(ComputeTokensRequest request, CallSettings callSettings = null)

Return a list of tokens based on the input text.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ComputeTokensRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ComputeTokensResponse` | A Task containing the RPC response. |

**Overrides** [LlmUtilityServiceClient.ComputeTokensAsync(ComputeTokensRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.LlmUtilityServiceClient#Google_Cloud_AIPlatform_V1Beta1_LlmUtilityServiceClient_ComputeTokensAsync_Google_Cloud_AIPlatform_V1Beta1_ComputeTokensRequest_Google_Api_Gax_Grpc_CallSettings_)