google-cloud-ces-v1 0.a → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/ces/v1/agent_pb.rb +30 -0
- data/lib/google/cloud/ces/v1/agent_service/client.rb +5315 -0
- data/lib/google/cloud/ces/v1/agent_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/agent_service/operations.rb +841 -0
- data/lib/google/cloud/ces/v1/agent_service/paths.rb +424 -0
- data/lib/google/cloud/ces/v1/agent_service/rest/client.rb +4944 -0
- data/lib/google/cloud/ces/v1/agent_service/rest/operations.rb +925 -0
- data/lib/google/cloud/ces/v1/agent_service/rest/service_stub.rb +3028 -0
- data/lib/google/cloud/ces/v1/agent_service/rest.rb +55 -0
- data/lib/google/cloud/ces/v1/agent_service.rb +57 -0
- data/lib/google/cloud/ces/v1/agent_service_pb.rb +105 -0
- data/lib/google/cloud/ces/v1/agent_service_services_pb.rb +142 -0
- data/lib/google/cloud/ces/v1/agent_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/agent_transfers_pb.rb +29 -0
- data/lib/google/cloud/ces/v1/app_pb.rb +58 -0
- data/lib/google/cloud/ces/v1/app_version_pb.rb +32 -0
- data/lib/google/cloud/ces/v1/auth_pb.rb +34 -0
- data/lib/google/cloud/ces/v1/bigquery_export_pb.rb +23 -0
- data/lib/google/cloud/ces/v1/bindings_override.rb +75 -0
- data/lib/google/cloud/ces/v1/changelog_pb.rb +26 -0
- data/lib/google/cloud/ces/v1/client_function_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/common_pb.rb +46 -0
- data/lib/google/cloud/ces/v1/connector_tool_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/connector_toolset_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/conversation_pb.rb +31 -0
- data/lib/google/cloud/ces/v1/data_store_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/data_store_tool_pb.rb +40 -0
- data/lib/google/cloud/ces/v1/deployment_pb.rb +26 -0
- data/lib/google/cloud/ces/v1/example_pb.rb +34 -0
- data/lib/google/cloud/ces/v1/fakes_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/file_search_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/google_search_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/guardrail_pb.rb +37 -0
- data/lib/google/cloud/ces/v1/mcp_tool_pb.rb +26 -0
- data/lib/google/cloud/ces/v1/mcp_toolset_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/omnichannel_pb.rb +31 -0
- data/lib/google/cloud/ces/v1/omnichannel_service_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/open_api_tool_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/open_api_toolset_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/python_function_pb.rb +23 -0
- data/lib/google/cloud/ces/v1/rest.rb +41 -0
- data/lib/google/cloud/ces/v1/schema_pb.rb +25 -0
- data/lib/google/cloud/ces/v1/search_suggestions_pb.rb +22 -0
- data/lib/google/cloud/ces/v1/security_settings_pb.rb +27 -0
- data/lib/google/cloud/ces/v1/session_service/client.rb +759 -0
- data/lib/google/cloud/ces/v1/session_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/session_service/paths.rb +117 -0
- data/lib/google/cloud/ces/v1/session_service/rest/client.rb +560 -0
- data/lib/google/cloud/ces/v1/session_service/rest/service_stub.rb +199 -0
- data/lib/google/cloud/ces/v1/session_service/rest.rb +53 -0
- data/lib/google/cloud/ces/v1/session_service.rb +55 -0
- data/lib/google/cloud/ces/v1/session_service_pb.rb +50 -0
- data/lib/google/cloud/ces/v1/session_service_services_pb.rb +119 -0
- data/lib/google/cloud/ces/v1/system_tool_pb.rb +23 -0
- data/lib/google/cloud/ces/v1/tool_pb.rb +38 -0
- data/lib/google/cloud/ces/v1/tool_service/client.rb +723 -0
- data/lib/google/cloud/ces/v1/tool_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/tool_service/paths.rb +94 -0
- data/lib/google/cloud/ces/v1/tool_service/rest/client.rb +667 -0
- data/lib/google/cloud/ces/v1/tool_service/rest/service_stub.rb +267 -0
- data/lib/google/cloud/ces/v1/tool_service/rest.rb +53 -0
- data/lib/google/cloud/ces/v1/tool_service.rb +55 -0
- data/lib/google/cloud/ces/v1/tool_service_pb.rb +35 -0
- data/lib/google/cloud/ces/v1/tool_service_services_pb.rb +50 -0
- data/lib/google/cloud/ces/v1/toolset_pb.rb +30 -0
- data/lib/google/cloud/ces/v1/toolset_tool_pb.rb +24 -0
- data/lib/google/cloud/ces/v1/version.rb +7 -2
- data/lib/google/cloud/ces/v1/widget_service/client.rb +501 -0
- data/lib/google/cloud/ces/v1/widget_service/credentials.rb +48 -0
- data/lib/google/cloud/ces/v1/widget_service/paths.rb +75 -0
- data/lib/google/cloud/ces/v1/widget_service/rest/client.rb +459 -0
- data/lib/google/cloud/ces/v1/widget_service/rest/service_stub.rb +143 -0
- data/lib/google/cloud/ces/v1/widget_service/rest.rb +53 -0
- data/lib/google/cloud/ces/v1/widget_service.rb +55 -0
- data/lib/google/cloud/ces/v1/widget_service_pb.rb +28 -0
- data/lib/google/cloud/ces/v1/widget_service_services_pb.rb +46 -0
- data/lib/google/cloud/ces/v1/widget_tool_pb.rb +29 -0
- data/lib/google/cloud/ces/v1.rb +48 -0
- data/lib/google-cloud-ces-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +593 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/ces/v1/agent.rb +224 -0
- data/proto_docs/google/cloud/ces/v1/agent_service.rb +1250 -0
- data/proto_docs/google/cloud/ces/v1/agent_tool.rb +42 -0
- data/proto_docs/google/cloud/ces/v1/agent_transfers.rb +111 -0
- data/proto_docs/google/cloud/ces/v1/app.rb +685 -0
- data/proto_docs/google/cloud/ces/v1/app_version.rb +83 -0
- data/proto_docs/google/cloud/ces/v1/auth.rb +214 -0
- data/proto_docs/google/cloud/ces/v1/bigquery_export.rb +45 -0
- data/proto_docs/google/cloud/ces/v1/changelog.rb +73 -0
- data/proto_docs/google/cloud/ces/v1/client_function.rb +48 -0
- data/proto_docs/google/cloud/ces/v1/common.rb +375 -0
- data/proto_docs/google/cloud/ces/v1/connector_tool.rb +122 -0
- data/proto_docs/google/cloud/ces/v1/connector_toolset.rb +52 -0
- data/proto_docs/google/cloud/ces/v1/conversation.rb +152 -0
- data/proto_docs/google/cloud/ces/v1/data_store.rb +102 -0
- data/proto_docs/google/cloud/ces/v1/data_store_tool.rb +328 -0
- data/proto_docs/google/cloud/ces/v1/deployment.rb +62 -0
- data/proto_docs/google/cloud/ces/v1/example.rb +244 -0
- data/proto_docs/google/cloud/ces/v1/fakes.rb +55 -0
- data/proto_docs/google/cloud/ces/v1/file_search_tool.rb +60 -0
- data/proto_docs/google/cloud/ces/v1/google_search_tool.rb +76 -0
- data/proto_docs/google/cloud/ces/v1/guardrail.rb +324 -0
- data/proto_docs/google/cloud/ces/v1/mcp_tool.rb +85 -0
- data/proto_docs/google/cloud/ces/v1/mcp_toolset.rb +71 -0
- data/proto_docs/google/cloud/ces/v1/omnichannel.rb +163 -0
- data/proto_docs/google/cloud/ces/v1/omnichannel_service.rb +45 -0
- data/proto_docs/google/cloud/ces/v1/open_api_tool.rb +66 -0
- data/proto_docs/google/cloud/ces/v1/open_api_toolset.rb +57 -0
- data/proto_docs/google/cloud/ces/v1/python_function.rb +44 -0
- data/proto_docs/google/cloud/ces/v1/schema.rb +162 -0
- data/proto_docs/google/cloud/ces/v1/search_suggestions.rb +55 -0
- data/proto_docs/google/cloud/ces/v1/security_settings.rb +80 -0
- data/proto_docs/google/cloud/ces/v1/session_service.rb +464 -0
- data/proto_docs/google/cloud/ces/v1/system_tool.rb +38 -0
- data/proto_docs/google/cloud/ces/v1/tool.rb +126 -0
- data/proto_docs/google/cloud/ces/v1/tool_service.rb +168 -0
- data/proto_docs/google/cloud/ces/v1/toolset.rb +80 -0
- data/proto_docs/google/cloud/ces/v1/toolset_tool.rb +40 -0
- data/proto_docs/google/cloud/ces/v1/widget_service.rb +62 -0
- data/proto_docs/google/cloud/ces/v1/widget_tool.rb +146 -0
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +108 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +183 -9
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/ces/v1/session_service_pb"
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Cloud
|
|
23
|
+
module Ces
|
|
24
|
+
module V1
|
|
25
|
+
module SessionService
|
|
26
|
+
module Rest
|
|
27
|
+
##
|
|
28
|
+
# REST service stub for the SessionService service.
|
|
29
|
+
# Service stub contains baseline method implementations
|
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
|
31
|
+
#
|
|
32
|
+
class ServiceStub
|
|
33
|
+
# @private
|
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
|
35
|
+
# These require statements are intentionally placed here to initialize
|
|
36
|
+
# the REST modules only when it's required.
|
|
37
|
+
require "gapic/rest"
|
|
38
|
+
|
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
|
40
|
+
endpoint_template: endpoint_template,
|
|
41
|
+
universe_domain: universe_domain,
|
|
42
|
+
credentials: credentials,
|
|
43
|
+
numeric_enums: true,
|
|
44
|
+
service_name: self.class,
|
|
45
|
+
raise_faraday_errors: false,
|
|
46
|
+
logger: logger
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# The effective universe domain
|
|
51
|
+
#
|
|
52
|
+
# @return [String]
|
|
53
|
+
#
|
|
54
|
+
def universe_domain
|
|
55
|
+
@client_stub.universe_domain
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# The effective endpoint
|
|
60
|
+
#
|
|
61
|
+
# @return [String]
|
|
62
|
+
#
|
|
63
|
+
def endpoint
|
|
64
|
+
@client_stub.endpoint
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# The logger used for request/response debug logging.
|
|
69
|
+
#
|
|
70
|
+
# @return [Logger]
|
|
71
|
+
#
|
|
72
|
+
def logger stub: false
|
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
##
|
|
77
|
+
# Baseline implementation for the run_session REST call
|
|
78
|
+
#
|
|
79
|
+
# @param request_pb [::Google::Cloud::Ces::V1::RunSessionRequest]
|
|
80
|
+
# A request object representing the call parameters. Required.
|
|
81
|
+
# @param options [::Gapic::CallOptions]
|
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
83
|
+
#
|
|
84
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
85
|
+
# @yieldparam result [::Google::Cloud::Ces::V1::RunSessionResponse]
|
|
86
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
87
|
+
#
|
|
88
|
+
# @return [::Google::Cloud::Ces::V1::RunSessionResponse]
|
|
89
|
+
# A result object deserialized from the server's reply
|
|
90
|
+
def run_session request_pb, options = nil
|
|
91
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
92
|
+
|
|
93
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_run_session_request request_pb
|
|
94
|
+
query_string_params = if query_string_params.any?
|
|
95
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
96
|
+
else
|
|
97
|
+
{}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
response = @client_stub.make_http_request(
|
|
101
|
+
verb,
|
|
102
|
+
uri: uri,
|
|
103
|
+
body: body || "",
|
|
104
|
+
params: query_string_params,
|
|
105
|
+
method_name: "run_session",
|
|
106
|
+
options: options
|
|
107
|
+
)
|
|
108
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
109
|
+
result = ::Google::Cloud::Ces::V1::RunSessionResponse.decode_json response.body, ignore_unknown_fields: true
|
|
110
|
+
catch :response do
|
|
111
|
+
yield result, operation if block_given?
|
|
112
|
+
result
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
##
|
|
117
|
+
# Baseline implementation for the stream_run_session REST call
|
|
118
|
+
#
|
|
119
|
+
# @param request_pb [::Google::Cloud::Ces::V1::RunSessionRequest]
|
|
120
|
+
# A request object representing the call parameters. Required.
|
|
121
|
+
# @param options [::Gapic::CallOptions]
|
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
123
|
+
#
|
|
124
|
+
# @yieldparam chunk [::String] The chunk of data received during server streaming.
|
|
125
|
+
#
|
|
126
|
+
# @return [::Gapic::Rest::TransportOperation]
|
|
127
|
+
def stream_run_session(request_pb, options = nil, &)
|
|
128
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
129
|
+
|
|
130
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_stream_run_session_request request_pb
|
|
131
|
+
query_string_params = if query_string_params.any?
|
|
132
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
133
|
+
else
|
|
134
|
+
{}
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
response = @client_stub.make_http_request(
|
|
138
|
+
verb,
|
|
139
|
+
uri: uri,
|
|
140
|
+
body: body || "",
|
|
141
|
+
params: query_string_params,
|
|
142
|
+
method_name: "stream_run_session",
|
|
143
|
+
options: options,
|
|
144
|
+
is_server_streaming: true,
|
|
145
|
+
&
|
|
146
|
+
)
|
|
147
|
+
::Gapic::Rest::TransportOperation.new response
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
##
|
|
151
|
+
# @private
|
|
152
|
+
#
|
|
153
|
+
# GRPC transcoding helper method for the run_session REST call
|
|
154
|
+
#
|
|
155
|
+
# @param request_pb [::Google::Cloud::Ces::V1::RunSessionRequest]
|
|
156
|
+
# A request object representing the call parameters. Required.
|
|
157
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
158
|
+
# Uri, Body, Query string parameters
|
|
159
|
+
def self.transcode_run_session_request request_pb
|
|
160
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
161
|
+
.with_bindings(
|
|
162
|
+
uri_method: :post,
|
|
163
|
+
uri_template: "/v1/{config.session}:runSession",
|
|
164
|
+
body: "*",
|
|
165
|
+
matches: [
|
|
166
|
+
["config.session", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false]
|
|
167
|
+
]
|
|
168
|
+
)
|
|
169
|
+
transcoder.transcode request_pb
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
##
|
|
173
|
+
# @private
|
|
174
|
+
#
|
|
175
|
+
# GRPC transcoding helper method for the stream_run_session REST call
|
|
176
|
+
#
|
|
177
|
+
# @param request_pb [::Google::Cloud::Ces::V1::RunSessionRequest]
|
|
178
|
+
# A request object representing the call parameters. Required.
|
|
179
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
180
|
+
# Uri, Body, Query string parameters
|
|
181
|
+
def self.transcode_stream_run_session_request request_pb
|
|
182
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
183
|
+
.with_bindings(
|
|
184
|
+
uri_method: :post,
|
|
185
|
+
uri_template: "/v1/{config.session}:streamRunSession",
|
|
186
|
+
body: "*",
|
|
187
|
+
matches: [
|
|
188
|
+
["config.session", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/sessions/[^/]+/?$}, false]
|
|
189
|
+
]
|
|
190
|
+
)
|
|
191
|
+
transcoder.transcode request_pb
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "gapic/rest"
|
|
20
|
+
require "gapic/config"
|
|
21
|
+
require "gapic/config/method"
|
|
22
|
+
|
|
23
|
+
require "google/cloud/ces/v1/version"
|
|
24
|
+
require "google/cloud/ces/v1/bindings_override"
|
|
25
|
+
|
|
26
|
+
require "google/cloud/ces/v1/session_service/credentials"
|
|
27
|
+
require "google/cloud/ces/v1/session_service/paths"
|
|
28
|
+
require "google/cloud/ces/v1/session_service/rest/client"
|
|
29
|
+
|
|
30
|
+
module Google
|
|
31
|
+
module Cloud
|
|
32
|
+
module Ces
|
|
33
|
+
module V1
|
|
34
|
+
##
|
|
35
|
+
# Session service provides APIs for interacting with CES agents.
|
|
36
|
+
#
|
|
37
|
+
# To load this service and instantiate a REST client:
|
|
38
|
+
#
|
|
39
|
+
# require "google/cloud/ces/v1/session_service/rest"
|
|
40
|
+
# client = ::Google::Cloud::Ces::V1::SessionService::Rest::Client.new
|
|
41
|
+
#
|
|
42
|
+
module SessionService
|
|
43
|
+
# Client for the REST transport
|
|
44
|
+
module Rest
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
|
53
|
+
require "google/cloud/ces/v1/session_service/rest/helpers" if ::File.file? helper_path
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "gapic/common"
|
|
20
|
+
require "gapic/config"
|
|
21
|
+
require "gapic/config/method"
|
|
22
|
+
|
|
23
|
+
require "google/cloud/ces/v1/version"
|
|
24
|
+
|
|
25
|
+
require "google/cloud/ces/v1/session_service/credentials"
|
|
26
|
+
require "google/cloud/ces/v1/session_service/paths"
|
|
27
|
+
require "google/cloud/ces/v1/session_service/client"
|
|
28
|
+
require "google/cloud/ces/v1/session_service/rest"
|
|
29
|
+
|
|
30
|
+
module Google
|
|
31
|
+
module Cloud
|
|
32
|
+
module Ces
|
|
33
|
+
module V1
|
|
34
|
+
##
|
|
35
|
+
# Session service provides APIs for interacting with CES agents.
|
|
36
|
+
#
|
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
|
38
|
+
#
|
|
39
|
+
# require "google/cloud/ces/v1/session_service"
|
|
40
|
+
# client = ::Google::Cloud::Ces::V1::SessionService::Client.new
|
|
41
|
+
#
|
|
42
|
+
# @example Load this service and instantiate a REST client
|
|
43
|
+
#
|
|
44
|
+
# require "google/cloud/ces/v1/session_service/rest"
|
|
45
|
+
# client = ::Google::Cloud::Ces::V1::SessionService::Rest::Client.new
|
|
46
|
+
#
|
|
47
|
+
module SessionService
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
helper_path = ::File.join __dir__, "session_service", "helpers.rb"
|
|
55
|
+
require "google/cloud/ces/v1/session_service/helpers" if ::File.file? helper_path
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: google/cloud/ces/v1/session_service.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/annotations_pb'
|
|
8
|
+
require 'google/api/client_pb'
|
|
9
|
+
require 'google/api/field_behavior_pb'
|
|
10
|
+
require 'google/api/resource_pb'
|
|
11
|
+
require 'google/cloud/ces/v1/common_pb'
|
|
12
|
+
require 'google/cloud/ces/v1/example_pb'
|
|
13
|
+
require 'google/cloud/ces/v1/search_suggestions_pb'
|
|
14
|
+
require 'google/protobuf/struct_pb'
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
descriptor_data = "\n)google/cloud/ces/v1/session_service.proto\x12\x13google.cloud.ces.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/cloud/ces/v1/common.proto\x1a!google/cloud/ces/v1/example.proto\x1a,google/cloud/ces/v1/search_suggestions.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x99\x01\n\x10InputAudioConfig\x12?\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\".google.cloud.ces.v1.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12$\n\x17noise_suppression_level\x18\x06 \x01(\tB\x03\xe0\x41\x01\"t\n\x11OutputAudioConfig\x12?\n\x0e\x61udio_encoding\x18\x01 \x01(\x0e\x32\".google.cloud.ces.v1.AudioEncodingB\x03\xe0\x41\x02\x12\x1e\n\x11sample_rate_hertz\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xed\x06\n\rSessionConfig\x12\x33\n\x07session\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x63\x65s.googleapis.com/Session\x12\x46\n\x12input_audio_config\x18\x02 \x01(\x0b\x32%.google.cloud.ces.v1.InputAudioConfigB\x03\xe0\x41\x01\x12H\n\x13output_audio_config\x18\x03 \x01(\x0b\x32&.google.cloud.ces.v1.OutputAudioConfigB\x03\xe0\x41\x01\x12>\n\x13historical_contexts\x18\x05 \x03(\x0b\x32\x1c.google.cloud.ces.v1.MessageB\x03\xe0\x41\x01\x12\x35\n\x0b\x65ntry_agent\x18\x0c \x01(\tB \xe0\x41\x01\xfa\x41\x1a\n\x18\x63\x65s.googleapis.com/Agent\x12\x17\n\ndeployment\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0euse_tool_fakes\x18\x0e \x01(\x08\x42\x03\xe0\x41\x01\x12s\n\"remote_dialogflow_query_parameters\x18\x0f \x01(\x0b\x32\x42.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParametersB\x03\xe0\x41\x01\x12\"\n\x15\x65nable_text_streaming\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xb6\x02\n\x1fRemoteDialogflowQueryParameters\x12t\n\x0fwebhook_headers\x18\x01 \x03(\x0b\x32V.google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters.WebhookHeadersEntryB\x03\xe0\x41\x01\x12-\n\x07payload\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x12\x37\n\x11\x65nd_user_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\x1a\x35\n\x13WebhookHeadersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"C\n\tToolCalls\x12\x36\n\ntool_calls\x18\x01 \x03(\x0b\x32\x1d.google.cloud.ces.v1.ToolCallB\x03\xe0\x41\x01\"O\n\rToolResponses\x12>\n\x0etool_responses\x18\x01 \x03(\x0b\x32!.google.cloud.ces.v1.ToolResponseB\x03\xe0\x41\x01\"\x84\x01\n\tCitations\x12?\n\x0c\x63ited_chunks\x18\x01 \x03(\x0b\x32).google.cloud.ces.v1.Citations.CitedChunk\x1a\x36\n\nCitedChunk\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x0c\n\x04text\x18\x03 \x01(\t\"\x1b\n\x05\x45vent\x12\x12\n\x05\x65vent\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x82\x03\n\x0cSessionInput\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x13\n\x04\x64tmf\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x14\n\x05\x61udio\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x41\n\x0etool_responses\x18\x03 \x01(\x0b\x32\".google.cloud.ces.v1.ToolResponsesB\x03\xe0\x41\x01H\x00\x12\x30\n\x05image\x18\x04 \x01(\x0b\x32\x1a.google.cloud.ces.v1.ImageB\x03\xe0\x41\x01H\x00\x12.\n\x04\x62lob\x18\x07 \x01(\x0b\x32\x19.google.cloud.ces.v1.BlobB\x03\xe0\x41\x01H\x00\x12\x31\n\tvariables\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01H\x00\x12\x30\n\x05\x65vent\x18\t \x01(\x0b\x32\x1a.google.cloud.ces.v1.EventB\x03\xe0\x41\x01H\x00\x12\x1a\n\rwill_continue\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0c\n\ninput_type\"\xce\x04\n\rSessionOutput\x12\x0e\n\x04text\x18\x01 \x01(\tH\x00\x12\x0f\n\x05\x61udio\x18\x02 \x01(\x0cH\x00\x12\x34\n\ntool_calls\x18\x03 \x01(\x0b\x32\x1e.google.cloud.ces.v1.ToolCallsH\x00\x12\x33\n\tcitations\x18\x08 \x01(\x0b\x32\x1e.google.cloud.ces.v1.CitationsH\x00\x12Q\n\x19google_search_suggestions\x18\n \x01(\x0b\x32,.google.cloud.ces.v1.GoogleSearchSuggestionsH\x00\x12\x36\n\x0b\x65nd_session\x18\t \x01(\x0b\x32\x1f.google.cloud.ces.v1.EndSessionH\x00\x12*\n\x07payload\x18\x0b \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12\x12\n\nturn_index\x18\x06 \x01(\x05\x12\x16\n\x0eturn_completed\x18\x04 \x01(\x08\x12O\n\x0f\x64iagnostic_info\x18\x07 \x01(\x0b\x32\x31.google.cloud.ces.v1.SessionOutput.DiagnosticInfoB\x03\xe0\x41\x01\x1an\n\x0e\x44iagnosticInfo\x12.\n\x08messages\x18\x01 \x03(\x0b\x32\x1c.google.cloud.ces.v1.Message\x12,\n\troot_span\x18\x03 \x01(\x0b\x32\x19.google.cloud.ces.v1.SpanB\r\n\x0boutput_type\",\n\x11RecognitionResult\x12\x17\n\ntranscript\x18\x01 \x01(\tB\x03\xe0\x41\x01\"&\n\x12InterruptionSignal\x12\x10\n\x08\x62\x61rge_in\x18\x01 \x01(\x08\"<\n\nEndSession\x12.\n\x08metadata\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\x08\n\x06GoAway\"\x84\x01\n\x11RunSessionRequest\x12\x37\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1.SessionConfigB\x03\xe0\x41\x02\x12\x36\n\x06inputs\x18\x03 \x03(\x0b\x32!.google.cloud.ces.v1.SessionInputB\x03\xe0\x41\x02\"I\n\x12RunSessionResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.ces.v1.SessionOutput\"\xa7\x01\n\x18\x42idiSessionClientMessage\x12\x39\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1.SessionConfigB\x03\xe0\x41\x01H\x00\x12@\n\x0erealtime_input\x18\x02 \x01(\x0b\x32!.google.cloud.ces.v1.SessionInputB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0cmessage_type\"\xf7\x02\n\x18\x42idiSessionServerMessage\x12\x41\n\x0esession_output\x18\x01 \x01(\x0b\x32\".google.cloud.ces.v1.SessionOutputB\x03\xe0\x41\x01H\x00\x12I\n\x12recognition_result\x18\x02 \x01(\x0b\x32&.google.cloud.ces.v1.RecognitionResultB\x03\xe0\x41\x01H\x00\x12K\n\x13interruption_signal\x18\x03 \x01(\x0b\x32\'.google.cloud.ces.v1.InterruptionSignalB\x03\xe0\x41\x01H\x00\x12;\n\x0b\x65nd_session\x18\x05 \x01(\x0b\x32\x1f.google.cloud.ces.v1.EndSessionB\x03\xe0\x41\x01H\x00\x12\x33\n\x07go_away\x18\x06 \x01(\x0b\x32\x1b.google.cloud.ces.v1.GoAwayB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0cmessage_type*R\n\rAudioEncoding\x12\x1e\n\x1a\x41UDIO_ENCODING_UNSPECIFIED\x10\x00\x12\x0c\n\x08LINEAR16\x10\x01\x12\t\n\x05MULAW\x10\x02\x12\x08\n\x04\x41LAW\x10\x03\x32\xea\x04\n\x0eSessionService\x12\xb2\x01\n\nRunSession\x12&.google.cloud.ces.v1.RunSessionRequest\x1a\'.google.cloud.ces.v1.RunSessionResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1/{config.session=projects/*/locations/*/apps/*/sessions/*}:runSession:\x01*\x12\xc0\x01\n\x10StreamRunSession\x12&.google.cloud.ces.v1.RunSessionRequest\x1a\'.google.cloud.ces.v1.RunSessionResponse\"Y\x82\xd3\xe4\x93\x02S\"N/v1/{config.session=projects/*/locations/*/apps/*/sessions/*}:streamRunSession:\x01*0\x01\x12t\n\x0e\x42idiRunSession\x12-.google.cloud.ces.v1.BidiSessionClientMessage\x1a-.google.cloud.ces.v1.BidiSessionServerMessage\"\x00(\x01\x30\x01\x1aj\xca\x41\x12\x63\x65s.googleapis.com\xd2\x41Rhttps://www.googleapis.com/auth/ces,https://www.googleapis.com/auth/cloud-platformB\xc1\x01\n\x17\x63om.google.cloud.ces.v1B\x13SessionServiceProtoP\x01Z)cloud.google.com/go/ces/apiv1/cespb;cespb\xea\x41\x63\n\x1a\x63\x65s.googleapis.com/Session\x12\x45projects/{project}/locations/{location}/apps/{app}/sessions/{session}b\x06proto3"
|
|
18
|
+
|
|
19
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
20
|
+
pool.add_serialized_file(descriptor_data)
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module Ces
|
|
25
|
+
module V1
|
|
26
|
+
InputAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.InputAudioConfig").msgclass
|
|
27
|
+
OutputAudioConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.OutputAudioConfig").msgclass
|
|
28
|
+
SessionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.SessionConfig").msgclass
|
|
29
|
+
SessionConfig::RemoteDialogflowQueryParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.SessionConfig.RemoteDialogflowQueryParameters").msgclass
|
|
30
|
+
ToolCalls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.ToolCalls").msgclass
|
|
31
|
+
ToolResponses = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.ToolResponses").msgclass
|
|
32
|
+
Citations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.Citations").msgclass
|
|
33
|
+
Citations::CitedChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.Citations.CitedChunk").msgclass
|
|
34
|
+
Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.Event").msgclass
|
|
35
|
+
SessionInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.SessionInput").msgclass
|
|
36
|
+
SessionOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.SessionOutput").msgclass
|
|
37
|
+
SessionOutput::DiagnosticInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.SessionOutput.DiagnosticInfo").msgclass
|
|
38
|
+
RecognitionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.RecognitionResult").msgclass
|
|
39
|
+
InterruptionSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.InterruptionSignal").msgclass
|
|
40
|
+
EndSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.EndSession").msgclass
|
|
41
|
+
GoAway = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.GoAway").msgclass
|
|
42
|
+
RunSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.RunSessionRequest").msgclass
|
|
43
|
+
RunSessionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.RunSessionResponse").msgclass
|
|
44
|
+
BidiSessionClientMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.BidiSessionClientMessage").msgclass
|
|
45
|
+
BidiSessionServerMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.BidiSessionServerMessage").msgclass
|
|
46
|
+
AudioEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.AudioEncoding").enummodule
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: google/cloud/ces/v1/session_service.proto for package 'google.cloud.ces.v1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Copyright 2026 Google LLC
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
require 'grpc'
|
|
20
|
+
require 'google/cloud/ces/v1/session_service_pb'
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module Ces
|
|
25
|
+
module V1
|
|
26
|
+
module SessionService
|
|
27
|
+
# Session service provides APIs for interacting with CES agents.
|
|
28
|
+
class Service
|
|
29
|
+
|
|
30
|
+
include ::GRPC::GenericService
|
|
31
|
+
|
|
32
|
+
self.marshal_class_method = :encode
|
|
33
|
+
self.unmarshal_class_method = :decode
|
|
34
|
+
self.service_name = 'google.cloud.ces.v1.SessionService'
|
|
35
|
+
|
|
36
|
+
# Initiates a single-turn interaction with the CES agent within a session.
|
|
37
|
+
rpc :RunSession, ::Google::Cloud::Ces::V1::RunSessionRequest, ::Google::Cloud::Ces::V1::RunSessionResponse
|
|
38
|
+
# Initiates a single-turn interaction with the CES agent. Uses server-side
|
|
39
|
+
# streaming to deliver incremental results and partial responses as they are
|
|
40
|
+
# generated.
|
|
41
|
+
#
|
|
42
|
+
# By default, complete responses (e.g., messages from callbacks or full LLM
|
|
43
|
+
# responses) are sent to the client as soon as they are available. To enable
|
|
44
|
+
# streaming individual text chunks directly from the model, set
|
|
45
|
+
# [enable_text_streaming][google.cloud.ces.v1.SessionConfig.enable_text_streaming]
|
|
46
|
+
# to true.
|
|
47
|
+
rpc :StreamRunSession, ::Google::Cloud::Ces::V1::RunSessionRequest, stream(::Google::Cloud::Ces::V1::RunSessionResponse)
|
|
48
|
+
# Establishes a bidirectional streaming connection with the CES agent.
|
|
49
|
+
# The agent processes continuous multimodal inputs (e.g., text, audio) and
|
|
50
|
+
# generates real-time multimodal output streams.
|
|
51
|
+
#
|
|
52
|
+
# --- Client Request Stream ---
|
|
53
|
+
# The client streams requests in the following order:
|
|
54
|
+
#
|
|
55
|
+
# 1. Initialization:
|
|
56
|
+
# The first message must contain
|
|
57
|
+
# [SessionConfig][google.cloud.ces.v1.BidiSessionClientMessage.config].
|
|
58
|
+
# For audio sessions, this should also include
|
|
59
|
+
# [InputAudioConfig][google.cloud.ces.v1.SessionConfig.input_audio_config]
|
|
60
|
+
# and
|
|
61
|
+
# [OutputAudioConfig][google.cloud.ces.v1.SessionConfig.output_audio_config]
|
|
62
|
+
# to define audio processing and synthesis parameters.
|
|
63
|
+
#
|
|
64
|
+
# 2. Interaction:
|
|
65
|
+
# Subsequent messages stream
|
|
66
|
+
# [SessionInput][google.cloud.ces.v1.BidiSessionClientMessage.realtime_input]
|
|
67
|
+
# containing real-time user input data.
|
|
68
|
+
#
|
|
69
|
+
# 3. Termination:
|
|
70
|
+
# The client should half-close the stream when there is no more user
|
|
71
|
+
# input. It should also half-close upon receiving
|
|
72
|
+
# [EndSession][google.cloud.ces.v1.BidiSessionServerMessage.end_session]
|
|
73
|
+
# or [GoAway][google.cloud.ces.v1.BidiSessionServerMessage.go_away] from
|
|
74
|
+
# the agent.
|
|
75
|
+
#
|
|
76
|
+
# --- Server Response Stream ---
|
|
77
|
+
# For each interaction turn, the agent streams messages in the following
|
|
78
|
+
# sequence:
|
|
79
|
+
#
|
|
80
|
+
# 1. Speech Recognition (First N messages):
|
|
81
|
+
# Contains
|
|
82
|
+
# [RecognitionResult][google.cloud.ces.v1.BidiSessionServerMessage.recognition_result]
|
|
83
|
+
# representing the concatenated user speech segments captured so far.
|
|
84
|
+
# This is only populated for audio sessions.
|
|
85
|
+
#
|
|
86
|
+
# 2. Response (Next M messages):
|
|
87
|
+
# Contains
|
|
88
|
+
# [SessionOutput][google.cloud.ces.v1.BidiSessionServerMessage.session_output]
|
|
89
|
+
# delivering the agent's response in various modalities (e.g., text,
|
|
90
|
+
# audio).
|
|
91
|
+
#
|
|
92
|
+
# 3. Turn Completion (Final message of the turn):
|
|
93
|
+
# Contains
|
|
94
|
+
# [SessionOutput][google.cloud.ces.v1.BidiSessionServerMessage.session_output]
|
|
95
|
+
# with [turn_completed][google.cloud.ces.v1.SessionOutput.turn_completed]
|
|
96
|
+
# set to true. This signals the end of the current turn and includes
|
|
97
|
+
# [DiagnosticInfo][google.cloud.ces.v1.SessionOutput.diagnostic_info]
|
|
98
|
+
# with execution details.
|
|
99
|
+
#
|
|
100
|
+
# --- Audio Best Practices ---
|
|
101
|
+
# 1. Streaming:
|
|
102
|
+
# Stream [audio data][google.cloud.ces.v1.SessionInput.audio]
|
|
103
|
+
# **CONTINUOUSLY**, even during silence. Recommended chunk size: 40-120ms
|
|
104
|
+
# (balances latency vs. efficiency).
|
|
105
|
+
#
|
|
106
|
+
# 2. Playback & Interruption:
|
|
107
|
+
# Play [audio responses][google.cloud.ces.v1.SessionOutput.audio] upon
|
|
108
|
+
# receipt. Stop playback immediately if an
|
|
109
|
+
# [InterruptionSignal][google.cloud.ces.v1.BidiSessionServerMessage.interruption_signal]
|
|
110
|
+
# is received (e.g., user barge-in or new agent response).
|
|
111
|
+
rpc :BidiRunSession, stream(::Google::Cloud::Ces::V1::BidiSessionClientMessage), stream(::Google::Cloud::Ces::V1::BidiSessionServerMessage)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
Stub = Service.rpc_stub_class
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: google/cloud/ces/v1/system_tool.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/field_behavior_pb'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
descriptor_data = "\n%google/cloud/ces/v1/system_tool.proto\x12\x13google.cloud.ces.v1\x1a\x1fgoogle/api/field_behavior.proto\"9\n\nSystemTool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42W\n\x17\x63om.google.cloud.ces.v1B\x0fSystemToolProtoP\x01Z)cloud.google.com/go/ces/apiv1/cespb;cespbb\x06proto3"
|
|
11
|
+
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
|
|
15
|
+
module Google
|
|
16
|
+
module Cloud
|
|
17
|
+
module Ces
|
|
18
|
+
module V1
|
|
19
|
+
SystemTool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.SystemTool").msgclass
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: google/cloud/ces/v1/tool.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/field_behavior_pb'
|
|
8
|
+
require 'google/api/resource_pb'
|
|
9
|
+
require 'google/cloud/ces/v1/agent_tool_pb'
|
|
10
|
+
require 'google/cloud/ces/v1/client_function_pb'
|
|
11
|
+
require 'google/cloud/ces/v1/common_pb'
|
|
12
|
+
require 'google/cloud/ces/v1/connector_tool_pb'
|
|
13
|
+
require 'google/cloud/ces/v1/data_store_tool_pb'
|
|
14
|
+
require 'google/cloud/ces/v1/fakes_pb'
|
|
15
|
+
require 'google/cloud/ces/v1/file_search_tool_pb'
|
|
16
|
+
require 'google/cloud/ces/v1/google_search_tool_pb'
|
|
17
|
+
require 'google/cloud/ces/v1/mcp_tool_pb'
|
|
18
|
+
require 'google/cloud/ces/v1/open_api_tool_pb'
|
|
19
|
+
require 'google/cloud/ces/v1/python_function_pb'
|
|
20
|
+
require 'google/cloud/ces/v1/system_tool_pb'
|
|
21
|
+
require 'google/cloud/ces/v1/widget_tool_pb'
|
|
22
|
+
require 'google/protobuf/timestamp_pb'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
descriptor_data = "\n\x1egoogle/cloud/ces/v1/tool.proto\x12\x13google.cloud.ces.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/ces/v1/agent_tool.proto\x1a)google/cloud/ces/v1/client_function.proto\x1a google/cloud/ces/v1/common.proto\x1a(google/cloud/ces/v1/connector_tool.proto\x1a)google/cloud/ces/v1/data_store_tool.proto\x1a\x1fgoogle/cloud/ces/v1/fakes.proto\x1a*google/cloud/ces/v1/file_search_tool.proto\x1a,google/cloud/ces/v1/google_search_tool.proto\x1a\"google/cloud/ces/v1/mcp_tool.proto\x1a\'google/cloud/ces/v1/open_api_tool.proto\x1a)google/cloud/ces/v1/python_function.proto\x1a%google/cloud/ces/v1/system_tool.proto\x1a%google/cloud/ces/v1/widget_tool.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\t\n\x04Tool\x12\x43\n\x0f\x63lient_function\x18\x02 \x01(\x0b\x32#.google.cloud.ces.v1.ClientFunctionB\x03\xe0\x41\x01H\x00\x12>\n\ropen_api_tool\x18\x03 \x01(\x0b\x32 .google.cloud.ces.v1.OpenApiToolB\x03\xe0\x41\x01H\x00\x12H\n\x12google_search_tool\x18\x05 \x01(\x0b\x32%.google.cloud.ces.v1.GoogleSearchToolB\x03\xe0\x41\x01H\x00\x12\x41\n\x0e\x63onnector_tool\x18\x08 \x01(\x0b\x32\".google.cloud.ces.v1.ConnectorToolB\x03\xe0\x41\x01H\x00\x12\x42\n\x0f\x64\x61ta_store_tool\x18\n \x01(\x0b\x32\".google.cloud.ces.v1.DataStoreToolB\x03\xe0\x41\x01H\x00\x12\x43\n\x0fpython_function\x18\x0b \x01(\x0b\x32#.google.cloud.ces.v1.PythonFunctionB\x03\xe0\x41\x01H\x00\x12\x35\n\x08mcp_tool\x18\x10 \x01(\x0b\x32\x1c.google.cloud.ces.v1.McpToolB\x03\xe0\x41\x01H\x00\x12\x44\n\x10\x66ile_search_tool\x18\x11 \x01(\x0b\x32#.google.cloud.ces.v1.FileSearchToolB\x03\xe0\x41\x01H\x00\x12;\n\x0bsystem_tool\x18\x12 \x01(\x0b\x32\x1f.google.cloud.ces.v1.SystemToolB\x03\xe0\x41\x01H\x00\x12\x39\n\nagent_tool\x18\x17 \x01(\x0b\x32\x1e.google.cloud.ces.v1.AgentToolB\x03\xe0\x41\x01H\x00\x12;\n\x0bwidget_tool\x18\x18 \x01(\x0b\x32\x1f.google.cloud.ces.v1.WidgetToolB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12?\n\x0e\x65xecution_type\x18\x0c \x01(\x0e\x32\".google.cloud.ces.v1.ExecutionTypeB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0e \x01(\t\x12\x1e\n\x11generated_summary\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x10tool_fake_config\x18\x14 \x01(\x0b\x32#.google.cloud.ces.v1.ToolFakeConfigB\x03\xe0\x41\x01:j\xea\x41g\n\x17\x63\x65s.googleapis.com/Tool\x12?projects/{project}/locations/{location}/apps/{app}/tools/{tool}*\x05tools2\x04toolB\x0b\n\ttool_typeBQ\n\x17\x63om.google.cloud.ces.v1B\tToolProtoP\x01Z)cloud.google.com/go/ces/apiv1/cespb;cespbb\x06proto3"
|
|
26
|
+
|
|
27
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
28
|
+
pool.add_serialized_file(descriptor_data)
|
|
29
|
+
|
|
30
|
+
module Google
|
|
31
|
+
module Cloud
|
|
32
|
+
module Ces
|
|
33
|
+
module V1
|
|
34
|
+
Tool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.ces.v1.Tool").msgclass
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|