AgentServiceAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.ces_v1.services.agent_service.transports.base.AgentServiceTransport,
typing.Callable[
[...],
google.cloud.ces_v1.services.agent_service.transports.base.AgentServiceTransport,
],
]
] = "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
)The service that manages agent-related resources in Gemini Enterprise for Customer Engagement (CES).
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 |
AgentServiceTransport |
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
AgentServiceAsyncClient
AgentServiceAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.ces_v1.services.agent_service.transports.base.AgentServiceTransport,
typing.Callable[
[...],
google.cloud.ces_v1.services.agent_service.transports.base.AgentServiceTransport,
],
]
] = "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 agent 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,AgentServiceTransport,Callable[..., AgentServiceTransport]]]
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 AgentServiceTransport 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.
batch_delete_conversations
batch_delete_conversations(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.BatchDeleteConversationsRequest,
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.AsyncOperationBatch deletes the specified conversations.
# 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_v1
async def sample_batch_delete_conversations():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.BatchDeleteConversationsRequest(
parent="parent_value",
conversations=['conversations_value1', 'conversations_value2'],
)
# Make the request
operation = client.batch_delete_conversations(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_v1.types.BatchDeleteConversationsRequest, dict]]
The request object. Request message for AgentService.BatchDeleteConversations. |
parent |
Required. The resource name of the app to delete conversations from. 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 BatchDeleteConversationsResponse Response message for AgentService.BatchDeleteConversations. |
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_agent
create_agent(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.CreateAgentRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
agent: typing.Optional[google.cloud.ces_v1.types.agent.Agent] = None,
agent_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_v1.types.agent.AgentCreates a new agent 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_v1
async def sample_create_agent():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
agent = ces_v1.Agent()
agent.display_name = "display_name_value"
request = ces_v1.CreateAgentRequest(
parent="parent_value",
agent=agent,
)
# Make the request
response = await client.create_agent(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateAgentRequest, dict]]
The request object. Request message for AgentService.CreateAgent. |
parent |
Required. The resource name of the app to create an agent in. This corresponds to the |
agent |
Agent
Required. The agent to create. This corresponds to the |
agent_id |
Optional. The ID to use for the agent, which will become the final component of the agent's resource name. If not provided, a unique ID will be automatically assigned for the agent. 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_v1.types.Agent |
An agent acts as the fundamental building block that provides instructions to the Large Language Model (LLM) for executing specific tasks. |
create_app
create_app(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.CreateAppRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
app: typing.Optional[google.cloud.ces_v1.types.app.App] = None,
app_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.api_core.operation_async.AsyncOperationCreates a new app in the given project and location.
# 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_v1
async def sample_create_app():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
app = ces_v1.App()
app.display_name = "display_name_value"
request = ces_v1.CreateAppRequest(
parent="parent_value",
app=app,
)
# Make the request
operation = client.create_app(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_v1.types.CreateAppRequest, dict]]
The request object. Request message for AgentService.CreateApp. |
parent |
Required. The resource name of the location to create an app in. This corresponds to the |
app |
App
Required. The app to create. This corresponds to the |
app_id |
Optional. The ID to use for the app, which will become the final component of the app's resource name. If not provided, a unique ID will be automatically assigned for the app. 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 App An app serves as a top-level container for a group of agents, including the root agent and its sub-agents, along with their associated configurations. These agents work together to achieve specific goals within the app's context. |
create_app_version
create_app_version(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.CreateAppVersionRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
app_version: typing.Optional[
google.cloud.ces_v1.types.app_version.AppVersion
] = None,
app_version_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_v1.types.app_version.AppVersionCreates a new app version 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_v1
async def sample_create_app_version():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.CreateAppVersionRequest(
parent="parent_value",
)
# Make the request
response = await client.create_app_version(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateAppVersionRequest, dict]]
The request object. Request message for AgentService.CreateAppVersion |
parent |
Required. The resource name of the app to create an app version in. This corresponds to the |
app_version |
AppVersion
Required. The app version to create. This corresponds to the |
app_version_id |
Optional. The ID to use for the app version, which will become the final component of the app version's resource name. If not provided, a unique ID will be automatically assigned for the app version. 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_v1.types.AppVersion |
In Customer Engagement Suite (CES), an app version is a snapshot of the app at a specific point in time. It is immutable and cannot be modified once created. |
create_deployment
create_deployment(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.CreateDeploymentRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
deployment: typing.Optional[google.cloud.ces_v1.types.deployment.Deployment] = None,
deployment_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_v1.types.deployment.DeploymentCreates a new deployment 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_v1
async def sample_create_deployment():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
deployment = ces_v1.Deployment()
deployment.display_name = "display_name_value"
request = ces_v1.CreateDeploymentRequest(
parent="parent_value",
deployment=deployment,
)
# Make the request
response = await client.create_deployment(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateDeploymentRequest, dict]]
The request object. Request message for AgentService.CreateDeployment. |
parent |
Required. The parent app. Format: |
deployment |
Deployment
Required. The deployment to create. This corresponds to the |
deployment_id |
Optional. The ID to use for the deployment, which will become the final component of the deployment's resource name. If not provided, a unique ID will be automatically assigned for the deployment. 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_v1.types.Deployment |
A deployment represents an immutable, queryable version of the app. It is used to deploy an app version with a specific channel profile. |
create_example
create_example(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.CreateExampleRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
example: typing.Optional[google.cloud.ces_v1.types.example.Example] = None,
example_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_v1.types.example.ExampleCreates a new example 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_v1
async def sample_create_example():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
example = ces_v1.Example()
example.display_name = "display_name_value"
request = ces_v1.CreateExampleRequest(
parent="parent_value",
example=example,
)
# Make the request
response = await client.create_example(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateExampleRequest, dict]]
The request object. Request message for AgentService.CreateExample. |
parent |
Required. The resource name of the app to create an example in. This corresponds to the |
example |
Example
Required. The example to create. This corresponds to the |
example_id |
Optional. The ID to use for the example, which will become the final component of the example's resource name. If not provided, a unique ID will be automatically assigned for the example. 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_v1.types.Example |
An example represents a sample conversation between the user and the agent(s). |
create_guardrail
create_guardrail(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.CreateGuardrailRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
guardrail: typing.Optional[google.cloud.ces_v1.types.guardrail.Guardrail] = None,
guardrail_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_v1.types.guardrail.GuardrailCreates a new guardrail 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_v1
async def sample_create_guardrail():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
guardrail = ces_v1.Guardrail()
guardrail.content_filter.match_type = "REGEXP_MATCH"
guardrail.display_name = "display_name_value"
request = ces_v1.CreateGuardrailRequest(
parent="parent_value",
guardrail=guardrail,
)
# Make the request
response = await client.create_guardrail(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateGuardrailRequest, dict]]
The request object. Request message for AgentService.CreateGuardrail. |
parent |
Required. The resource name of the app to create a guardrail in. This corresponds to the |
guardrail |
Guardrail
Required. The guardrail to create. This corresponds to the |
guardrail_id |
Optional. The ID to use for the guardrail, which will become the final component of the guardrail's resource name. If not provided, a unique ID will be automatically assigned for the guardrail. 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_v1.types.Guardrail |
Guardrail contains a list of checks and balances to keep the agents safe and secure. |
create_tool
create_tool(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.CreateToolRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
tool: typing.Optional[google.cloud.ces_v1.types.tool.Tool] = None,
tool_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_v1.types.tool.ToolCreates a new tool 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_v1
async def sample_create_tool():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
tool = ces_v1.Tool()
tool.client_function.name = "name_value"
request = ces_v1.CreateToolRequest(
parent="parent_value",
tool=tool,
)
# Make the request
response = await client.create_tool(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateToolRequest, dict]]
The request object. Request message for AgentService.CreateTool. |
parent |
Required. The resource name of the app to create a tool in. This corresponds to the |
tool |
Tool
Required. The tool to create. This corresponds to the |
tool_id |
Optional. The ID to use for the tool, which will become the final component of the tool's resource name. If not provided, a unique ID will be automatically assigned for the tool. 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_v1.types.Tool |
A tool represents an action that the CES agent can take to achieve certain goals. |
create_toolset
create_toolset(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.CreateToolsetRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
toolset: typing.Optional[google.cloud.ces_v1.types.toolset.Toolset] = None,
toolset_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_v1.types.toolset.ToolsetCreates a new toolset 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_v1
async def sample_create_toolset():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
toolset = ces_v1.Toolset()
toolset.mcp_toolset.server_address = "server_address_value"
request = ces_v1.CreateToolsetRequest(
parent="parent_value",
toolset=toolset,
)
# Make the request
response = await client.create_toolset(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.CreateToolsetRequest, dict]]
The request object. Request message for AgentService.CreateToolset. |
parent |
Required. The resource name of the app to create a toolset in. This corresponds to the |
toolset |
Toolset
Required. The toolset to create. This corresponds to the |
toolset_id |
Optional. The ID to use for the toolset, which will become the final component of the toolset's resource name. If not provided, a unique ID will be automatically assigned for the toolset. 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_v1.types.Toolset |
A toolset represents a group of dynamically managed tools that can be used by the agent. |
deidentify_template_path
deidentify_template_path(
organization: str, location: str, deidentify_template: str
) -> strReturns a fully-qualified deidentify_template string.
delete_agent
delete_agent(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.DeleteAgentRequest, 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 the specified agent.
# 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_v1
async def sample_delete_agent():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteAgentRequest(
name="name_value",
)
# Make the request
await client.delete_agent(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteAgentRequest, dict]]
The request object. Request message for AgentService.DeleteAgent. |
name |
Required. The resource name of the agent 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_app
delete_app(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.DeleteAppRequest, 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 the specified 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_v1
async def sample_delete_app():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteAppRequest(
name="name_value",
)
# Make the request
operation = client.delete_app(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_v1.types.DeleteAppRequest, dict]]
The request object. Request message for AgentService.DeleteApp. |
name |
Required. The resource name of the app 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_app_version
delete_app_version(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.DeleteAppVersionRequest, 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 the specified app version.
# 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_v1
async def sample_delete_app_version():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteAppVersionRequest(
name="name_value",
)
# Make the request
await client.delete_app_version(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteAppVersionRequest, dict]]
The request object. Request message for AgentService.DeleteAppVersion. |
name |
Required. The resource name of the app version 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_conversation
delete_conversation(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.DeleteConversationRequest, 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 the specified 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_v1
async def sample_delete_conversation():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteConversationRequest(
name="name_value",
)
# Make the request
await client.delete_conversation(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteConversationRequest, dict]]
The request object. Request message for AgentService.DeleteConversation. |
name |
Required. The resource name of the conversation 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_deployment
delete_deployment(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.DeleteDeploymentRequest, 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 the specified deployment.
# 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_v1
async def sample_delete_deployment():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteDeploymentRequest(
name="name_value",
)
# Make the request
await client.delete_deployment(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteDeploymentRequest, dict]]
The request object. Request message for AgentService.DeleteDeployment. |
name |
Required. The name of the deployment to delete. 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 |
delete_example
delete_example(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.DeleteExampleRequest, 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 the specified example.
# 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_v1
async def sample_delete_example():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteExampleRequest(
name="name_value",
)
# Make the request
await client.delete_example(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteExampleRequest, dict]]
The request object. Request message for AgentService.DeleteExample. |
name |
Required. The resource name of the example 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_guardrail
delete_guardrail(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.DeleteGuardrailRequest, 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 the specified guardrail.
# 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_v1
async def sample_delete_guardrail():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteGuardrailRequest(
name="name_value",
)
# Make the request
await client.delete_guardrail(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteGuardrailRequest, dict]]
The request object. Request message for AgentService.DeleteGuardrail. |
name |
Required. The resource name of the guardrail 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_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_tool
delete_tool(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.DeleteToolRequest, 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 the specified tool.
# 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_v1
async def sample_delete_tool():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteToolRequest(
name="name_value",
)
# Make the request
await client.delete_tool(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteToolRequest, dict]]
The request object. Request message for AgentService.DeleteTool. |
name |
Required. The resource name of the tool 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_toolset
delete_toolset(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.DeleteToolsetRequest, 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 the specified toolset.
# 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_v1
async def sample_delete_toolset():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.DeleteToolsetRequest(
name="name_value",
)
# Make the request
await client.delete_toolset(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.DeleteToolsetRequest, dict]]
The request object. Request message for AgentService.DeleteToolset. |
name |
Required. The resource name of the toolset 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 |
deployment_path
deployment_path(project: str, location: str, app: str, deployment: str) -> strReturns a fully-qualified deployment string.
dialogflow_agent_path
dialogflow_agent_path(project: str, location: str, agent: str) -> strReturns a fully-qualified dialogflow_agent string.
engine_path
engine_path(project: str, location: str, collection: str, engine: str) -> strReturns a fully-qualified engine string.
example_path
example_path(project: str, location: str, app: str, example: str) -> strReturns a fully-qualified example string.
export_app
export_app(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ExportAppRequest, 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.AsyncOperationExports the specified 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_v1
async def sample_export_app():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ExportAppRequest(
name="name_value",
export_format="YAML",
)
# Make the request
operation = client.export_app(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_v1.types.ExportAppRequest, dict]]
The request object. Request message for AgentService.ExportApp. |
name |
Required. The resource name of the app to export. 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 ExportAppResponse Response message for AgentService.ExportApp. |
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 |
AgentServiceAsyncClient |
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 |
AgentServiceAsyncClient |
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 |
AgentServiceAsyncClient |
The constructed client. |
get_agent
get_agent(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetAgentRequest, 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_v1.types.agent.AgentGets details of the specified agent.
# 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_v1
async def sample_get_agent():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetAgentRequest(
name="name_value",
)
# Make the request
response = await client.get_agent(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetAgentRequest, dict]]
The request object. Request message for AgentService.GetAgent. |
name |
Required. The resource name of the agent 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_v1.types.Agent |
An agent acts as the fundamental building block that provides instructions to the Large Language Model (LLM) for executing specific tasks. |
get_app
get_app(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetAppRequest, 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_v1.types.app.AppGets details of the specified 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_v1
async def sample_get_app():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetAppRequest(
name="name_value",
)
# Make the request
response = await client.get_app(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetAppRequest, dict]]
The request object. Request message for AgentService.GetApp. |
name |
Required. The resource name of the app 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_v1.types.App |
An app serves as a top-level container for a group of agents, including the root agent and its sub-agents, along with their associated configurations. These agents work together to achieve specific goals within the app's context. |
get_app_version
get_app_version(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetAppVersionRequest, 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_v1.types.app_version.AppVersionGets details of the specified app version.
# 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_v1
async def sample_get_app_version():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetAppVersionRequest(
name="name_value",
)
# Make the request
response = await client.get_app_version(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetAppVersionRequest, dict]]
The request object. Request message for AgentService.GetAppVersion. |
name |
Required. The resource name of the app version 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_v1.types.AppVersion |
In Customer Engagement Suite (CES), an app version is a snapshot of the app at a specific point in time. It is immutable and cannot be modified once created. |
get_changelog
get_changelog(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetChangelogRequest, 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_v1.types.changelog.ChangelogGets the specified changelog.
# 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_v1
async def sample_get_changelog():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetChangelogRequest(
name="name_value",
)
# Make the request
response = await client.get_changelog(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetChangelogRequest, dict]]
The request object. Request message for AgentService.GetChangelog. |
name |
Required. The resource name of the changelog 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_v1.types.Changelog |
Changelogs represent a change made to the app or to an resource within the app. |
get_conversation
get_conversation(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.GetConversationRequest, 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_v1.types.conversation.ConversationGets details of the specified 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_v1
async def sample_get_conversation():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetConversationRequest(
name="name_value",
)
# Make the request
response = await client.get_conversation(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetConversationRequest, dict]]
The request object. Request message for AgentService.GetConversation. |
name |
Required. The resource name of the conversation 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_v1.types.Conversation |
A conversation represents an interaction between an end user and the CES app. |
get_deployment
get_deployment(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetDeploymentRequest, 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_v1.types.deployment.DeploymentGets details of the specified deployment.
# 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_v1
async def sample_get_deployment():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetDeploymentRequest(
name="name_value",
)
# Make the request
response = await client.get_deployment(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetDeploymentRequest, dict]]
The request object. Request message for AgentService.GetDeployment. |
name |
Required. The name of the deployment. 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_v1.types.Deployment |
A deployment represents an immutable, queryable version of the app. It is used to deploy an app version with a specific channel profile. |
get_example
get_example(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetExampleRequest, 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_v1.types.example.ExampleGets details of the specified example.
# 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_v1
async def sample_get_example():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetExampleRequest(
name="name_value",
)
# Make the request
response = await client.get_example(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetExampleRequest, dict]]
The request object. Request message for AgentService.GetExample. |
name |
Required. The resource name of the example 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_v1.types.Example |
An example represents a sample conversation between the user and the agent(s). |
get_guardrail
get_guardrail(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetGuardrailRequest, 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_v1.types.guardrail.GuardrailGets details of the specified guardrail.
# 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_v1
async def sample_get_guardrail():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetGuardrailRequest(
name="name_value",
)
# Make the request
response = await client.get_guardrail(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetGuardrailRequest, dict]]
The request object. Request message for AgentService.GetGuardrail. |
name |
Required. The resource name of the guardrail 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_v1.types.Guardrail |
Guardrail contains a list of checks and balances to keep the agents safe and secure. |
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_tool
get_tool(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetToolRequest, 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_v1.types.tool.ToolGets details of the specified tool.
# 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_v1
async def sample_get_tool():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetToolRequest(
name="name_value",
)
# Make the request
response = await client.get_tool(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetToolRequest, dict]]
The request object. Request message for AgentService.GetTool. |
name |
Required. The resource name of the tool 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_v1.types.Tool |
A tool represents an action that the CES agent can take to achieve certain goals. |
get_toolset
get_toolset(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.GetToolsetRequest, 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_v1.types.toolset.ToolsetGets details of the specified toolset.
# 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_v1
async def sample_get_toolset():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.GetToolsetRequest(
name="name_value",
)
# Make the request
response = await client.get_toolset(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.GetToolsetRequest, dict]]
The request object. Request message for AgentService.GetToolset. |
name |
Required. The resource name of the toolset 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_v1.types.Toolset |
A toolset represents a group of dynamically managed tools that can be used by the agent. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.ces_v1.services.agent_service.transports.base.AgentServiceTransport
]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_app
import_app(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ImportAppRequest, dict]
] = None,
*,
parent: typing.Optional[str] = None,
display_name: typing.Optional[str] = None,
app_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.api_core.operation_async.AsyncOperationImports the specified 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_v1
async def sample_import_app():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ImportAppRequest(
gcs_uri="gcs_uri_value",
parent="parent_value",
)
# Make the request
operation = client.import_app(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_v1.types.ImportAppRequest, dict]]
The request object. Request message for AgentService.ImportApp. |
parent |
Required. The parent resource name with the location of the app to import. This corresponds to the |
display_name |
Optional. The display name of the app to import. - If the app is created on import, and the display name is specified, the imported app will use this display name. If a conflict is detected with an existing app, a timestamp will be appended to the display name to make it unique. - If the app is a reimport, this field should not be set. Providing a display name during reimport will result in an INVALID_ARGUMENT error. This corresponds to the |
app_id |
Optional. The ID to use for the imported app. - If not specified, a unique ID will be automatically assigned for the app. - Otherwise, the imported app will use this ID as the final component of its resource name. If an app with the same ID already exists at the specified location in the project, the content of the existing app will be replaced. 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 ImportAppResponse Response message for AgentService.ImportApp. |
inspect_template_path
inspect_template_path(
organization: str, location: str, inspect_template: str
) -> strReturns a fully-qualified inspect_template string.
list_agents
list_agents(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ListAgentsRequest, 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_v1.services.agent_service.pagers.ListAgentsAsyncPagerLists agents 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_v1
async def sample_list_agents():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListAgentsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_agents(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListAgentsRequest, dict]]
The request object. Request message for AgentService.ListAgents. |
parent |
Required. The resource name of the app to list agents 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_v1.services.agent_service.pagers.ListAgentsAsyncPager |
Response message for AgentService.ListAgents. Iterating over this object will yield results and resolve additional pages automatically. |
list_app_versions
list_app_versions(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.ListAppVersionsRequest, 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_v1.services.agent_service.pagers.ListAppVersionsAsyncPagerLists all app versions 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_v1
async def sample_list_app_versions():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListAppVersionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_app_versions(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListAppVersionsRequest, dict]]
The request object. Request message for AgentService.ListAppVersions. |
parent |
Required. The resource name of the app to list app versions 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_v1.services.agent_service.pagers.ListAppVersionsAsyncPager |
Response message for AgentService.ListAppVersions. Iterating over this object will yield results and resolve additional pages automatically. |
list_apps
list_apps(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ListAppsRequest, 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_v1.services.agent_service.pagers.ListAppsAsyncPagerLists apps in the given project and location.
# 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_v1
async def sample_list_apps():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListAppsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_apps(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListAppsRequest, dict]]
The request object. Request message for AgentService.ListApps. |
parent |
Required. The resource name of the location to list apps 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_v1.services.agent_service.pagers.ListAppsAsyncPager |
Response message for AgentService.ListApps. Iterating over this object will yield results and resolve additional pages automatically. |
list_changelogs
list_changelogs(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.ListChangelogsRequest, 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_v1.services.agent_service.pagers.ListChangelogsAsyncPagerLists the changelogs of the specified 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_v1
async def sample_list_changelogs():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListChangelogsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_changelogs(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListChangelogsRequest, dict]]
The request object. Request message for AgentService.ListChangelogs. |
parent |
Required. The resource name of the app to list changelogs 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_v1.services.agent_service.pagers.ListChangelogsAsyncPager |
Response message for AgentService.ListChangelogs. Iterating over this object will yield results and resolve additional pages automatically. |
list_conversations
list_conversations(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.ListConversationsRequest, 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_v1.services.agent_service.pagers.ListConversationsAsyncPagerLists conversations 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_v1
async def sample_list_conversations():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListConversationsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_conversations(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListConversationsRequest, dict]]
The request object. Request message for AgentService.ListConversations. |
parent |
Required. The resource name of the app to list conversations 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_v1.services.agent_service.pagers.ListConversationsAsyncPager |
Response message for AgentService.ListConversations. Iterating over this object will yield results and resolve additional pages automatically. |
list_deployments
list_deployments(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.ListDeploymentsRequest, 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_v1.services.agent_service.pagers.ListDeploymentsAsyncPagerLists deployments 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_v1
async def sample_list_deployments():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListDeploymentsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_deployments(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListDeploymentsRequest, dict]]
The request object. Request message for AgentService.ListDeployments. |
parent |
Required. The parent app. 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_v1.services.agent_service.pagers.ListDeploymentsAsyncPager |
Response message for AgentService.ListDeployments. Iterating over this object will yield results and resolve additional pages automatically. |
list_examples
list_examples(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ListExamplesRequest, 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_v1.services.agent_service.pagers.ListExamplesAsyncPagerLists examples 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_v1
async def sample_list_examples():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListExamplesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_examples(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListExamplesRequest, dict]]
The request object. Request message for AgentService.ListExamples. |
parent |
Required. The resource name of the app to list examples 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_v1.services.agent_service.pagers.ListExamplesAsyncPager |
Response message for AgentService.ListExamples. Iterating over this object will yield results and resolve additional pages automatically. |
list_guardrails
list_guardrails(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.ListGuardrailsRequest, 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_v1.services.agent_service.pagers.ListGuardrailsAsyncPagerLists guardrails 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_v1
async def sample_list_guardrails():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListGuardrailsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_guardrails(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListGuardrailsRequest, dict]]
The request object. Request message for AgentService.ListGuardrails. |
parent |
Required. The resource name of the app to list guardrails 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_v1.services.agent_service.pagers.ListGuardrailsAsyncPager |
Response message for AgentService.ListGuardrails. 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_tools
list_tools(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ListToolsRequest, 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_v1.services.agent_service.pagers.ListToolsAsyncPagerLists tools 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_v1
async def sample_list_tools():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListToolsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_tools(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListToolsRequest, dict]]
The request object. Request message for AgentService.ListTools. |
parent |
Required. The resource name of the app to list tools 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_v1.services.agent_service.pagers.ListToolsAsyncPager |
Response message for AgentService.ListTools. Iterating over this object will yield results and resolve additional pages automatically. |
list_toolsets
list_toolsets(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.ListToolsetsRequest, 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_v1.services.agent_service.pagers.ListToolsetsAsyncPagerLists toolsets 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_v1
async def sample_list_toolsets():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.ListToolsetsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_toolsets(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.ListToolsetsRequest, dict]]
The request object. Request message for AgentService.ListToolsets. |
parent |
Required. The resource name of the app to list toolsets 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_v1.services.agent_service.pagers.ListToolsetsAsyncPager |
Response message for AgentService.ListToolsets. 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_deidentify_template_path
parse_deidentify_template_path(path: str) -> typing.Dict[str, str]Parses a deidentify_template path into its component segments.
parse_deployment_path
parse_deployment_path(path: str) -> typing.Dict[str, str]Parses a deployment path into its component segments.
parse_dialogflow_agent_path
parse_dialogflow_agent_path(path: str) -> typing.Dict[str, str]Parses a dialogflow_agent path into its component segments.
parse_engine_path
parse_engine_path(path: str) -> typing.Dict[str, str]Parses a engine path into its component segments.
parse_example_path
parse_example_path(path: str) -> typing.Dict[str, str]Parses a example 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_inspect_template_path
parse_inspect_template_path(path: str) -> typing.Dict[str, str]Parses a inspect_template path into its component segments.
parse_secret_version_path
parse_secret_version_path(path: str) -> typing.Dict[str, str]Parses a secret_version path into its component segments.
parse_service_path
parse_service_path(path: str) -> typing.Dict[str, str]Parses a service 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.
restore_app_version
restore_app_version(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.RestoreAppVersionRequest, 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.AsyncOperationRestores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.
# 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_v1
async def sample_restore_app_version():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
request = ces_v1.RestoreAppVersionRequest(
name="name_value",
)
# Make the request
operation = client.restore_app_version(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_v1.types.RestoreAppVersionRequest, dict]]
The request object. Request message for AgentService.RestoreAppVersion |
name |
Required. The resource name of the app version to restore. 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 RestoreAppVersionResponse Response message for AgentService.RestoreAppVersion |
secret_version_path
secret_version_path(project: str, secret: str, secret_version: str) -> strReturns a fully-qualified secret_version string.
service_path
service_path(project: str, location: str, namespace: str, service: str) -> strReturns a fully-qualified service string.
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_agent
update_agent(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.UpdateAgentRequest, dict]
] = None,
*,
agent: typing.Optional[google.cloud.ces_v1.types.agent.Agent] = 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_v1.types.agent.AgentUpdates the specified agent.
# 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_v1
async def sample_update_agent():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
agent = ces_v1.Agent()
agent.display_name = "display_name_value"
request = ces_v1.UpdateAgentRequest(
agent=agent,
)
# Make the request
response = await client.update_agent(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateAgentRequest, dict]]
The request object. Request message for AgentService.UpdateAgent. |
agent |
Agent
Required. The agent 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_v1.types.Agent |
An agent acts as the fundamental building block that provides instructions to the Large Language Model (LLM) for executing specific tasks. |
update_app
update_app(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.UpdateAppRequest, dict]
] = None,
*,
app: typing.Optional[google.cloud.ces_v1.types.app.App] = 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_v1.types.app.AppUpdates the specified 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_v1
async def sample_update_app():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
app = ces_v1.App()
app.display_name = "display_name_value"
request = ces_v1.UpdateAppRequest(
app=app,
)
# Make the request
response = await client.update_app(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateAppRequest, dict]]
The request object. Request message for AgentService.UpdateApp. |
app |
App
Required. The app 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_v1.types.App |
An app serves as a top-level container for a group of agents, including the root agent and its sub-agents, along with their associated configurations. These agents work together to achieve specific goals within the app's context. |
update_deployment
update_deployment(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.UpdateDeploymentRequest, dict
]
] = None,
*,
deployment: typing.Optional[google.cloud.ces_v1.types.deployment.Deployment] = 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_v1.types.deployment.DeploymentUpdates the specified deployment.
# 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_v1
async def sample_update_deployment():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
deployment = ces_v1.Deployment()
deployment.display_name = "display_name_value"
request = ces_v1.UpdateDeploymentRequest(
deployment=deployment,
)
# Make the request
response = await client.update_deployment(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateDeploymentRequest, dict]]
The request object. Request message for AgentService.UpdateDeployment. |
deployment |
Deployment
Required. The deployment to update. This corresponds to the |
update_mask |
Optional. The list of fields to update. 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_v1.types.Deployment |
A deployment represents an immutable, queryable version of the app. It is used to deploy an app version with a specific channel profile. |
update_example
update_example(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.UpdateExampleRequest, dict]
] = None,
*,
example: typing.Optional[google.cloud.ces_v1.types.example.Example] = 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_v1.types.example.ExampleUpdates the specified example.
# 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_v1
async def sample_update_example():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
example = ces_v1.Example()
example.display_name = "display_name_value"
request = ces_v1.UpdateExampleRequest(
example=example,
)
# Make the request
response = await client.update_example(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateExampleRequest, dict]]
The request object. Request message for AgentService.UpdateExample. |
example |
Example
Required. The example 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_v1.types.Example |
An example represents a sample conversation between the user and the agent(s). |
update_guardrail
update_guardrail(
request: typing.Optional[
typing.Union[
google.cloud.ces_v1.types.agent_service.UpdateGuardrailRequest, dict
]
] = None,
*,
guardrail: typing.Optional[google.cloud.ces_v1.types.guardrail.Guardrail] = 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_v1.types.guardrail.GuardrailUpdates the specified guardrail.
# 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_v1
async def sample_update_guardrail():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
guardrail = ces_v1.Guardrail()
guardrail.content_filter.match_type = "REGEXP_MATCH"
guardrail.display_name = "display_name_value"
request = ces_v1.UpdateGuardrailRequest(
guardrail=guardrail,
)
# Make the request
response = await client.update_guardrail(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateGuardrailRequest, dict]]
The request object. Request message for AgentService.UpdateGuardrail. |
guardrail |
Guardrail
Required. The guardrail 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_v1.types.Guardrail |
Guardrail contains a list of checks and balances to keep the agents safe and secure. |
update_tool
update_tool(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.UpdateToolRequest, dict]
] = None,
*,
tool: typing.Optional[google.cloud.ces_v1.types.tool.Tool] = 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_v1.types.tool.ToolUpdates the specified tool.
# 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_v1
async def sample_update_tool():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
tool = ces_v1.Tool()
tool.client_function.name = "name_value"
request = ces_v1.UpdateToolRequest(
tool=tool,
)
# Make the request
response = await client.update_tool(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateToolRequest, dict]]
The request object. Request message for AgentService.UpdateTool. |
tool |
Tool
Required. The tool 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_v1.types.Tool |
A tool represents an action that the CES agent can take to achieve certain goals. |
update_toolset
update_toolset(
request: typing.Optional[
typing.Union[google.cloud.ces_v1.types.agent_service.UpdateToolsetRequest, dict]
] = None,
*,
toolset: typing.Optional[google.cloud.ces_v1.types.toolset.Toolset] = 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_v1.types.toolset.ToolsetUpdates the specified toolset.
# 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_v1
async def sample_update_toolset():
# Create a client
client = ces_v1.AgentServiceAsyncClient()
# Initialize request argument(s)
toolset = ces_v1.Toolset()
toolset.mcp_toolset.server_address = "server_address_value"
request = ces_v1.UpdateToolsetRequest(
toolset=toolset,
)
# Make the request
response = await client.update_toolset(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.ces_v1.types.UpdateToolsetRequest, dict]]
The request object. Request message for AgentService.UpdateToolset. |
toolset |
Toolset
Required. The toolset 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_v1.types.Toolset |
A toolset represents a group of dynamically managed tools that can be used by the agent. |