/// <summary>Snippet for ExplainAsync</summary> public async Task ExplainResourceNamesAsync() { // Snippet: ExplainAsync(EndpointName, IEnumerable<Value>, Value, string, CallSettings) // Additional: ExplainAsync(EndpointName, IEnumerable<Value>, Value, string, CancellationToken) // Create client PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); // Initialize request argument(s) EndpointName endpoint = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); IEnumerable <Value> instances = new Value[] { new Value(), }; Value parameters = new Value(); string deployedModelId = ""; // Make the request ExplainResponse response = await predictionServiceClient.ExplainAsync(endpoint, instances, parameters, deployedModelId); // End snippet }
/// <summary>Snippet for ExplainAsync</summary> public async Task ExplainRequestObjectAsync() { // Snippet: ExplainAsync(ExplainRequest, CallSettings) // Additional: ExplainAsync(ExplainRequest, CancellationToken) // Create client PredictionServiceClient predictionServiceClient = await PredictionServiceClient.CreateAsync(); // Initialize request argument(s) ExplainRequest request = new ExplainRequest { EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"), Instances = { new Value(), }, DeployedModelId = "", Parameters = new Value(), ExplanationSpecOverride = new ExplanationSpecOverride(), }; // Make the request ExplainResponse response = await predictionServiceClient.ExplainAsync(request); // End snippet }