public abstract class ExtensionExecutionServiceClient
Reference documentation and code samples for the Cloud AI Platform v1beta1 API class ExtensionExecutionServiceClient.
ExtensionExecutionService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.AIPlatform.V1Beta1Assembly
Google.Cloud.AIPlatform.V1Beta1.dll
Remarks
A service for Extension execution.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the ExtensionExecutionService service, which is a host of "aiplatform.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default ExtensionExecutionService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default ExtensionExecutionService scopes are:
GrpcClient
public virtual ExtensionExecutionService.ExtensionExecutionServiceClient GrpcClient { get; }
The underlying gRPC ExtensionExecutionService client
Property Value | |
---|---|
Type | Description |
ExtensionExecutionServiceExtensionExecutionServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static ExtensionExecutionServiceClient Create()
Synchronously creates a ExtensionExecutionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ExtensionExecutionServiceClientBuilder.
Returns | |
---|---|
Type | Description |
ExtensionExecutionServiceClient |
The created ExtensionExecutionServiceClient. |
CreateAsync(CancellationToken)
public static Task<ExtensionExecutionServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a ExtensionExecutionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ExtensionExecutionServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskExtensionExecutionServiceClient |
The task representing the created ExtensionExecutionServiceClient. |
ExecuteExtension(ExecuteExtensionRequest, CallSettings)
public virtual ExecuteExtensionResponse ExecuteExtension(ExecuteExtensionRequest request, CallSettings callSettings = null)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
request |
ExecuteExtensionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ExecuteExtensionResponse |
The RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = ExtensionExecutionServiceClient.Create();
// Initialize request argument(s)
ExecuteExtensionRequest request = new ExecuteExtensionRequest
{
ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
OperationId = "",
OperationParams = new Struct(),
RuntimeAuthConfig = new AuthConfig(),
};
// Make the request
ExecuteExtensionResponse response = extensionExecutionServiceClient.ExecuteExtension(request);
ExecuteExtension(ExtensionName, string, CallSettings)
public virtual ExecuteExtensionResponse ExecuteExtension(ExtensionName name, string operationId, CallSettings callSettings = null)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
name |
ExtensionName Required. Name (identifier) of the extension;
Format:
|
operationId |
string Required. The desired ID of the operation to be executed in this extension as defined in [ExtensionOperation.operation_id][google.cloud.aiplatform.v1beta1.ExtensionOperation.operation_id]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ExecuteExtensionResponse |
The RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = ExtensionExecutionServiceClient.Create();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
string operationId = "";
// Make the request
ExecuteExtensionResponse response = extensionExecutionServiceClient.ExecuteExtension(name, operationId);
ExecuteExtension(string, string, CallSettings)
public virtual ExecuteExtensionResponse ExecuteExtension(string name, string operationId, CallSettings callSettings = null)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name (identifier) of the extension;
Format:
|
operationId |
string Required. The desired ID of the operation to be executed in this extension as defined in [ExtensionOperation.operation_id][google.cloud.aiplatform.v1beta1.ExtensionOperation.operation_id]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ExecuteExtensionResponse |
The RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = ExtensionExecutionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
string operationId = "";
// Make the request
ExecuteExtensionResponse response = extensionExecutionServiceClient.ExecuteExtension(name, operationId);
ExecuteExtensionAsync(ExecuteExtensionRequest, CallSettings)
public virtual Task<ExecuteExtensionResponse> ExecuteExtensionAsync(ExecuteExtensionRequest request, CallSettings callSettings = null)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
request |
ExecuteExtensionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskExecuteExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
ExecuteExtensionRequest request = new ExecuteExtensionRequest
{
ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
OperationId = "",
OperationParams = new Struct(),
RuntimeAuthConfig = new AuthConfig(),
};
// Make the request
ExecuteExtensionResponse response = await extensionExecutionServiceClient.ExecuteExtensionAsync(request);
ExecuteExtensionAsync(ExecuteExtensionRequest, CancellationToken)
public virtual Task<ExecuteExtensionResponse> ExecuteExtensionAsync(ExecuteExtensionRequest request, CancellationToken cancellationToken)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
request |
ExecuteExtensionRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskExecuteExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
ExecuteExtensionRequest request = new ExecuteExtensionRequest
{
ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
OperationId = "",
OperationParams = new Struct(),
RuntimeAuthConfig = new AuthConfig(),
};
// Make the request
ExecuteExtensionResponse response = await extensionExecutionServiceClient.ExecuteExtensionAsync(request);
ExecuteExtensionAsync(ExtensionName, string, CallSettings)
public virtual Task<ExecuteExtensionResponse> ExecuteExtensionAsync(ExtensionName name, string operationId, CallSettings callSettings = null)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
name |
ExtensionName Required. Name (identifier) of the extension;
Format:
|
operationId |
string Required. The desired ID of the operation to be executed in this extension as defined in [ExtensionOperation.operation_id][google.cloud.aiplatform.v1beta1.ExtensionOperation.operation_id]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskExecuteExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
string operationId = "";
// Make the request
ExecuteExtensionResponse response = await extensionExecutionServiceClient.ExecuteExtensionAsync(name, operationId);
ExecuteExtensionAsync(ExtensionName, string, CancellationToken)
public virtual Task<ExecuteExtensionResponse> ExecuteExtensionAsync(ExtensionName name, string operationId, CancellationToken cancellationToken)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
name |
ExtensionName Required. Name (identifier) of the extension;
Format:
|
operationId |
string Required. The desired ID of the operation to be executed in this extension as defined in [ExtensionOperation.operation_id][google.cloud.aiplatform.v1beta1.ExtensionOperation.operation_id]. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskExecuteExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
string operationId = "";
// Make the request
ExecuteExtensionResponse response = await extensionExecutionServiceClient.ExecuteExtensionAsync(name, operationId);
ExecuteExtensionAsync(string, string, CallSettings)
public virtual Task<ExecuteExtensionResponse> ExecuteExtensionAsync(string name, string operationId, CallSettings callSettings = null)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name (identifier) of the extension;
Format:
|
operationId |
string Required. The desired ID of the operation to be executed in this extension as defined in [ExtensionOperation.operation_id][google.cloud.aiplatform.v1beta1.ExtensionOperation.operation_id]. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskExecuteExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
string operationId = "";
// Make the request
ExecuteExtensionResponse response = await extensionExecutionServiceClient.ExecuteExtensionAsync(name, operationId);
ExecuteExtensionAsync(string, string, CancellationToken)
public virtual Task<ExecuteExtensionResponse> ExecuteExtensionAsync(string name, string operationId, CancellationToken cancellationToken)
Executes the request against a given extension.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name (identifier) of the extension;
Format:
|
operationId |
string Required. The desired ID of the operation to be executed in this extension as defined in [ExtensionOperation.operation_id][google.cloud.aiplatform.v1beta1.ExtensionOperation.operation_id]. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskExecuteExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
string operationId = "";
// Make the request
ExecuteExtensionResponse response = await extensionExecutionServiceClient.ExecuteExtensionAsync(name, operationId);
QueryExtension(ExtensionName, IEnumerable<Content>, CallSettings)
public virtual QueryExtensionResponse QueryExtension(ExtensionName name, IEnumerable<Content> contents, CallSettings callSettings = null)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
name |
ExtensionName Required. Name (identifier) of the extension;
Format:
|
contents |
IEnumerableContent Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
QueryExtensionResponse |
The RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = ExtensionExecutionServiceClient.Create();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
IEnumerable<Content> contents = new Content[] { new Content(), };
// Make the request
QueryExtensionResponse response = extensionExecutionServiceClient.QueryExtension(name, contents);
QueryExtension(QueryExtensionRequest, CallSettings)
public virtual QueryExtensionResponse QueryExtension(QueryExtensionRequest request, CallSettings callSettings = null)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
request |
QueryExtensionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
QueryExtensionResponse |
The RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = ExtensionExecutionServiceClient.Create();
// Initialize request argument(s)
QueryExtensionRequest request = new QueryExtensionRequest
{
ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
Contents = { new Content(), },
};
// Make the request
QueryExtensionResponse response = extensionExecutionServiceClient.QueryExtension(request);
QueryExtension(string, IEnumerable<Content>, CallSettings)
public virtual QueryExtensionResponse QueryExtension(string name, IEnumerable<Content> contents, CallSettings callSettings = null)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name (identifier) of the extension;
Format:
|
contents |
IEnumerableContent Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
QueryExtensionResponse |
The RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = ExtensionExecutionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
IEnumerable<Content> contents = new Content[] { new Content(), };
// Make the request
QueryExtensionResponse response = extensionExecutionServiceClient.QueryExtension(name, contents);
QueryExtensionAsync(ExtensionName, IEnumerable<Content>, CallSettings)
public virtual Task<QueryExtensionResponse> QueryExtensionAsync(ExtensionName name, IEnumerable<Content> contents, CallSettings callSettings = null)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
name |
ExtensionName Required. Name (identifier) of the extension;
Format:
|
contents |
IEnumerableContent Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueryExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
IEnumerable<Content> contents = new Content[] { new Content(), };
// Make the request
QueryExtensionResponse response = await extensionExecutionServiceClient.QueryExtensionAsync(name, contents);
QueryExtensionAsync(ExtensionName, IEnumerable<Content>, CancellationToken)
public virtual Task<QueryExtensionResponse> QueryExtensionAsync(ExtensionName name, IEnumerable<Content> contents, CancellationToken cancellationToken)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
name |
ExtensionName Required. Name (identifier) of the extension;
Format:
|
contents |
IEnumerableContent Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueryExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
IEnumerable<Content> contents = new Content[] { new Content(), };
// Make the request
QueryExtensionResponse response = await extensionExecutionServiceClient.QueryExtensionAsync(name, contents);
QueryExtensionAsync(QueryExtensionRequest, CallSettings)
public virtual Task<QueryExtensionResponse> QueryExtensionAsync(QueryExtensionRequest request, CallSettings callSettings = null)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
request |
QueryExtensionRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueryExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
QueryExtensionRequest request = new QueryExtensionRequest
{
ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
Contents = { new Content(), },
};
// Make the request
QueryExtensionResponse response = await extensionExecutionServiceClient.QueryExtensionAsync(request);
QueryExtensionAsync(QueryExtensionRequest, CancellationToken)
public virtual Task<QueryExtensionResponse> QueryExtensionAsync(QueryExtensionRequest request, CancellationToken cancellationToken)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
request |
QueryExtensionRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueryExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
QueryExtensionRequest request = new QueryExtensionRequest
{
ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
Contents = { new Content(), },
};
// Make the request
QueryExtensionResponse response = await extensionExecutionServiceClient.QueryExtensionAsync(request);
QueryExtensionAsync(string, IEnumerable<Content>, CallSettings)
public virtual Task<QueryExtensionResponse> QueryExtensionAsync(string name, IEnumerable<Content> contents, CallSettings callSettings = null)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name (identifier) of the extension;
Format:
|
contents |
IEnumerableContent Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueryExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
IEnumerable<Content> contents = new Content[] { new Content(), };
// Make the request
QueryExtensionResponse response = await extensionExecutionServiceClient.QueryExtensionAsync(name, contents);
QueryExtensionAsync(string, IEnumerable<Content>, CancellationToken)
public virtual Task<QueryExtensionResponse> QueryExtensionAsync(string name, IEnumerable<Content> contents, CancellationToken cancellationToken)
Queries an extension with a default controller.
Parameters | |
---|---|
Name | Description |
name |
string Required. Name (identifier) of the extension;
Format:
|
contents |
IEnumerableContent Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueryExtensionResponse |
A Task containing the RPC response. |
// Create client
ExtensionExecutionServiceClient extensionExecutionServiceClient = await ExtensionExecutionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
IEnumerable<Content> contents = new Content[] { new Content(), };
// Make the request
QueryExtensionResponse response = await extensionExecutionServiceClient.QueryExtensionAsync(name, contents);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.