EvaluationServiceAsyncClient(
*,
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,
],
]
] = "grpc_asyncio",
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = 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
EvaluationServiceAsyncClient
EvaluationServiceAsyncClient(
*,
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,
],
]
] = "grpc_asyncio",
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Instantiates the evaluation service async 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 to use. 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 |
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 |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTlsChannelError |
If mutual TLS transport creation failed for any reason. |
agent_path
agent_path(project: str, location: str, app: str, agent: str) -> strReturns a fully-qualified agent string.
app_path
app_path(project: str, location: str, app: str) -> strReturns a fully-qualified app string.
app_version_path
app_version_path(project: str, location: str, app: str, version: str) -> strReturns 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_async.AsyncRetry,
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]]] = ()
) -> NoneStarts 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 |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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 |
changelog_path
changelog_path(project: str, location: str, app: str, changelog: str) -> strReturns a fully-qualified changelog string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> strReturns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> strReturns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> strReturns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> strReturns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> strReturns a fully-qualified project string.
conversation_path
conversation_path(project: str, location: str, app: str, conversation: str) -> strReturns 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_async.AsyncRetry,
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.EvaluationCreates 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
async def sample_create_evaluation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.create_evaluation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.CreateEvaluationRequest, dict]]
The request object. Request message for EvaluationService.CreateEvaluation. |
parent |
Required. The app to create the evaluation for. Format: |
evaluation |
Evaluation
Required. The evaluation to create. This corresponds to the |
evaluation_id |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationDatasetCreates 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
async def sample_create_evaluation_dataset():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.create_evaluation_dataset(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.CreateEvaluationDatasetRequest, dict]]
The request object. Request message for EvaluationService.CreateEvaluationDataset. |
parent |
Required. The app to create the evaluation for. Format: |
evaluation_dataset |
EvaluationDataset
Required. The evaluation dataset to create. This corresponds to the |
evaluation_dataset_id |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationExpectationCreates 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
async def sample_create_evaluation_expectation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.create_evaluation_expectation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.CreateEvaluationExpectationRequest, dict]]
The request object. Request message for EvaluationService.CreateEvaluationExpectation. |
parent |
Required. The app to create the evaluation expectation for. Format: |
evaluation_expectation |
EvaluationExpectation
Required. The evaluation expectation to create. This corresponds to the |
evaluation_expectation_id |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.ScheduledEvaluationRunCreates 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
async def sample_create_scheduled_evaluation_run():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.create_scheduled_evaluation_run(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.CreateScheduledEvaluationRunRequest, dict]]
The request object. Request message for EvaluationService.CreateScheduledEvaluationRun. |
parent |
Required. The app to create the scheduled evaluation run for. Format: |
scheduled_evaluation_run |
ScheduledEvaluationRun
Required. The scheduled evaluation run to create. This corresponds to the |
scheduled_evaluation_run_id |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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]]] = ()
) -> NoneDeletes 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
async def sample_delete_evaluation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.DeleteEvaluationRequest(
name="name_value",
)
# Make the request
await client.delete_evaluation(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.DeleteEvaluationRequest, dict]]
The request object. Request message for EvaluationService.DeleteEvaluation. |
name |
Required. The resource name of the evaluation to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
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_async.AsyncRetry,
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]]] = ()
) -> NoneDeletes 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
async def sample_delete_evaluation_dataset():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.DeleteEvaluationDatasetRequest(
name="name_value",
)
# Make the request
await client.delete_evaluation_dataset(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.DeleteEvaluationDatasetRequest, dict]]
The request object. Request message for EvaluationService.DeleteEvaluationDataset. |
name |
Required. The resource name of the evaluation dataset to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
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_async.AsyncRetry,
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]]] = ()
) -> NoneDeletes 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
async def sample_delete_evaluation_expectation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.DeleteEvaluationExpectationRequest(
name="name_value",
)
# Make the request
await client.delete_evaluation_expectation(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.DeleteEvaluationExpectationRequest, dict]]
The request object. Request message for EvaluationService.DeleteEvaluationExpectation. |
name |
Required. The resource name of the evaluation expectation to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
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_async.AsyncRetry,
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]]] = ()
) -> NoneDeletes 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
async def sample_delete_evaluation_result():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.DeleteEvaluationResultRequest(
name="name_value",
)
# Make the request
await client.delete_evaluation_result(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.DeleteEvaluationResultRequest, dict]]
The request object. Request message for EvaluationService.DeleteEvaluationResult. |
name |
Required. The resource name of the evaluation result to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
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_async.AsyncRetry,
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_async.AsyncOperationDeletes 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
async def sample_delete_evaluation_run():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.DeleteEvaluationRunRequest, dict]]
The request object. Request message for EvaluationService.DeleteEvaluationRun. |
name |
Required. The resource name of the evaluation run to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
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_async.AsyncRetry,
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]]] = ()
) -> NoneDeletes 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 |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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 |
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_async.AsyncRetry,
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]]] = ()
) -> NoneDeletes 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
async def sample_delete_scheduled_evaluation_run():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.DeleteScheduledEvaluationRunRequest(
name="name_value",
)
# Make the request
await client.delete_scheduled_evaluation_run(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.DeleteScheduledEvaluationRunRequest, dict]]
The request object. Request message for EvaluationService.DeleteScheduledEvaluationRun. |
name |
Required. The resource name of the scheduled evaluation run to delete. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
evaluation_dataset_path
evaluation_dataset_path(
project: str, location: str, app: str, evaluation_dataset: str
) -> strReturns a fully-qualified evaluation_dataset string.
evaluation_expectation_path
evaluation_expectation_path(
project: str, location: str, app: str, evaluation_expectation: str
) -> strReturns a fully-qualified evaluation_expectation string.
evaluation_path
evaluation_path(project: str, location: str, app: str, evaluation: str) -> strReturns a fully-qualified evaluation string.
evaluation_result_path
evaluation_result_path(
project: str, location: str, app: str, evaluation: str, evaluation_result: str
) -> strReturns a fully-qualified evaluation_result string.
evaluation_run_path
evaluation_run_path(
project: str, location: str, app: str, evaluation_run: str
) -> strReturns 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 |
EvaluationServiceAsyncClient |
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 |
EvaluationServiceAsyncClient |
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 |
EvaluationServiceAsyncClient |
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_async.AsyncRetry,
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_async.AsyncOperationCreates 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
async def sample_generate_evaluation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GenerateEvaluationRequest, dict]]
The request object. Request message for EvaluationService.GenerateEvaluation. |
conversation |
Required. The conversation to create the golden evaluation for. Format: |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
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_async.AsyncRetry,
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.EvaluationGets 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
async def sample_get_evaluation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.GetEvaluationRequest(
name="name_value",
)
# Make the request
response = await client.get_evaluation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GetEvaluationRequest, dict]]
The request object. Request message for EvaluationService.GetEvaluation. |
name |
Required. The resource name of the evaluation to retrieve. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationDatasetGets 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
async def sample_get_evaluation_dataset():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.GetEvaluationDatasetRequest(
name="name_value",
)
# Make the request
response = await client.get_evaluation_dataset(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GetEvaluationDatasetRequest, dict]]
The request object. Request message for EvaluationService.GetEvaluationDataset. |
name |
Required. The resource name of the evaluation dataset to retrieve. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationExpectationGets 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
async def sample_get_evaluation_expectation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.GetEvaluationExpectationRequest(
name="name_value",
)
# Make the request
response = await client.get_evaluation_expectation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GetEvaluationExpectationRequest, dict]]
The request object. Request message for EvaluationService.GetEvaluationExpectation. |
name |
Required. The resource name of the evaluation expectation to retrieve. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationResultGets 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
async def sample_get_evaluation_result():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.GetEvaluationResultRequest(
name="name_value",
)
# Make the request
response = await client.get_evaluation_result(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GetEvaluationResultRequest, dict]]
The request object. Request message for EvaluationService.GetEvaluationResult. |
name |
Required. The resource name of the evaluation result to retrieve. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationRunGets 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
async def sample_get_evaluation_run():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.GetEvaluationRunRequest(
name="name_value",
)
# Make the request
response = await client.get_evaluation_run(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GetEvaluationRunRequest, dict]]
The request object. Request message for EvaluationService.GetEvaluationRun. |
name |
Required. The resource name of the evaluation run to retrieve. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.LocationGets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
|
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,
)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 |
| 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_async.AsyncRetry,
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.OperationGets the latest state of a long-running operation.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
|
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_async.AsyncRetry,
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.ScheduledEvaluationRunGets 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
async def sample_get_scheduled_evaluation_run():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.GetScheduledEvaluationRunRequest(
name="name_value",
)
# Make the request
response = await client.get_scheduled_evaluation_run(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.GetScheduledEvaluationRunRequest, dict]]
The request object. Request message for EvaluationService.GetScheduledEvaluationRun. |
name |
Required. The resource name of the scheduled evaluation run to retrieve. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.types.ScheduledEvaluationRun |
Represents a scheduled evaluation run configuration. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.ces_v1beta.services.evaluation_service.transports.base.EvaluationServiceTransport
]Returns an appropriate transport class.
| Parameter | |
|---|---|
| Name | Description |
label |
typing.Optional[str]
The name of the desired transport. If none is provided, then the first transport in the registry is used. |
guardrail_path
guardrail_path(project: str, location: str, app: str, guardrail: str) -> strReturns 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_async.AsyncRetry,
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_async.AsyncOperationImports 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
async def sample_import_evaluations():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ImportEvaluationsRequest, dict]]
The request object. Request message for EvaluationService.ImportEvaluations. |
parent |
Required. The app to import the evaluations into. Format: |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
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_async.AsyncRetry,
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.ListEvaluationDatasetsAsyncPager
)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
async def sample_list_evaluation_datasets():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ListEvaluationDatasetsRequest, dict]]
The request object. Request message for EvaluationService.ListEvaluationDatasets. |
parent |
Required. The resource name of the app to list evaluation datasets from. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationDatasetsAsyncPager |
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_async.AsyncRetry,
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.ListEvaluationExpectationsAsyncPager
)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
async def sample_list_evaluation_expectations():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ListEvaluationExpectationsRequest, dict]]
The request object. Request message for EvaluationService.ListEvaluationExpectations. |
parent |
Required. The resource name of the app to list evaluation expectations from. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationExpectationsAsyncPager |
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_async.AsyncRetry,
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.ListEvaluationResultsAsyncPager
)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
async def sample_list_evaluation_results():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ListEvaluationResultsRequest, dict]]
The request object. Request message for EvaluationService.ListEvaluationResults. |
parent |
Required. The resource name of the evaluation to list evaluation results from. To filter by evaluation run, use |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationResultsAsyncPager |
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_async.AsyncRetry,
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.ListEvaluationRunsAsyncPager
)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
async def sample_list_evaluation_runs():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ListEvaluationRunsRequest, dict]]
The request object. Request message for EvaluationService.ListEvaluationRuns. |
parent |
Required. The resource name of the app to list evaluation runs from. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationRunsAsyncPager |
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_async.AsyncRetry,
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.ListEvaluationsAsyncPager
)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
async def sample_list_evaluations():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.ListEvaluationsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_evaluations(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ListEvaluationsRequest, dict]]
The request object. Request message for EvaluationService.ListEvaluations. |
parent |
Required. The resource name of the app to list evaluations from. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListEvaluationsAsyncPager |
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_async.AsyncRetry,
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.ListLocationsResponseLists information about the supported locations for this service.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
|
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_async.AsyncRetry,
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.ListOperationsResponseLists operations that match the specified filter in the request.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
|
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_async.AsyncRetry,
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.ListScheduledEvaluationRunsAsyncPager
)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
async def sample_list_scheduled_evaluation_runs():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.ListScheduledEvaluationRunsRequest, dict]]
The request object. Request message for EvaluationService.ListScheduledEvaluationRuns. |
parent |
Required. The resource name of the app to list scheduled evaluation runs from. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.services.evaluation_service.pagers.ListScheduledEvaluationRunsAsyncPager |
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_async.AsyncRetry,
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_async.AsyncOperationRuns 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
async def sample_run_evaluation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = (await operation).result()
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.RunEvaluationRequest, dict]]
The request object. Request message for EvaluationService.RunEvaluation. |
app |
Required. The app to evaluate. Format: |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
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
) -> strReturns 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_async.AsyncRetry,
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.TestPersonaVoiceResponseTests 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
async def sample_test_persona_voice():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.TestPersonaVoiceRequest(
app="app_value",
persona_id="persona_id_value",
text="text_value",
)
# Make the request
response = await client.test_persona_voice(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.TestPersonaVoiceRequest, dict]]
The request object. Request message for EvaluationService.TestPersonaVoice. |
app |
Required. the resource name of the app to test the persona voice for. Format: |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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) -> strReturns a fully-qualified tool string.
toolset_path
toolset_path(project: str, location: str, app: str, toolset: str) -> strReturns 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_async.AsyncRetry,
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.EvaluationUpdates 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
async def sample_update_evaluation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.update_evaluation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.UpdateEvaluationRequest, dict]]
The request object. Request message for EvaluationService.UpdateEvaluation. |
evaluation |
Evaluation
Required. The evaluation to update. This corresponds to the |
update_mask |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationDatasetUpdates 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
async def sample_update_evaluation_dataset():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.update_evaluation_dataset(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.UpdateEvaluationDatasetRequest, dict]]
The request object. Request message for EvaluationService.UpdateEvaluationDataset. |
evaluation_dataset |
EvaluationDataset
Required. The evaluation dataset to update. This corresponds to the |
update_mask |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.EvaluationExpectationUpdates 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
async def sample_update_evaluation_expectation():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.update_evaluation_expectation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.UpdateEvaluationExpectationRequest, dict]]
The request object. Request message for EvaluationService.UpdateEvaluationExpectation. |
evaluation_expectation |
EvaluationExpectation
Required. The evaluation expectation to update. This corresponds to the |
update_mask |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.ScheduledEvaluationRunUpdates 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
async def sample_update_scheduled_evaluation_run():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# 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 = await client.update_scheduled_evaluation_run(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.UpdateScheduledEvaluationRunRequest, dict]]
The request object. Request message for EvaluationService.UpdateScheduledEvaluationRun. |
scheduled_evaluation_run |
ScheduledEvaluationRun
Required. The scheduled evaluation run to update. This corresponds to the |
update_mask |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| 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_async.AsyncRetry,
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.UploadEvaluationAudioResponseUploads 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
async def sample_upload_evaluation_audio():
# Create a client
client = ces_v1beta.EvaluationServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1beta.UploadEvaluationAudioRequest(
name="name_value",
audio_content=b'audio_content_blob',
)
# Make the request
response = await client.upload_evaluation_audio(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1beta.types.UploadEvaluationAudioRequest, dict]]
The request object. Request message for EvaluationService.UploadEvaluationAudio. |
name |
Required. The resource name of the Evaluation for which to upload the evaluation audio. Format: |
audio_content |
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 |
retry |
google.api_core.retry_async.AsyncRetry
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 |
| Returns | |
|---|---|
| Type | Description |
google.cloud.ces_v1beta.types.UploadEvaluationAudioResponse |
Response message for EvaluationService.UploadEvaluationAudio. |