Class EvaluationServiceClient (0.3.0)

EvaluationServiceClient(
    *,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: typing.Optional[
        typing.Union[
            str,
            google.cloud.ces_v1beta.services.evaluation_service.transports.base.EvaluationServiceTransport,
            typing.Callable[
                [...],
                google.cloud.ces_v1beta.services.evaluation_service.transports.base.EvaluationServiceTransport,
            ],
        ]
    ] = None,
    client_options: typing.Optional[
        typing.Union[google.api_core.client_options.ClientOptions, dict]
    ] = None,
    client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)

EvaluationService exposes methods to perform evaluation for the CES app.

Properties

api_endpoint

Return the API endpoint used by the client instance.

Returns
Type Description
str The API endpoint used by the client instance.

transport

Returns the transport used by the client instance.

Returns
Type Description
EvaluationServiceTransport The transport used by the client instance.

universe_domain

Return the universe domain used by the client instance.

Returns
Type Description
str The universe domain used by the client instance.

Methods

EvaluationServiceClient

EvaluationServiceClient(
    *,
    credentials: typing.Optional[google.auth.credentials.Credentials] = None,
    transport: typing.Optional[
        typing.Union[
            str,
            google.cloud.ces_v1beta.services.evaluation_service.transports.base.EvaluationServiceTransport,
            typing.Callable[
                [...],
                google.cloud.ces_v1beta.services.evaluation_service.transports.base.EvaluationServiceTransport,
            ],
        ]
    ] = None,
    client_options: typing.Optional[
        typing.Union[google.api_core.client_options.ClientOptions, dict]
    ] = None,
    client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)

Instantiates the evaluation service client.

Parameters
Name Description
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Optional[Union[str,EvaluationServiceTransport,Callable[..., EvaluationServiceTransport]]]

The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the EvaluationServiceTransport constructor. If set to None, a transport is chosen automatically.

client_options Optional[Union[google.api_core.client_options.ClientOptions, dict]]

Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

agent_path

agent_path(project: str, location: str, app: str, agent: str) -> str

Returns a fully-qualified agent string.

app_path

app_path(project: str, location: str, app: str) -> str

Returns a fully-qualified app string.

app_version_path

app_version_path(project: str, location: str, app: str, version: str) -> str

Returns a fully-qualified app_version string.

cancel_operation

cancel_operation(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.CancelOperationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.CancelOperationRequest

The request object. Request message for CancelOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

changelog_path

changelog_path(project: str, location: str, app: str, changelog: str) -> str

Returns a fully-qualified changelog string.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

conversation_path

conversation_path(project: str, location: str, app: str, conversation: str) -> str

Returns a fully-qualified conversation string.

create_evaluation

create_evaluation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.CreateEvaluationRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    evaluation: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.Evaluation
    ] = None,
    evaluation_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.Evaluation

Creates an evaluation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_create_evaluation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    evaluation = ces_v1beta.Evaluation()
    evaluation.golden.turns.steps.user_input.text = "text_value"
    evaluation.display_name = "display_name_value"

    request = ces_v1beta.CreateEvaluationRequest(
        parent="parent_value",
        evaluation=evaluation,
    )

    # Make the request
    response = client.create_evaluation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.CreateEvaluationRequest, dict]

The request object. Request message for EvaluationService.CreateEvaluation.

parent str

Required. The app to create the evaluation for. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

evaluation google.cloud.ces_v1beta.types.Evaluation

Required. The evaluation to create. This corresponds to the evaluation field on the request instance; if request is provided, this should not be set.

evaluation_id str

Optional. The ID to use for the evaluation, which will become the final component of the evaluation's resource name. If not provided, a unique ID will be automatically assigned for the evaluation. This corresponds to the evaluation_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.Evaluation An evaluation represents all of the information needed to simulate and evaluate an agent.

create_evaluation_dataset

create_evaluation_dataset(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.CreateEvaluationDatasetRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    evaluation_dataset: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.EvaluationDataset
    ] = None,
    evaluation_dataset_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationDataset

Creates an evaluation dataset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_create_evaluation_dataset():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    evaluation_dataset = ces_v1beta.EvaluationDataset()
    evaluation_dataset.display_name = "display_name_value"

    request = ces_v1beta.CreateEvaluationDatasetRequest(
        parent="parent_value",
        evaluation_dataset=evaluation_dataset,
    )

    # Make the request
    response = client.create_evaluation_dataset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.CreateEvaluationDatasetRequest, dict]

The request object. Request message for EvaluationService.CreateEvaluationDataset.

parent str

Required. The app to create the evaluation for. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

evaluation_dataset google.cloud.ces_v1beta.types.EvaluationDataset

Required. The evaluation dataset to create. This corresponds to the evaluation_dataset field on the request instance; if request is provided, this should not be set.

evaluation_dataset_id str

Optional. The ID to use for the evaluation dataset, which will become the final component of the evaluation dataset's resource name. If not provided, a unique ID will be automatically assigned for the evaluation. This corresponds to the evaluation_dataset_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationDataset An evaluation dataset represents a set of evaluations that are grouped together basaed on shared tags.

create_evaluation_expectation

create_evaluation_expectation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.CreateEvaluationExpectationRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    evaluation_expectation: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.EvaluationExpectation
    ] = None,
    evaluation_expectation_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationExpectation

Creates an evaluation expectation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_create_evaluation_expectation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    evaluation_expectation = ces_v1beta.EvaluationExpectation()
    evaluation_expectation.llm_criteria.prompt = "prompt_value"
    evaluation_expectation.display_name = "display_name_value"

    request = ces_v1beta.CreateEvaluationExpectationRequest(
        parent="parent_value",
        evaluation_expectation=evaluation_expectation,
    )

    # Make the request
    response = client.create_evaluation_expectation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.CreateEvaluationExpectationRequest, dict]

The request object. Request message for EvaluationService.CreateEvaluationExpectation.

parent str

Required. The app to create the evaluation expectation for. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

evaluation_expectation google.cloud.ces_v1beta.types.EvaluationExpectation

Required. The evaluation expectation to create. This corresponds to the evaluation_expectation field on the request instance; if request is provided, this should not be set.

evaluation_expectation_id str

Optional. The ID to use for the evaluation expectation, which will become the final component of the evaluation expectation's resource name. If not provided, a unique ID will be automatically assigned for the evaluation expectation. This corresponds to the evaluation_expectation_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationExpectation An evaluation expectation represents a specific criteria to evaluate against.

create_scheduled_evaluation_run

create_scheduled_evaluation_run(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.CreateScheduledEvaluationRunRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    scheduled_evaluation_run: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.ScheduledEvaluationRun
    ] = None,
    scheduled_evaluation_run_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.ScheduledEvaluationRun

Creates a scheduled evaluation run.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_create_scheduled_evaluation_run():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    scheduled_evaluation_run = ces_v1beta.ScheduledEvaluationRun()
    scheduled_evaluation_run.display_name = "display_name_value"
    scheduled_evaluation_run.request.app = "app_value"
    scheduled_evaluation_run.scheduling_config.frequency = "BIWEEKLY"

    request = ces_v1beta.CreateScheduledEvaluationRunRequest(
        parent="parent_value",
        scheduled_evaluation_run=scheduled_evaluation_run,
    )

    # Make the request
    response = client.create_scheduled_evaluation_run(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.CreateScheduledEvaluationRunRequest, dict]

The request object. Request message for EvaluationService.CreateScheduledEvaluationRun.

parent str

Required. The app to create the scheduled evaluation run for. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

scheduled_evaluation_run google.cloud.ces_v1beta.types.ScheduledEvaluationRun

Required. The scheduled evaluation run to create. This corresponds to the scheduled_evaluation_run field on the request instance; if request is provided, this should not be set.

scheduled_evaluation_run_id str

Optional. The ID to use for the scheduled evaluation run, which will become the final component of the scheduled evaluation run's resource name. If not provided, a unique ID will be automatically assigned. This corresponds to the scheduled_evaluation_run_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.ScheduledEvaluationRun Represents a scheduled evaluation run configuration.

delete_evaluation

delete_evaluation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.DeleteEvaluationRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes an evaluation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_delete_evaluation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.DeleteEvaluationRequest(
        name="name_value",
    )

    # Make the request
    client.delete_evaluation(request=request)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.DeleteEvaluationRequest, dict]

The request object. Request message for EvaluationService.DeleteEvaluation.

name str

Required. The resource name of the evaluation to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_evaluation_dataset

delete_evaluation_dataset(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.DeleteEvaluationDatasetRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes an evaluation dataset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_delete_evaluation_dataset():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.DeleteEvaluationDatasetRequest(
        name="name_value",
    )

    # Make the request
    client.delete_evaluation_dataset(request=request)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.DeleteEvaluationDatasetRequest, dict]

The request object. Request message for EvaluationService.DeleteEvaluationDataset.

name str

Required. The resource name of the evaluation dataset to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_evaluation_expectation

delete_evaluation_expectation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.DeleteEvaluationExpectationRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes an evaluation expectation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_delete_evaluation_expectation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.DeleteEvaluationExpectationRequest(
        name="name_value",
    )

    # Make the request
    client.delete_evaluation_expectation(request=request)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.DeleteEvaluationExpectationRequest, dict]

The request object. Request message for EvaluationService.DeleteEvaluationExpectation.

name str

Required. The resource name of the evaluation expectation to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_evaluation_result

delete_evaluation_result(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.DeleteEvaluationResultRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes an evaluation result.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_delete_evaluation_result():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.DeleteEvaluationResultRequest(
        name="name_value",
    )

    # Make the request
    client.delete_evaluation_result(request=request)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.DeleteEvaluationResultRequest, dict]

The request object. Request message for EvaluationService.DeleteEvaluationResult.

name str

Required. The resource name of the evaluation result to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_evaluation_run

delete_evaluation_run(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.DeleteEvaluationRunRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes an evaluation run.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_delete_evaluation_run():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.DeleteEvaluationRunRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_evaluation_run(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.DeleteEvaluationRunRequest, dict]

The request object. Request message for EvaluationService.DeleteEvaluationRun.

name str

Required. The resource name of the evaluation run to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_operation

delete_operation(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.DeleteOperationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.DeleteOperationRequest

The request object. Request message for DeleteOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_scheduled_evaluation_run

delete_scheduled_evaluation_run(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.DeleteScheduledEvaluationRunRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes a scheduled evaluation run.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_delete_scheduled_evaluation_run():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.DeleteScheduledEvaluationRunRequest(
        name="name_value",
    )

    # Make the request
    client.delete_scheduled_evaluation_run(request=request)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.DeleteScheduledEvaluationRunRequest, dict]

The request object. Request message for EvaluationService.DeleteScheduledEvaluationRun.

name str

Required. The resource name of the scheduled evaluation run to delete. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

evaluation_dataset_path

evaluation_dataset_path(
    project: str, location: str, app: str, evaluation_dataset: str
) -> str

Returns a fully-qualified evaluation_dataset string.

evaluation_expectation_path

evaluation_expectation_path(
    project: str, location: str, app: str, evaluation_expectation: str
) -> str

Returns a fully-qualified evaluation_expectation string.

evaluation_path

evaluation_path(project: str, location: str, app: str, evaluation: str) -> str

Returns a fully-qualified evaluation string.

evaluation_result_path

evaluation_result_path(
    project: str, location: str, app: str, evaluation: str, evaluation_result: str
) -> str

Returns a fully-qualified evaluation_result string.

evaluation_run_path

evaluation_run_path(
    project: str, location: str, app: str, evaluation_run: str
) -> str

Returns a fully-qualified evaluation_run string.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
EvaluationServiceClient The constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameter
Name Description
info dict

The service account private key info.

Returns
Type Description
EvaluationServiceClient The constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
EvaluationServiceClient The constructed client.

generate_evaluation

generate_evaluation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GenerateEvaluationRequest,
            dict,
        ]
    ] = None,
    *,
    conversation: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates a golden evaluation from a conversation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_generate_evaluation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GenerateEvaluationRequest(
        conversation="conversation_value",
    )

    # Make the request
    operation = client.generate_evaluation(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GenerateEvaluationRequest, dict]

The request object. Request message for EvaluationService.GenerateEvaluation.

conversation str

Required. The conversation to create the golden evaluation for. Format: projects/{project}/locations/{location}/apps/{app}/conversations/{conversation} This corresponds to the conversation field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Evaluation An evaluation represents all of the information needed to simulate and evaluate an agent.

get_evaluation

get_evaluation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GetEvaluationRequest, dict
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.Evaluation

Gets details of the specified evaluation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_get_evaluation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GetEvaluationRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_evaluation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GetEvaluationRequest, dict]

The request object. Request message for EvaluationService.GetEvaluation.

name str

Required. The resource name of the evaluation to retrieve. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.Evaluation An evaluation represents all of the information needed to simulate and evaluate an agent.

get_evaluation_dataset

get_evaluation_dataset(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GetEvaluationDatasetRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationDataset

Gets details of the specified evaluation dataset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_get_evaluation_dataset():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GetEvaluationDatasetRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_evaluation_dataset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GetEvaluationDatasetRequest, dict]

The request object. Request message for EvaluationService.GetEvaluationDataset.

name str

Required. The resource name of the evaluation dataset to retrieve. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationDataset An evaluation dataset represents a set of evaluations that are grouped together basaed on shared tags.

get_evaluation_expectation

get_evaluation_expectation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GetEvaluationExpectationRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationExpectation

Gets details of the specified evaluation expectation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_get_evaluation_expectation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GetEvaluationExpectationRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_evaluation_expectation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GetEvaluationExpectationRequest, dict]

The request object. Request message for EvaluationService.GetEvaluationExpectation.

name str

Required. The resource name of the evaluation expectation to retrieve. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationExpectation An evaluation expectation represents a specific criteria to evaluate against.

get_evaluation_result

get_evaluation_result(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GetEvaluationResultRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationResult

Gets details of the specified evaluation result.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_get_evaluation_result():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GetEvaluationResultRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_evaluation_result(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GetEvaluationResultRequest, dict]

The request object. Request message for EvaluationService.GetEvaluationResult.

name str

Required. The resource name of the evaluation result to retrieve. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationResult An evaluation result represents the output of running an Evaluation.

get_evaluation_run

get_evaluation_run(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GetEvaluationRunRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationRun

Gets details of the specified evaluation run.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_get_evaluation_run():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GetEvaluationRunRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_evaluation_run(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GetEvaluationRunRequest, dict]

The request object. Request message for EvaluationService.GetEvaluationRun.

name str

Required. The resource name of the evaluation run to retrieve. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationRun An evaluation run represents an all the evaluation results from an evaluation execution.

get_location

get_location(
    request: typing.Optional[
        typing.Union[google.cloud.location.locations_pb2.GetLocationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
Name Description
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.location_pb2.Location Location object.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Deprecated. Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
Name Description
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If any errors happen.
Returns
Type Description
Tuple[str, Callable[[], Tuple[bytes, bytes]]] returns the API endpoint and the client cert source to use.

get_operation

get_operation(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.GetOperationRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.Operation

Gets the latest state of a long-running operation.

Parameters
Name Description
request .operations_pb2.GetOperationRequest

The request object. Request message for GetOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.operations_pb2.Operation An Operation object.

get_scheduled_evaluation_run

get_scheduled_evaluation_run(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.GetScheduledEvaluationRunRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.ScheduledEvaluationRun

Gets details of the specified scheduled evaluation run.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_get_scheduled_evaluation_run():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.GetScheduledEvaluationRunRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_scheduled_evaluation_run(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.GetScheduledEvaluationRunRequest, dict]

The request object. Request message for EvaluationService.GetScheduledEvaluationRun.

name str

Required. The resource name of the scheduled evaluation run to retrieve. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.ScheduledEvaluationRun Represents a scheduled evaluation run configuration.

guardrail_path

guardrail_path(project: str, location: str, app: str, guardrail: str) -> str

Returns a fully-qualified guardrail string.

import_evaluations

import_evaluations(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ImportEvaluationsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Imports evaluations into the app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_import_evaluations():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ImportEvaluationsRequest(
        parent="parent_value",
    )

    # Make the request
    operation = client.import_evaluations(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ImportEvaluationsRequest, dict]

The request object. Request message for EvaluationService.ImportEvaluations.

parent str

Required. The app to import the evaluations into. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be ImportEvaluationsResponse Response message for EvaluationService.ImportEvaluations.

list_evaluation_datasets

list_evaluation_datasets(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ListEvaluationDatasetsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationDatasetsPager
)

Lists all evaluation datasets in the given app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_list_evaluation_datasets():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ListEvaluationDatasetsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_evaluation_datasets(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ListEvaluationDatasetsRequest, dict]

The request object. Request message for EvaluationService.ListEvaluationDatasets.

parent str

Required. The resource name of the app to list evaluation datasets from. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationDatasetsPager Response message for EvaluationService.ListEvaluationDatasets. Iterating over this object will yield results and resolve additional pages automatically.

list_evaluation_expectations

list_evaluation_expectations(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ListEvaluationExpectationsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationExpectationsPager
)

Lists all evaluation expectations in the given app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_list_evaluation_expectations():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ListEvaluationExpectationsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_evaluation_expectations(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ListEvaluationExpectationsRequest, dict]

The request object. Request message for EvaluationService.ListEvaluationExpectations.

parent str

Required. The resource name of the app to list evaluation expectations from. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationExpectationsPager Response message for EvaluationService.ListEvaluationExpectations. Iterating over this object will yield results and resolve additional pages automatically.

list_evaluation_results

list_evaluation_results(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ListEvaluationResultsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationResultsPager
)

Lists all evaluation results for a given evaluation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_list_evaluation_results():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ListEvaluationResultsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_evaluation_results(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ListEvaluationResultsRequest, dict]

The request object. Request message for EvaluationService.ListEvaluationResults.

parent str

Required. The resource name of the evaluation to list evaluation results from. To filter by evaluation run, use - as the evaluation ID and specify the evaluation run ID in the filter. For example: projects/{project}/locations/{location}/apps/{app}/evaluations/- This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationResultsPager Response message for EvaluationService.ListEvaluationResults. Iterating over this object will yield results and resolve additional pages automatically.

list_evaluation_runs

list_evaluation_runs(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ListEvaluationRunsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationRunsPager

Lists all evaluation runs in the given app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_list_evaluation_runs():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ListEvaluationRunsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_evaluation_runs(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ListEvaluationRunsRequest, dict]

The request object. Request message for EvaluationService.ListEvaluationRuns.

parent str

Required. The resource name of the app to list evaluation runs from. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationRunsPager Response message for EvaluationService.ListEvaluationRuns. Iterating over this object will yield results and resolve additional pages automatically.

list_evaluations

list_evaluations(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ListEvaluationsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationsPager

Lists all evaluations in the given app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_list_evaluations():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ListEvaluationsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_evaluations(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ListEvaluationsRequest, dict]

The request object. Request message for EvaluationService.ListEvaluations.

parent str

Required. The resource name of the app to list evaluations from. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationsPager Response message for EvaluationService.ListEvaluations. Iterating over this object will yield results and resolve additional pages automatically.

list_locations

list_locations(
    request: typing.Optional[
        typing.Union[google.cloud.location.locations_pb2.ListLocationsRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
Name Description
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.location_pb2.ListLocationsResponse Response message for ListLocations method.

list_operations

list_operations(
    request: typing.Optional[
        typing.Union[google.longrunning.operations_pb2.ListOperationsRequest, dict]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse

Lists operations that match the specified filter in the request.

Parameters
Name Description
request .operations_pb2.ListOperationsRequest

The request object. Request message for ListOperations method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.operations_pb2.ListOperationsResponse Response message for ListOperations method.

list_scheduled_evaluation_runs

list_scheduled_evaluation_runs(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.ListScheduledEvaluationRunsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.ces_v1beta.services.evaluation_service.pagers.ListScheduledEvaluationRunsPager
)

Lists all scheduled evaluation runs in the given app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_list_scheduled_evaluation_runs():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.ListScheduledEvaluationRunsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_scheduled_evaluation_runs(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.ListScheduledEvaluationRunsRequest, dict]

The request object. Request message for EvaluationService.ListScheduledEvaluationRuns.

parent str

Required. The resource name of the app to list scheduled evaluation runs from. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListScheduledEvaluationRunsPager Response message for EvaluationService.ListScheduledEvaluationRuns. Iterating over this object will yield results and resolve additional pages automatically.

parse_agent_path

parse_agent_path(path: str) -> typing.Dict[str, str]

Parses a agent path into its component segments.

parse_app_path

parse_app_path(path: str) -> typing.Dict[str, str]

Parses a app path into its component segments.

parse_app_version_path

parse_app_version_path(path: str) -> typing.Dict[str, str]

Parses a app_version path into its component segments.

parse_changelog_path

parse_changelog_path(path: str) -> typing.Dict[str, str]

Parses a changelog path into its component segments.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_conversation_path

parse_conversation_path(path: str) -> typing.Dict[str, str]

Parses a conversation path into its component segments.

parse_evaluation_dataset_path

parse_evaluation_dataset_path(path: str) -> typing.Dict[str, str]

Parses a evaluation_dataset path into its component segments.

parse_evaluation_expectation_path

parse_evaluation_expectation_path(path: str) -> typing.Dict[str, str]

Parses a evaluation_expectation path into its component segments.

parse_evaluation_path

parse_evaluation_path(path: str) -> typing.Dict[str, str]

Parses a evaluation path into its component segments.

parse_evaluation_result_path

parse_evaluation_result_path(path: str) -> typing.Dict[str, str]

Parses a evaluation_result path into its component segments.

parse_evaluation_run_path

parse_evaluation_run_path(path: str) -> typing.Dict[str, str]

Parses a evaluation_run path into its component segments.

parse_guardrail_path

parse_guardrail_path(path: str) -> typing.Dict[str, str]

Parses a guardrail path into its component segments.

parse_scheduled_evaluation_run_path

parse_scheduled_evaluation_run_path(path: str) -> typing.Dict[str, str]

Parses a scheduled_evaluation_run path into its component segments.

parse_tool_path

parse_tool_path(path: str) -> typing.Dict[str, str]

Parses a tool path into its component segments.

parse_toolset_path

parse_toolset_path(path: str) -> typing.Dict[str, str]

Parses a toolset path into its component segments.

run_evaluation

run_evaluation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation.RunEvaluationRequest, dict
        ]
    ] = None,
    *,
    app: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Runs an evaluation of the app.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_run_evaluation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.RunEvaluationRequest(
        app="app_value",
    )

    # Make the request
    operation = client.run_evaluation(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.RunEvaluationRequest, dict]

The request object. Request message for EvaluationService.RunEvaluation.

app str

Required. The app to evaluate. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the app field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be RunEvaluationResponse Response message for EvaluationService.RunEvaluation.

scheduled_evaluation_run_path

scheduled_evaluation_run_path(
    project: str, location: str, app: str, scheduled_evaluation_run: str
) -> str

Returns a fully-qualified scheduled_evaluation_run string.

test_persona_voice

test_persona_voice(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.TestPersonaVoiceRequest,
            dict,
        ]
    ] = None,
    *,
    app: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation_service.TestPersonaVoiceResponse

Tests the voice of a persona. Also accepts a default persona.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_test_persona_voice():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.TestPersonaVoiceRequest(
        app="app_value",
        persona_id="persona_id_value",
        text="text_value",
    )

    # Make the request
    response = client.test_persona_voice(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.TestPersonaVoiceRequest, dict]

The request object. Request message for EvaluationService.TestPersonaVoice.

app str

Required. the resource name of the app to test the persona voice for. Format: projects/{project}/locations/{location}/apps/{app} This corresponds to the app field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.TestPersonaVoiceResponse Response message for EvaluationService.TestPersonaVoice.

tool_path

tool_path(project: str, location: str, app: str, tool: str) -> str

Returns a fully-qualified tool string.

toolset_path

toolset_path(project: str, location: str, app: str, toolset: str) -> str

Returns a fully-qualified toolset string.

update_evaluation

update_evaluation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.UpdateEvaluationRequest,
            dict,
        ]
    ] = None,
    *,
    evaluation: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.Evaluation
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.Evaluation

Updates an evaluation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_update_evaluation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    evaluation = ces_v1beta.Evaluation()
    evaluation.golden.turns.steps.user_input.text = "text_value"
    evaluation.display_name = "display_name_value"

    request = ces_v1beta.UpdateEvaluationRequest(
        evaluation=evaluation,
    )

    # Make the request
    response = client.update_evaluation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.UpdateEvaluationRequest, dict]

The request object. Request message for EvaluationService.UpdateEvaluation.

evaluation google.cloud.ces_v1beta.types.Evaluation

Required. The evaluation to update. This corresponds to the evaluation field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.Evaluation An evaluation represents all of the information needed to simulate and evaluate an agent.

update_evaluation_dataset

update_evaluation_dataset(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.UpdateEvaluationDatasetRequest,
            dict,
        ]
    ] = None,
    *,
    evaluation_dataset: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.EvaluationDataset
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationDataset

Updates an evaluation dataset.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_update_evaluation_dataset():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    evaluation_dataset = ces_v1beta.EvaluationDataset()
    evaluation_dataset.display_name = "display_name_value"

    request = ces_v1beta.UpdateEvaluationDatasetRequest(
        evaluation_dataset=evaluation_dataset,
    )

    # Make the request
    response = client.update_evaluation_dataset(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.UpdateEvaluationDatasetRequest, dict]

The request object. Request message for EvaluationService.UpdateEvaluationDataset.

evaluation_dataset google.cloud.ces_v1beta.types.EvaluationDataset

Required. The evaluation dataset to update. This corresponds to the evaluation_dataset field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationDataset An evaluation dataset represents a set of evaluations that are grouped together basaed on shared tags.

update_evaluation_expectation

update_evaluation_expectation(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.UpdateEvaluationExpectationRequest,
            dict,
        ]
    ] = None,
    *,
    evaluation_expectation: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.EvaluationExpectation
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.EvaluationExpectation

Updates an evaluation expectation.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_update_evaluation_expectation():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    evaluation_expectation = ces_v1beta.EvaluationExpectation()
    evaluation_expectation.llm_criteria.prompt = "prompt_value"
    evaluation_expectation.display_name = "display_name_value"

    request = ces_v1beta.UpdateEvaluationExpectationRequest(
        evaluation_expectation=evaluation_expectation,
    )

    # Make the request
    response = client.update_evaluation_expectation(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.UpdateEvaluationExpectationRequest, dict]

The request object. Request message for EvaluationService.UpdateEvaluationExpectation.

evaluation_expectation google.cloud.ces_v1beta.types.EvaluationExpectation

Required. The evaluation expectation to update. This corresponds to the evaluation_expectation field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.EvaluationExpectation An evaluation expectation represents a specific criteria to evaluate against.

update_scheduled_evaluation_run

update_scheduled_evaluation_run(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.UpdateScheduledEvaluationRunRequest,
            dict,
        ]
    ] = None,
    *,
    scheduled_evaluation_run: typing.Optional[
        google.cloud.ces_v1beta.types.evaluation.ScheduledEvaluationRun
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation.ScheduledEvaluationRun

Updates a scheduled evaluation run.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_update_scheduled_evaluation_run():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    scheduled_evaluation_run = ces_v1beta.ScheduledEvaluationRun()
    scheduled_evaluation_run.display_name = "display_name_value"
    scheduled_evaluation_run.request.app = "app_value"
    scheduled_evaluation_run.scheduling_config.frequency = "BIWEEKLY"

    request = ces_v1beta.UpdateScheduledEvaluationRunRequest(
        scheduled_evaluation_run=scheduled_evaluation_run,
    )

    # Make the request
    response = client.update_scheduled_evaluation_run(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.UpdateScheduledEvaluationRunRequest, dict]

The request object. Request message for EvaluationService.UpdateScheduledEvaluationRun.

scheduled_evaluation_run google.cloud.ces_v1beta.types.ScheduledEvaluationRun

Required. The scheduled evaluation run to update. This corresponds to the scheduled_evaluation_run field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.ScheduledEvaluationRun Represents a scheduled evaluation run configuration.

upload_evaluation_audio

upload_evaluation_audio(
    request: typing.Optional[
        typing.Union[
            google.cloud.ces_v1beta.types.evaluation_service.UploadEvaluationAudioRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    audio_content: typing.Optional[bytes] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.ces_v1beta.types.evaluation_service.UploadEvaluationAudioResponse

Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud Storage bucket defined in 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and returns a transcript.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import ces_v1beta

def sample_upload_evaluation_audio():
    # Create a client
    client = ces_v1beta.EvaluationServiceClient()

    # Initialize request argument(s)
    request = ces_v1beta.UploadEvaluationAudioRequest(
        name="name_value",
        audio_content=b'audio_content_blob',
    )

    # Make the request
    response = client.upload_evaluation_audio(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.ces_v1beta.types.UploadEvaluationAudioRequest, dict]

The request object. Request message for EvaluationService.UploadEvaluationAudio.

name str

Required. The resource name of the Evaluation for which to upload the evaluation audio. Format: projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation} This corresponds to the name field on the request instance; if request is provided, this should not be set.

audio_content bytes

Required. The raw audio bytes. The format of the audio must be single-channel LINEAR16 with a sample rate of 16kHz (default InputAudioConfig). This corresponds to the audio_content field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.ces_v1beta.types.UploadEvaluationAudioResponse Response message for EvaluationService.UploadEvaluationAudio.