google-cloud-ai_platform-v1 1.28.0 → 1.30.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/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +106 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +99 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +62 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +7 -1
- data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/tool_pb.rb +4 -1
- data/lib/google/cloud/aiplatform/v1/tuning_job_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/usage_metadata_pb.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +84 -0
- data/proto_docs/google/cloud/aiplatform/v1/tool.rb +80 -0
- data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +49 -2
- data/proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb +91 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc4da46a7070d2c31cd3c49cc499be1dc468379795da7a5830d4720d4d74ba7b
|
|
4
|
+
data.tar.gz: 7efa2a1f511d739265e85654a61f273bf1090f8637dbedb57999635036514513
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99289cb94666a5c34f458458baaf362dbf62b0ca5307698b2a2530ba4e98ced92766aa55c5a5fe17b53dd530e7a57e231331b68aa2509506a68ebf5225086aa6
|
|
7
|
+
data.tar.gz: '0539d3d2495c0948575efb89ff9cb13b3a9b4ce28d5bcdbed7a3bed424d17a8591bb310ffce3de1a60fbf6bb3e68f8a4d99358292669c618ded95a7f49e9aceb'
|
|
@@ -1523,6 +1523,105 @@ module Google
|
|
|
1523
1523
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1524
1524
|
end
|
|
1525
1525
|
|
|
1526
|
+
##
|
|
1527
|
+
# Embed content with multimodal inputs.
|
|
1528
|
+
#
|
|
1529
|
+
# @overload embed_content(request, options = nil)
|
|
1530
|
+
# Pass arguments to `embed_content` via a request object, either of type
|
|
1531
|
+
# {::Google::Cloud::AIPlatform::V1::EmbedContentRequest} or an equivalent Hash.
|
|
1532
|
+
#
|
|
1533
|
+
# @param request [::Google::Cloud::AIPlatform::V1::EmbedContentRequest, ::Hash]
|
|
1534
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1535
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1536
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1537
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1538
|
+
#
|
|
1539
|
+
# @overload embed_content(model: nil, content: nil, title: nil, task_type: nil, output_dimensionality: nil, auto_truncate: nil)
|
|
1540
|
+
# Pass arguments to `embed_content` via keyword arguments. Note that at
|
|
1541
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1542
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1543
|
+
#
|
|
1544
|
+
# @param model [::String]
|
|
1545
|
+
# Required. The name of the publisher model requested to serve the
|
|
1546
|
+
# prediction. Format:
|
|
1547
|
+
# `projects/{project}/locations/{location}/publishers/*/models/*`
|
|
1548
|
+
# @param content [::Google::Cloud::AIPlatform::V1::Content, ::Hash]
|
|
1549
|
+
# Required. Input content to be embedded. Required.
|
|
1550
|
+
# @param title [::String]
|
|
1551
|
+
# Optional. An optional title for the text.
|
|
1552
|
+
# @param task_type [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
|
|
1553
|
+
# Optional. The task type of the embedding.
|
|
1554
|
+
# @param output_dimensionality [::Integer]
|
|
1555
|
+
# Optional. Optional reduced dimension for the output embedding. If set,
|
|
1556
|
+
# excessive values in the output embedding are truncated from the end.
|
|
1557
|
+
# @param auto_truncate [::Boolean]
|
|
1558
|
+
# Optional. Whether to silently truncate the input content if it's longer
|
|
1559
|
+
# than the maximum sequence length.
|
|
1560
|
+
#
|
|
1561
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1562
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1563
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1564
|
+
#
|
|
1565
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1566
|
+
#
|
|
1567
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1568
|
+
#
|
|
1569
|
+
# @example Basic example
|
|
1570
|
+
# require "google/cloud/ai_platform/v1"
|
|
1571
|
+
#
|
|
1572
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1573
|
+
# client = Google::Cloud::AIPlatform::V1::PredictionService::Client.new
|
|
1574
|
+
#
|
|
1575
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1576
|
+
# request = Google::Cloud::AIPlatform::V1::EmbedContentRequest.new
|
|
1577
|
+
#
|
|
1578
|
+
# # Call the embed_content method.
|
|
1579
|
+
# result = client.embed_content request
|
|
1580
|
+
#
|
|
1581
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::EmbedContentResponse.
|
|
1582
|
+
# p result
|
|
1583
|
+
#
|
|
1584
|
+
def embed_content request, options = nil
|
|
1585
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1586
|
+
|
|
1587
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::EmbedContentRequest
|
|
1588
|
+
|
|
1589
|
+
# Converts hash and nil to an options object
|
|
1590
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1591
|
+
|
|
1592
|
+
# Customize the options with defaults
|
|
1593
|
+
metadata = @config.rpcs.embed_content.metadata.to_h
|
|
1594
|
+
|
|
1595
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1596
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1597
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1598
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1599
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1600
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1601
|
+
|
|
1602
|
+
header_params = {}
|
|
1603
|
+
if request.model
|
|
1604
|
+
header_params["model"] = request.model
|
|
1605
|
+
end
|
|
1606
|
+
|
|
1607
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1608
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1609
|
+
|
|
1610
|
+
options.apply_defaults timeout: @config.rpcs.embed_content.timeout,
|
|
1611
|
+
metadata: metadata,
|
|
1612
|
+
retry_policy: @config.rpcs.embed_content.retry_policy
|
|
1613
|
+
|
|
1614
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1615
|
+
metadata: @config.metadata,
|
|
1616
|
+
retry_policy: @config.retry_policy
|
|
1617
|
+
|
|
1618
|
+
@prediction_service_stub.call_rpc :embed_content, request, options: options do |response, operation|
|
|
1619
|
+
yield response, operation if block_given?
|
|
1620
|
+
end
|
|
1621
|
+
rescue ::GRPC::BadStatus => e
|
|
1622
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1623
|
+
end
|
|
1624
|
+
|
|
1526
1625
|
##
|
|
1527
1626
|
# Configuration class for the PredictionService API.
|
|
1528
1627
|
#
|
|
@@ -1754,6 +1853,11 @@ module Google
|
|
|
1754
1853
|
# @return [::Gapic::Config::Method]
|
|
1755
1854
|
#
|
|
1756
1855
|
attr_reader :stream_generate_content
|
|
1856
|
+
##
|
|
1857
|
+
# RPC-specific configuration for `embed_content`
|
|
1858
|
+
# @return [::Gapic::Config::Method]
|
|
1859
|
+
#
|
|
1860
|
+
attr_reader :embed_content
|
|
1757
1861
|
|
|
1758
1862
|
# @private
|
|
1759
1863
|
def initialize parent_rpcs = nil
|
|
@@ -1783,6 +1887,8 @@ module Google
|
|
|
1783
1887
|
@generate_content = ::Gapic::Config::Method.new generate_content_config
|
|
1784
1888
|
stream_generate_content_config = parent_rpcs.stream_generate_content if parent_rpcs.respond_to? :stream_generate_content
|
|
1785
1889
|
@stream_generate_content = ::Gapic::Config::Method.new stream_generate_content_config
|
|
1890
|
+
embed_content_config = parent_rpcs.embed_content if parent_rpcs.respond_to? :embed_content
|
|
1891
|
+
@embed_content = ::Gapic::Config::Method.new embed_content_config
|
|
1786
1892
|
|
|
1787
1893
|
yield self if block_given?
|
|
1788
1894
|
end
|
|
@@ -1146,6 +1146,98 @@ module Google
|
|
|
1146
1146
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1147
1147
|
end
|
|
1148
1148
|
|
|
1149
|
+
##
|
|
1150
|
+
# Embed content with multimodal inputs.
|
|
1151
|
+
#
|
|
1152
|
+
# @overload embed_content(request, options = nil)
|
|
1153
|
+
# Pass arguments to `embed_content` via a request object, either of type
|
|
1154
|
+
# {::Google::Cloud::AIPlatform::V1::EmbedContentRequest} or an equivalent Hash.
|
|
1155
|
+
#
|
|
1156
|
+
# @param request [::Google::Cloud::AIPlatform::V1::EmbedContentRequest, ::Hash]
|
|
1157
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1158
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1159
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1160
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1161
|
+
#
|
|
1162
|
+
# @overload embed_content(model: nil, content: nil, title: nil, task_type: nil, output_dimensionality: nil, auto_truncate: nil)
|
|
1163
|
+
# Pass arguments to `embed_content` via keyword arguments. Note that at
|
|
1164
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1165
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1166
|
+
#
|
|
1167
|
+
# @param model [::String]
|
|
1168
|
+
# Required. The name of the publisher model requested to serve the
|
|
1169
|
+
# prediction. Format:
|
|
1170
|
+
# `projects/{project}/locations/{location}/publishers/*/models/*`
|
|
1171
|
+
# @param content [::Google::Cloud::AIPlatform::V1::Content, ::Hash]
|
|
1172
|
+
# Required. Input content to be embedded. Required.
|
|
1173
|
+
# @param title [::String]
|
|
1174
|
+
# Optional. An optional title for the text.
|
|
1175
|
+
# @param task_type [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
|
|
1176
|
+
# Optional. The task type of the embedding.
|
|
1177
|
+
# @param output_dimensionality [::Integer]
|
|
1178
|
+
# Optional. Optional reduced dimension for the output embedding. If set,
|
|
1179
|
+
# excessive values in the output embedding are truncated from the end.
|
|
1180
|
+
# @param auto_truncate [::Boolean]
|
|
1181
|
+
# Optional. Whether to silently truncate the input content if it's longer
|
|
1182
|
+
# than the maximum sequence length.
|
|
1183
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1184
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1185
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1186
|
+
#
|
|
1187
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1188
|
+
#
|
|
1189
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1190
|
+
#
|
|
1191
|
+
# @example Basic example
|
|
1192
|
+
# require "google/cloud/ai_platform/v1"
|
|
1193
|
+
#
|
|
1194
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1195
|
+
# client = Google::Cloud::AIPlatform::V1::PredictionService::Rest::Client.new
|
|
1196
|
+
#
|
|
1197
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1198
|
+
# request = Google::Cloud::AIPlatform::V1::EmbedContentRequest.new
|
|
1199
|
+
#
|
|
1200
|
+
# # Call the embed_content method.
|
|
1201
|
+
# result = client.embed_content request
|
|
1202
|
+
#
|
|
1203
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::EmbedContentResponse.
|
|
1204
|
+
# p result
|
|
1205
|
+
#
|
|
1206
|
+
def embed_content request, options = nil
|
|
1207
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1208
|
+
|
|
1209
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::EmbedContentRequest
|
|
1210
|
+
|
|
1211
|
+
# Converts hash and nil to an options object
|
|
1212
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1213
|
+
|
|
1214
|
+
# Customize the options with defaults
|
|
1215
|
+
call_metadata = @config.rpcs.embed_content.metadata.to_h
|
|
1216
|
+
|
|
1217
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1218
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1219
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1220
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
|
1221
|
+
transports_version_send: [:rest]
|
|
1222
|
+
|
|
1223
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1224
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1225
|
+
|
|
1226
|
+
options.apply_defaults timeout: @config.rpcs.embed_content.timeout,
|
|
1227
|
+
metadata: call_metadata,
|
|
1228
|
+
retry_policy: @config.rpcs.embed_content.retry_policy
|
|
1229
|
+
|
|
1230
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1231
|
+
metadata: @config.metadata,
|
|
1232
|
+
retry_policy: @config.retry_policy
|
|
1233
|
+
|
|
1234
|
+
@prediction_service_stub.embed_content request, options do |result, operation|
|
|
1235
|
+
yield result, operation if block_given?
|
|
1236
|
+
end
|
|
1237
|
+
rescue ::Gapic::Rest::Error => e
|
|
1238
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1239
|
+
end
|
|
1240
|
+
|
|
1149
1241
|
##
|
|
1150
1242
|
# Configuration class for the PredictionService REST API.
|
|
1151
1243
|
#
|
|
@@ -1344,6 +1436,11 @@ module Google
|
|
|
1344
1436
|
# @return [::Gapic::Config::Method]
|
|
1345
1437
|
#
|
|
1346
1438
|
attr_reader :stream_generate_content
|
|
1439
|
+
##
|
|
1440
|
+
# RPC-specific configuration for `embed_content`
|
|
1441
|
+
# @return [::Gapic::Config::Method]
|
|
1442
|
+
#
|
|
1443
|
+
attr_reader :embed_content
|
|
1347
1444
|
|
|
1348
1445
|
# @private
|
|
1349
1446
|
def initialize parent_rpcs = nil
|
|
@@ -1365,6 +1462,8 @@ module Google
|
|
|
1365
1462
|
@generate_content = ::Gapic::Config::Method.new generate_content_config
|
|
1366
1463
|
stream_generate_content_config = parent_rpcs.stream_generate_content if parent_rpcs.respond_to? :stream_generate_content
|
|
1367
1464
|
@stream_generate_content = ::Gapic::Config::Method.new stream_generate_content_config
|
|
1465
|
+
embed_content_config = parent_rpcs.embed_content if parent_rpcs.respond_to? :embed_content
|
|
1466
|
+
@embed_content = ::Gapic::Config::Method.new embed_content_config
|
|
1368
1467
|
|
|
1369
1468
|
yield self if block_given?
|
|
1370
1469
|
end
|
|
@@ -415,6 +415,46 @@ module Google
|
|
|
415
415
|
::Gapic::Rest::TransportOperation.new response
|
|
416
416
|
end
|
|
417
417
|
|
|
418
|
+
##
|
|
419
|
+
# Baseline implementation for the embed_content REST call
|
|
420
|
+
#
|
|
421
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::EmbedContentRequest]
|
|
422
|
+
# A request object representing the call parameters. Required.
|
|
423
|
+
# @param options [::Gapic::CallOptions]
|
|
424
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
425
|
+
#
|
|
426
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
427
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
428
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
429
|
+
#
|
|
430
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
431
|
+
# A result object deserialized from the server's reply
|
|
432
|
+
def embed_content request_pb, options = nil
|
|
433
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
434
|
+
|
|
435
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_embed_content_request request_pb
|
|
436
|
+
query_string_params = if query_string_params.any?
|
|
437
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
438
|
+
else
|
|
439
|
+
{}
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
response = @client_stub.make_http_request(
|
|
443
|
+
verb,
|
|
444
|
+
uri: uri,
|
|
445
|
+
body: body || "",
|
|
446
|
+
params: query_string_params,
|
|
447
|
+
method_name: "embed_content",
|
|
448
|
+
options: options
|
|
449
|
+
)
|
|
450
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
451
|
+
result = ::Google::Cloud::AIPlatform::V1::EmbedContentResponse.decode_json response.body, ignore_unknown_fields: true
|
|
452
|
+
catch :response do
|
|
453
|
+
yield result, operation if block_given?
|
|
454
|
+
result
|
|
455
|
+
end
|
|
456
|
+
end
|
|
457
|
+
|
|
418
458
|
##
|
|
419
459
|
# @private
|
|
420
460
|
#
|
|
@@ -692,6 +732,28 @@ module Google
|
|
|
692
732
|
)
|
|
693
733
|
transcoder.transcode request_pb
|
|
694
734
|
end
|
|
735
|
+
|
|
736
|
+
##
|
|
737
|
+
# @private
|
|
738
|
+
#
|
|
739
|
+
# GRPC transcoding helper method for the embed_content REST call
|
|
740
|
+
#
|
|
741
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::EmbedContentRequest]
|
|
742
|
+
# A request object representing the call parameters. Required.
|
|
743
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
744
|
+
# Uri, Body, Query string parameters
|
|
745
|
+
def self.transcode_embed_content_request request_pb
|
|
746
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
747
|
+
.with_bindings(
|
|
748
|
+
uri_method: :post,
|
|
749
|
+
uri_template: "/v1/{model}:embedContent",
|
|
750
|
+
body: "*",
|
|
751
|
+
matches: [
|
|
752
|
+
["model", %r{^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+/?$}, false]
|
|
753
|
+
]
|
|
754
|
+
)
|
|
755
|
+
transcoder.transcode request_pb
|
|
756
|
+
end
|
|
695
757
|
end
|
|
696
758
|
end
|
|
697
759
|
end
|
|
@@ -13,11 +13,12 @@ require 'google/cloud/aiplatform/v1/content_pb'
|
|
|
13
13
|
require 'google/cloud/aiplatform/v1/explanation_pb'
|
|
14
14
|
require 'google/cloud/aiplatform/v1/tool_pb'
|
|
15
15
|
require 'google/cloud/aiplatform/v1/types_pb'
|
|
16
|
+
require 'google/cloud/aiplatform/v1/usage_metadata_pb'
|
|
16
17
|
require 'google/protobuf/struct_pb'
|
|
17
18
|
require 'google/protobuf/timestamp_pb'
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
descriptor_data = "\n3google/cloud/aiplatform/v1/prediction_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a&google/cloud/aiplatform/v1/types.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x02\n\x0ePredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.PredictRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x02\n\x0fPredictResponse\x12+\n\x0bpredictions\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"z\n\x11RawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\x80\x01\n\x17StreamRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\xc0\x01\n\x14\x44irectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x84\x01\n\x15\x44irectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"{\n\x17\x44irectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"*\n\x18\x44irectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xd0\x01\n\x1aStreamDirectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x37\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\"\x8a\x01\n\x1bStreamDirectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x8b\x01\n\x1dStreamDirectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x18\n\x0bmethod_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05input\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\"0\n\x1eStreamDirectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xc3\x01\n\x17StreamingPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x87\x01\n\x18StreamingPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"~\n\x1aStreamingRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"-\n\x1bStreamingRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\x9d\x02\n\x0e\x45xplainRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12V\n\x19\x65xplanation_spec_override\x18\x05 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.ExplanationSpecOverride\x12\x19\n\x11\x64\x65ployed_model_id\x18\x03 \x01(\t\"\x98\x01\n\x0f\x45xplainResponse\x12=\n\x0c\x65xplanations\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.Explanation\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12+\n\x0bpredictions\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xd3\x03\n\x12\x43ountTokensRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x12\n\x05model\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12:\n\x08\x63ontents\x18\x04 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01\x12I\n\x12system_instruction\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12Q\n\x11generation_config\x18\x07 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x15\n\x13_system_instructionB\x14\n\x12_generation_config\"\xa2\x01\n\x13\x43ountTokensResponse\x12\x14\n\x0ctotal_tokens\x18\x01 \x01(\x05\x12!\n\x19total_billable_characters\x18\x02 \x01(\x05\x12R\n\x15prompt_tokens_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\"\xf5\x05\n\x16GenerateContentRequest\x12\x12\n\x05model\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12:\n\x08\x63ontents\x18\x02 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x02\x12I\n\x12system_instruction\x18\x08 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12G\n\x0e\x63\x61\x63hed_content\x18\t \x01(\tB/\xe0\x41\x01\xfa\x41)\n\'aiplatform.googleapis.com/CachedContent\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12@\n\x0btool_config\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.ToolConfigB\x03\xe0\x41\x01\x12S\n\x06labels\x18\n \x03(\x0b\x32>.google.cloud.aiplatform.v1.GenerateContentRequest.LabelsEntryB\x03\xe0\x41\x01\x12G\n\x0fsafety_settings\x18\x03 \x03(\x0b\x32).google.cloud.aiplatform.v1.SafetySettingB\x03\xe0\x41\x01\x12M\n\x12model_armor_config\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.ModelArmorConfigB\x03\xe0\x41\x01\x12L\n\x11generation_config\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x15\n\x13_system_instruction\"\xb0\t\n\x17GenerateContentResponse\x12>\n\ncandidates\x18\x02 \x03(\x0b\x32%.google.cloud.aiplatform.v1.CandidateB\x03\xe0\x41\x03\x12\x1a\n\rmodel_version\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bresponse_id\x18\r \x01(\tB\x03\xe0\x41\x03\x12`\n\x0fprompt_feedback\x18\x03 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedbackB\x03\xe0\x41\x03\x12Y\n\x0eusage_metadata\x18\x04 \x01(\x0b\x32\x41.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata\x1a\xf7\x02\n\x0ePromptFeedback\x12k\n\x0c\x62lock_reason\x18\x01 \x01(\x0e\x32P.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12!\n\x14\x62lock_reason_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\x8d\x01\n\rBlockedReason\x12\x1e\n\x1a\x42LOCKED_REASON_UNSPECIFIED\x10\x00\x12\n\n\x06SAFETY\x10\x01\x12\t\n\x05OTHER\x10\x02\x12\r\n\tBLOCKLIST\x10\x03\x12\x16\n\x12PROHIBITED_CONTENT\x10\x04\x12\x0f\n\x0bMODEL_ARMOR\x10\x05\x12\r\n\tJAILBREAK\x10\x06\x1a\xb1\x03\n\rUsageMetadata\x12\x1a\n\x12prompt_token_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x63\x61ndidates_token_count\x18\x02 \x01(\x05\x12!\n\x14thoughts_token_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x11total_token_count\x18\x03 \x01(\x05\x12\'\n\x1a\x63\x61\x63hed_content_token_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12R\n\x15prompt_tokens_details\x18\t \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12Q\n\x14\x63\x61\x63he_tokens_details\x18\n \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12V\n\x19\x63\x61ndidates_tokens_details\x18\x0b \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x32\xf2\x19\n\x11PredictionService\x12\x94\x02\n\x07Predict\x12*.google.cloud.aiplatform.v1.PredictRequest\x1a+.google.cloud.aiplatform.v1.PredictResponse\"\xaf\x01\xda\x41\x1d\x65ndpoint,instances,parameters\x82\xd3\xe4\x93\x02\x88\x01\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict:\x01*ZH\"C/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict:\x01*\x12\xfe\x01\n\nRawPredict\x12-.google.cloud.aiplatform.v1.RawPredictRequest\x1a\x14.google.api.HttpBody\"\xaa\x01\xda\x41\x12\x65ndpoint,http_body\x82\xd3\xe4\x93\x02\x8e\x01\"</v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict:\x01*ZK\"F/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict:\x01*\x12\x98\x02\n\x10StreamRawPredict\x12\x33.google.cloud.aiplatform.v1.StreamRawPredictRequest\x1a\x14.google.api.HttpBody\"\xb6\x01\xda\x41\x12\x65ndpoint,http_body\x82\xd3\xe4\x93\x02\x9a\x01\"B/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict:\x01*ZQ\"L/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict:\x01*0\x01\x12\xc0\x01\n\rDirectPredict\x12\x30.google.cloud.aiplatform.v1.DirectPredictRequest\x1a\x31.google.cloud.aiplatform.v1.DirectPredictResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:directPredict:\x01*\x12\xcc\x01\n\x10\x44irectRawPredict\x12\x33.google.cloud.aiplatform.v1.DirectRawPredictRequest\x1a\x34.google.cloud.aiplatform.v1.DirectRawPredictResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{endpoint=projects/*/locations/*/endpoints/*}:directRawPredict:\x01*\x12\x8c\x01\n\x13StreamDirectPredict\x12\x36.google.cloud.aiplatform.v1.StreamDirectPredictRequest\x1a\x37.google.cloud.aiplatform.v1.StreamDirectPredictResponse\"\x00(\x01\x30\x01\x12\x95\x01\n\x16StreamDirectRawPredict\x12\x39.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest\x1a:.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse\"\x00(\x01\x30\x01\x12\x83\x01\n\x10StreamingPredict\x12\x33.google.cloud.aiplatform.v1.StreamingPredictRequest\x1a\x34.google.cloud.aiplatform.v1.StreamingPredictResponse\"\x00(\x01\x30\x01\x12\xb5\x02\n\x16ServerStreamingPredict\x12\x33.google.cloud.aiplatform.v1.StreamingPredictRequest\x1a\x34.google.cloud.aiplatform.v1.StreamingPredictResponse\"\xad\x01\x82\xd3\xe4\x93\x02\xa6\x01\"H/v1/{endpoint=projects/*/locations/*/endpoints/*}:serverStreamingPredict:\x01*ZW\"R/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:serverStreamingPredict:\x01*0\x01\x12\x8c\x01\n\x13StreamingRawPredict\x12\x36.google.cloud.aiplatform.v1.StreamingRawPredictRequest\x1a\x37.google.cloud.aiplatform.v1.StreamingRawPredictResponse\"\x00(\x01\x30\x01\x12\xda\x01\n\x07\x45xplain\x12*.google.cloud.aiplatform.v1.ExplainRequest\x1a+.google.cloud.aiplatform.v1.ExplainResponse\"v\xda\x41/endpoint,instances,parameters,deployed_model_id\x82\xd3\xe4\x93\x02>\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\x01*\x12\x8d\x03\n\x0fGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\x90\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\xf8\x01\">/v1/{model=projects/*/locations/*/endpoints/*}:generateContent:\x01*ZM\"H/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent:\x01*Z,\"\'/v1/{model=endpoints/*}:generateContent:\x01*Z6\"1/v1/{model=publishers/*/models/*}:generateContent:\x01*\x12\xad\x03\n\x15StreamGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\xa8\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\x90\x02\"D/v1/{model=projects/*/locations/*/endpoints/*}:streamGenerateContent:\x01*ZS\"N/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent:\x01*Z2\"-/v1/{model=endpoints/*}:streamGenerateContent:\x01*Z<\"7/v1/{model=publishers/*/models/*}:streamGenerateContent:\x01*0\x01\x1a\x86\x01\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xd4\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x16PredictionServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
|
|
21
|
+
descriptor_data = "\n3google/cloud/aiplatform/v1/prediction_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a&google/cloud/aiplatform/v1/types.proto\x1a/google/cloud/aiplatform/v1/usage_metadata.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x02\n\x0ePredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\x12K\n\x06labels\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.PredictRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x80\x02\n\x0fPredictResponse\x12+\n\x0bpredictions\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"z\n\x11RawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\x80\x01\n\x17StreamRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\xc0\x01\n\x14\x44irectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x84\x01\n\x15\x44irectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"{\n\x17\x44irectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"*\n\x18\x44irectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xd0\x01\n\x1aStreamDirectPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x37\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.TensorB\x03\xe0\x41\x01\"\x8a\x01\n\x1bStreamDirectPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x8b\x01\n\x1dStreamDirectRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x18\n\x0bmethod_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05input\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\"0\n\x1eStreamDirectRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\xc3\x01\n\x17StreamingPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x87\x01\n\x18StreamingPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"~\n\x1aStreamingRawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\x0c\"-\n\x1bStreamingRawPredictResponse\x12\x0e\n\x06output\x18\x01 \x01(\x0c\"\x9d\x02\n\x0e\x45xplainRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12V\n\x19\x65xplanation_spec_override\x18\x05 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.ExplanationSpecOverride\x12\x19\n\x11\x64\x65ployed_model_id\x18\x03 \x01(\t\"\x98\x01\n\x0f\x45xplainResponse\x12=\n\x0c\x65xplanations\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.Explanation\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12+\n\x0bpredictions\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xd3\x03\n\x12\x43ountTokensRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x12\n\x05model\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12:\n\x08\x63ontents\x18\x04 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01\x12I\n\x12system_instruction\x18\x05 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12Q\n\x11generation_config\x18\x07 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x15\n\x13_system_instructionB\x14\n\x12_generation_config\"\xa2\x01\n\x13\x43ountTokensResponse\x12\x14\n\x0ctotal_tokens\x18\x01 \x01(\x05\x12!\n\x19total_billable_characters\x18\x02 \x01(\x05\x12R\n\x15prompt_tokens_details\x18\x03 \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\"\xf5\x05\n\x16GenerateContentRequest\x12\x12\n\x05model\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12:\n\x08\x63ontents\x18\x02 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x02\x12I\n\x12system_instruction\x18\x08 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12G\n\x0e\x63\x61\x63hed_content\x18\t \x01(\tB/\xe0\x41\x01\xfa\x41)\n\'aiplatform.googleapis.com/CachedContent\x12\x34\n\x05tools\x18\x06 \x03(\x0b\x32 .google.cloud.aiplatform.v1.ToolB\x03\xe0\x41\x01\x12@\n\x0btool_config\x18\x07 \x01(\x0b\x32&.google.cloud.aiplatform.v1.ToolConfigB\x03\xe0\x41\x01\x12S\n\x06labels\x18\n \x03(\x0b\x32>.google.cloud.aiplatform.v1.GenerateContentRequest.LabelsEntryB\x03\xe0\x41\x01\x12G\n\x0fsafety_settings\x18\x03 \x03(\x0b\x32).google.cloud.aiplatform.v1.SafetySettingB\x03\xe0\x41\x01\x12M\n\x12model_armor_config\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.ModelArmorConfigB\x03\xe0\x41\x01\x12L\n\x11generation_config\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x15\n\x13_system_instruction\"\xb0\t\n\x17GenerateContentResponse\x12>\n\ncandidates\x18\x02 \x03(\x0b\x32%.google.cloud.aiplatform.v1.CandidateB\x03\xe0\x41\x03\x12\x1a\n\rmodel_version\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bresponse_id\x18\r \x01(\tB\x03\xe0\x41\x03\x12`\n\x0fprompt_feedback\x18\x03 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedbackB\x03\xe0\x41\x03\x12Y\n\x0eusage_metadata\x18\x04 \x01(\x0b\x32\x41.google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata\x1a\xf7\x02\n\x0ePromptFeedback\x12k\n\x0c\x62lock_reason\x18\x01 \x01(\x0e\x32P.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x02 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12!\n\x14\x62lock_reason_message\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\x8d\x01\n\rBlockedReason\x12\x1e\n\x1a\x42LOCKED_REASON_UNSPECIFIED\x10\x00\x12\n\n\x06SAFETY\x10\x01\x12\t\n\x05OTHER\x10\x02\x12\r\n\tBLOCKLIST\x10\x03\x12\x16\n\x12PROHIBITED_CONTENT\x10\x04\x12\x0f\n\x0bMODEL_ARMOR\x10\x05\x12\r\n\tJAILBREAK\x10\x06\x1a\xb1\x03\n\rUsageMetadata\x12\x1a\n\x12prompt_token_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x63\x61ndidates_token_count\x18\x02 \x01(\x05\x12!\n\x14thoughts_token_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x11total_token_count\x18\x03 \x01(\x05\x12\'\n\x1a\x63\x61\x63hed_content_token_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12R\n\x15prompt_tokens_details\x18\t \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12Q\n\x14\x63\x61\x63he_tokens_details\x18\n \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12V\n\x19\x63\x61ndidates_tokens_details\x18\x0b \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\"\x84\x05\n\x13\x45mbedContentRequest\x12;\n\x05model\x18\x01 \x01(\tB\'\xfa\x41$\n\"aiplatform.googleapis.com/EndpointH\x00\x88\x01\x01\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentH\x01\x88\x01\x01\x12\x17\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12^\n\ttask_type\x18\x05 \x01(\x0e\x32\x41.google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskTypeB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\'\n\x15output_dimensionality\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1f\n\rauto_truncate\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\"\xd7\x01\n\x11\x45mbeddingTaskType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x13\n\x0fRETRIEVAL_QUERY\x10\x02\x12\x16\n\x12RETRIEVAL_DOCUMENT\x10\x03\x12\x17\n\x13SEMANTIC_SIMILARITY\x10\x04\x12\x12\n\x0e\x43LASSIFICATION\x10\x05\x12\x0e\n\nCLUSTERING\x10\x06\x12\x16\n\x12QUESTION_ANSWERING\x10\x07\x12\x15\n\x11\x46\x41\x43T_VERIFICATION\x10\x08\x12\x18\n\x14\x43ODE_RETRIEVAL_QUERY\x10\tB\x08\n\x06_modelB\n\n\x08_contentB\x08\n\x06_titleB\x0c\n\n_task_typeB\x18\n\x16_output_dimensionalityB\x10\n\x0e_auto_truncate\"\xd8\x01\n\x14\x45mbedContentResponse\x12M\n\tembedding\x18\x01 \x01(\x0b\x32:.google.cloud.aiplatform.v1.EmbedContentResponse.Embedding\x12\x41\n\x0eusage_metadata\x18\x02 \x01(\x0b\x32).google.cloud.aiplatform.v1.UsageMetadata\x12\x11\n\ttruncated\x18\x04 \x01(\x08\x1a\x1b\n\tEmbedding\x12\x0e\n\x06values\x18\x01 \x03(\x02\x32\xc8\x1b\n\x11PredictionService\x12\x94\x02\n\x07Predict\x12*.google.cloud.aiplatform.v1.PredictRequest\x1a+.google.cloud.aiplatform.v1.PredictResponse\"\xaf\x01\xda\x41\x1d\x65ndpoint,instances,parameters\x82\xd3\xe4\x93\x02\x88\x01\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict:\x01*ZH\"C/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict:\x01*\x12\xfe\x01\n\nRawPredict\x12-.google.cloud.aiplatform.v1.RawPredictRequest\x1a\x14.google.api.HttpBody\"\xaa\x01\xda\x41\x12\x65ndpoint,http_body\x82\xd3\xe4\x93\x02\x8e\x01\"</v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict:\x01*ZK\"F/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict:\x01*\x12\x98\x02\n\x10StreamRawPredict\x12\x33.google.cloud.aiplatform.v1.StreamRawPredictRequest\x1a\x14.google.api.HttpBody\"\xb6\x01\xda\x41\x12\x65ndpoint,http_body\x82\xd3\xe4\x93\x02\x9a\x01\"B/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict:\x01*ZQ\"L/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict:\x01*0\x01\x12\xc0\x01\n\rDirectPredict\x12\x30.google.cloud.aiplatform.v1.DirectPredictRequest\x1a\x31.google.cloud.aiplatform.v1.DirectPredictResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:directPredict:\x01*\x12\xcc\x01\n\x10\x44irectRawPredict\x12\x33.google.cloud.aiplatform.v1.DirectRawPredictRequest\x1a\x34.google.cloud.aiplatform.v1.DirectRawPredictResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{endpoint=projects/*/locations/*/endpoints/*}:directRawPredict:\x01*\x12\x8c\x01\n\x13StreamDirectPredict\x12\x36.google.cloud.aiplatform.v1.StreamDirectPredictRequest\x1a\x37.google.cloud.aiplatform.v1.StreamDirectPredictResponse\"\x00(\x01\x30\x01\x12\x95\x01\n\x16StreamDirectRawPredict\x12\x39.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest\x1a:.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse\"\x00(\x01\x30\x01\x12\x83\x01\n\x10StreamingPredict\x12\x33.google.cloud.aiplatform.v1.StreamingPredictRequest\x1a\x34.google.cloud.aiplatform.v1.StreamingPredictResponse\"\x00(\x01\x30\x01\x12\xb5\x02\n\x16ServerStreamingPredict\x12\x33.google.cloud.aiplatform.v1.StreamingPredictRequest\x1a\x34.google.cloud.aiplatform.v1.StreamingPredictResponse\"\xad\x01\x82\xd3\xe4\x93\x02\xa6\x01\"H/v1/{endpoint=projects/*/locations/*/endpoints/*}:serverStreamingPredict:\x01*ZW\"R/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:serverStreamingPredict:\x01*0\x01\x12\x8c\x01\n\x13StreamingRawPredict\x12\x36.google.cloud.aiplatform.v1.StreamingRawPredictRequest\x1a\x37.google.cloud.aiplatform.v1.StreamingRawPredictResponse\"\x00(\x01\x30\x01\x12\xda\x01\n\x07\x45xplain\x12*.google.cloud.aiplatform.v1.ExplainRequest\x1a+.google.cloud.aiplatform.v1.ExplainResponse\"v\xda\x41/endpoint,instances,parameters,deployed_model_id\x82\xd3\xe4\x93\x02>\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\x01*\x12\x8d\x03\n\x0fGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\x90\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\xf8\x01\">/v1/{model=projects/*/locations/*/endpoints/*}:generateContent:\x01*ZM\"H/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent:\x01*Z,\"\'/v1/{model=endpoints/*}:generateContent:\x01*Z6\"1/v1/{model=publishers/*/models/*}:generateContent:\x01*\x12\xad\x03\n\x15StreamGenerateContent\x12\x32.google.cloud.aiplatform.v1.GenerateContentRequest\x1a\x33.google.cloud.aiplatform.v1.GenerateContentResponse\"\xa8\x02\xda\x41\x0emodel,contents\x82\xd3\xe4\x93\x02\x90\x02\"D/v1/{model=projects/*/locations/*/endpoints/*}:streamGenerateContent:\x01*ZS\"N/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent:\x01*Z2\"-/v1/{model=endpoints/*}:streamGenerateContent:\x01*Z<\"7/v1/{model=publishers/*/models/*}:streamGenerateContent:\x01*0\x01\x12\xd3\x01\n\x0c\x45mbedContent\x12/.google.cloud.aiplatform.v1.EmbedContentRequest\x1a\x30.google.cloud.aiplatform.v1.EmbedContentResponse\"`\xda\x41\rmodel,content\x82\xd3\xe4\x93\x02J\"E/v1/{model=projects/*/locations/*/publishers/*/models/*}:embedContent:\x01*\x1a\x86\x01\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41ghttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xd4\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x16PredictionServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
|
|
21
22
|
|
|
22
23
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
23
24
|
|
|
@@ -39,6 +40,7 @@ rescue TypeError
|
|
|
39
40
|
["google.cloud.aiplatform.v1.Content", "google/cloud/aiplatform/v1/content.proto"],
|
|
40
41
|
["google.cloud.aiplatform.v1.Tool", "google/cloud/aiplatform/v1/tool.proto"],
|
|
41
42
|
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
|
43
|
+
["google.cloud.aiplatform.v1.UsageMetadata", "google/cloud/aiplatform/v1/usage_metadata.proto"],
|
|
42
44
|
]
|
|
43
45
|
imports.each do |type_name, expected_filename|
|
|
44
46
|
import_file = pool.lookup(type_name).file_descriptor
|
|
@@ -79,6 +81,10 @@ module Google
|
|
|
79
81
|
GenerateContentResponse::PromptFeedback = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback").msgclass
|
|
80
82
|
GenerateContentResponse::PromptFeedback::BlockedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason").enummodule
|
|
81
83
|
GenerateContentResponse::UsageMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.GenerateContentResponse.UsageMetadata").msgclass
|
|
84
|
+
EmbedContentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.EmbedContentRequest").msgclass
|
|
85
|
+
EmbedContentRequest::EmbeddingTaskType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.EmbedContentRequest.EmbeddingTaskType").enummodule
|
|
86
|
+
EmbedContentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.EmbedContentResponse").msgclass
|
|
87
|
+
EmbedContentResponse::Embedding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.EmbedContentResponse.Embedding").msgclass
|
|
82
88
|
end
|
|
83
89
|
end
|
|
84
90
|
end
|
|
@@ -85,6 +85,8 @@ module Google
|
|
|
85
85
|
rpc :GenerateContent, ::Google::Cloud::AIPlatform::V1::GenerateContentRequest, ::Google::Cloud::AIPlatform::V1::GenerateContentResponse
|
|
86
86
|
# Generate content with multimodal inputs with streaming support.
|
|
87
87
|
rpc :StreamGenerateContent, ::Google::Cloud::AIPlatform::V1::GenerateContentRequest, stream(::Google::Cloud::AIPlatform::V1::GenerateContentResponse)
|
|
88
|
+
# Embed content with multimodal inputs.
|
|
89
|
+
rpc :EmbedContent, ::Google::Cloud::AIPlatform::V1::EmbedContentRequest, ::Google::Cloud::AIPlatform::V1::EmbedContentResponse
|
|
88
90
|
end
|
|
89
91
|
|
|
90
92
|
Stub = Service.rpc_stub_class
|
|
@@ -11,7 +11,7 @@ require 'google/protobuf/struct_pb'
|
|
|
11
11
|
require 'google/type/latlng_pb'
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\
|
|
14
|
+
descriptor_data = "\n%google/cloud/aiplatform/v1/tool.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x18google/type/latlng.proto\"\x9f\n\n\x04Tool\x12S\n\x15\x66unction_declarations\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.v1.FunctionDeclarationB\x03\xe0\x41\x01\x12=\n\tretrieval\x18\x02 \x01(\x0b\x32%.google.cloud.aiplatform.v1.RetrievalB\x03\xe0\x41\x01\x12I\n\rgoogle_search\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.Tool.GoogleSearchB\x03\xe0\x41\x01\x12W\n\x17google_search_retrieval\x18\x03 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.GoogleSearchRetrievalB\x03\xe0\x41\x01\x12@\n\x0bgoogle_maps\x18\x05 \x01(\x0b\x32&.google.cloud.aiplatform.v1.GoogleMapsB\x03\xe0\x41\x01\x12S\n\x15\x65nterprise_web_search\x18\x06 \x01(\x0b\x32/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\x03\xe0\x41\x01\x12K\n\x0e\x63ode_execution\x18\x04 \x01(\x0b\x32..google.cloud.aiplatform.v1.Tool.CodeExecutionB\x03\xe0\x41\x01\x12@\n\x0burl_context\x18\x08 \x01(\x0b\x32&.google.cloud.aiplatform.v1.UrlContextB\x03\xe0\x41\x01\x12G\n\x0c\x63omputer_use\x18\x0b \x01(\x0b\x32,.google.cloud.aiplatform.v1.Tool.ComputerUseB\x03\xe0\x41\x01\x1a\xa1\x01\n\x0cGoogleSearch\x12\x1c\n\x0f\x65xclude_domains\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12[\n\x13\x62locking_confidence\x18\x04 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.Tool.PhishBlockThresholdB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x16\n\x14_blocking_confidence\x1a\x0f\n\rCodeExecution\x1a\xd2\x01\n\x0b\x43omputerUse\x12R\n\x0b\x65nvironment\x18\x01 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.Tool.ComputerUse.EnvironmentB\x03\xe0\x41\x02\x12*\n\x1d\x65xcluded_predefined_functions\x18\x02 \x03(\tB\x03\xe0\x41\x01\"C\n\x0b\x45nvironment\x12\x1b\n\x17\x45NVIRONMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13\x45NVIRONMENT_BROWSER\x10\x01\"\xe5\x01\n\x13PhishBlockThreshold\x12%\n!PHISH_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x1e\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10(\x12\x18\n\x14\x42LOCK_HIGH_AND_ABOVE\x10\x32\x12\x1a\n\x16\x42LOCK_HIGHER_AND_ABOVE\x10\x37\x12\x1d\n\x19\x42LOCK_VERY_HIGH_AND_ABOVE\x10<\x12\x1d\n\x19\x42LOCK_ONLY_EXTREMELY_HIGH\x10\x64\"\x0c\n\nUrlContext\"\xb2\x02\n\x13\x46unctionDeclaration\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\x01\x12;\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12;\n\x16parameters_json_schema\x18\x05 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x39\n\x08response\x18\x04 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x39\n\x14response_json_schema\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\"M\n\x0c\x46unctionCall\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x01\"\xb2\x01\n\x14\x46unctionResponsePart\x12G\n\x0binline_data\x18\x01 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.FunctionResponseBlobH\x00\x12I\n\tfile_data\x18\x02 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.FunctionResponseFileDataH\x00\x42\x06\n\x04\x64\x61ta\"\\\n\x14\x46unctionResponseBlob\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\"d\n\x18\x46unctionResponseFileData\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x66ile_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n\x10\x46unctionResponse\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12.\n\x08response\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x02\x12\x44\n\x05parts\x18\x04 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.FunctionResponsePartB\x03\xe0\x41\x01\"\xa1\x01\n\x0e\x45xecutableCode\x12J\n\x08language\x18\x01 \x01(\x0e\x32\x33.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\"0\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\n\n\x06PYTHON\x10\x01\"\xe0\x01\n\x13\x43odeExecutionResult\x12M\n\x07outcome\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\x03\xe0\x41\x02\x12\x13\n\x06output\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n\x07Outcome\x12\x17\n\x13OUTCOME_UNSPECIFIED\x10\x00\x12\x0e\n\nOUTCOME_OK\x10\x01\x12\x12\n\x0eOUTCOME_FAILED\x10\x02\x12\x1d\n\x19OUTCOME_DEADLINE_EXCEEDED\x10\x03\"\xc9\x01\n\tRetrieval\x12\x46\n\x10vertex_ai_search\x18\x02 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexAISearchH\x00\x12\x46\n\x10vertex_rag_store\x18\x04 \x01(\x0b\x32*.google.cloud.aiplatform.v1.VertexRagStoreH\x00\x12\"\n\x13\x64isable_attribution\x18\x03 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x42\x08\n\x06source\"\xaa\x03\n\x0eVertexRagStore\x12R\n\rrag_resources\x18\x04 \x03(\x0b\x32\x36.google.cloud.aiplatform.v1.VertexRagStore.RagResourceB\x03\xe0\x41\x01\x12$\n\x10similarity_top_k\x18\x02 \x01(\x05\x42\x05\x18\x01\xe0\x41\x01H\x00\x88\x01\x01\x12-\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x05\x18\x01\xe0\x41\x01H\x01\x88\x01\x01\x12Q\n\x14rag_retrieval_config\x18\x06 \x01(\x0b\x32..google.cloud.aiplatform.v1.RagRetrievalConfigB\x03\xe0\x41\x01\x1ai\n\x0bRagResource\x12?\n\nrag_corpus\x18\x01 \x01(\tB+\xe0\x41\x01\xfa\x41%\n#aiplatform.googleapis.com/RagCorpus\x12\x19\n\x0crag_file_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x42\x13\n\x11_similarity_top_kB\x1c\n\x1a_vector_distance_threshold\"\xfa\x01\n\x0eVertexAISearch\x12\x16\n\tdatastore\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x65ngine\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmax_results\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12R\n\x10\x64\x61ta_store_specs\x18\x05 \x03(\x0b\x32\x38.google.cloud.aiplatform.v1.VertexAISearch.DataStoreSpec\x1a\x38\n\rDataStoreSpec\x12\x12\n\ndata_store\x18\x01 \x01(\t\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\"m\n\x15GoogleSearchRetrieval\x12T\n\x18\x64ynamic_retrieval_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"(\n\nGoogleMaps\x12\x1a\n\renable_widget\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x13\x45nterpriseWebSearch\x12\x1c\n\x0f\x65xclude_domains\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12[\n\x13\x62locking_confidence\x18\x02 \x01(\x0e\x32\x34.google.cloud.aiplatform.v1.Tool.PhishBlockThresholdB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x16\n\x14_blocking_confidence\"\xca\x01\n\x16\x44ynamicRetrievalConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x37.google.cloud.aiplatform.v1.DynamicRetrievalConfig.Mode\x12#\n\x11\x64ynamic_threshold\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\".\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cMODE_DYNAMIC\x10\x01\x42\x14\n\x12_dynamic_threshold\"\xb1\x01\n\nToolConfig\x12W\n\x17\x66unction_calling_config\x18\x01 \x01(\x0b\x32\x31.google.cloud.aiplatform.v1.FunctionCallingConfigB\x03\xe0\x41\x01\x12J\n\x10retrieval_config\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.RetrievalConfigB\x03\xe0\x41\x01\"\xc2\x01\n\x15\x46unctionCallingConfig\x12I\n\x04mode\x18\x01 \x01(\x0e\x32\x36.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\x03\xe0\x41\x01\x12#\n\x16\x61llowed_function_names\x18\x02 \x03(\tB\x03\xe0\x41\x01\"9\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x07\n\x03\x41NY\x10\x02\x12\x08\n\x04NONE\x10\x03\"v\n\x0fRetrievalConfig\x12)\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_lat_lngB\x10\n\x0e_language_code\"\xaa\x05\n\x12RagRetrievalConfig\x12\x12\n\x05top_k\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12J\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.RagRetrievalConfig.FilterB\x03\xe0\x41\x01\x12L\n\x07ranking\x18\x04 \x01(\x0b\x32\x36.google.cloud.aiplatform.v1.RagRetrievalConfig.RankingB\x03\xe0\x41\x01\x1a\x93\x01\n\x06\x46ilter\x12(\n\x19vector_distance_threshold\x18\x03 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12*\n\x1bvector_similarity_threshold\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12\x1c\n\x0fmetadata_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x15\n\x13vector_db_threshold\x1a\xcf\x02\n\x07Ranking\x12_\n\x0crank_service\x18\x01 \x01(\x0b\x32\x42.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.RankServiceB\x03\xe0\x41\x01H\x00\x12[\n\nllm_ranker\x18\x03 \x01(\x0b\x32@.google.cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\x03\xe0\x41\x01H\x00\x1a:\n\x0bRankService\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_name\x1a\x38\n\tLlmRanker\x12\x1c\n\nmodel_name\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0eranking_configB\xc7\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\tToolProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
|
|
15
15
|
|
|
16
16
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
17
17
|
|
|
@@ -53,6 +53,9 @@ module Google
|
|
|
53
53
|
UrlContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UrlContext").msgclass
|
|
54
54
|
FunctionDeclaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionDeclaration").msgclass
|
|
55
55
|
FunctionCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionCall").msgclass
|
|
56
|
+
FunctionResponsePart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionResponsePart").msgclass
|
|
57
|
+
FunctionResponseBlob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionResponseBlob").msgclass
|
|
58
|
+
FunctionResponseFileData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionResponseFileData").msgclass
|
|
56
59
|
FunctionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.FunctionResponse").msgclass
|
|
57
60
|
ExecutableCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ExecutableCode").msgclass
|
|
58
61
|
ExecutableCode::Language = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ExecutableCode.Language").enummodule
|
|
@@ -13,7 +13,7 @@ require 'google/protobuf/timestamp_pb'
|
|
|
13
13
|
require 'google/rpc/status_pb'
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
descriptor_data = "\n+google/cloud/aiplatform/v1/tuning_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/job_state.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\
|
|
16
|
+
descriptor_data = "\n+google/cloud/aiplatform/v1/tuning_job.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a*google/cloud/aiplatform/v1/job_state.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8d\t\n\tTuningJob\x12\x14\n\nbase_model\x18\x04 \x01(\tH\x00\x12\x44\n\x0fpre_tuned_model\x18\x1f \x01(\x0b\x32).google.cloud.aiplatform.v1.PreTunedModelH\x00\x12R\n\x16supervised_tuning_spec\x18\x05 \x01(\x0b\x32\x30.google.cloud.aiplatform.v1.SupervisedTuningSpecH\x01\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12%\n\x18tuned_model_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x38\n\x05state\x18\x06 \x01(\x0e\x32$.google.cloud.aiplatform.v1.JobStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12&\n\x05\x65rror\x18\x0b \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x0c \x03(\x0b\x32\x31.google.cloud.aiplatform.v1.TuningJob.LabelsEntryB\x03\xe0\x41\x01\x12=\n\nexperiment\x18\r \x01(\tB)\xe0\x41\x03\xfa\x41#\n!aiplatform.googleapis.com/Context\x12@\n\x0btuned_model\x18\x0e \x01(\x0b\x32&.google.cloud.aiplatform.v1.TunedModelB\x03\xe0\x41\x03\x12K\n\x11tuning_data_stats\x18\x0f \x01(\x0b\x32+.google.cloud.aiplatform.v1.TuningDataStatsB\x03\xe0\x41\x03\x12\x43\n\x0f\x65ncryption_spec\x18\x10 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12\x17\n\x0fservice_account\x18\x16 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n#aiplatform.googleapis.com/TuningJob\x12?projects/{project}/locations/{location}/tuningJobs/{tuning_job}*\ntuningJobs2\ttuningJobB\x0e\n\x0csource_modelB\r\n\x0btuning_spec\"\xce\x01\n\nTunedModel\x12\x36\n\x05model\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12<\n\x08\x65ndpoint\x18\x02 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12J\n\x0b\x63heckpoints\x18\x03 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.TunedModelCheckpointB\x03\xe0\x41\x03\"\xf2\x02\n#SupervisedTuningDatasetDistribution\x12\x10\n\x03sum\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x62illable_sum\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12\x10\n\x03min\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\x12\x10\n\x03max\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\x12\x11\n\x04mean\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x12\x13\n\x06median\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x12\x0f\n\x02p5\x18\x06 \x01(\x01\x42\x03\xe0\x41\x03\x12\x10\n\x03p95\x18\x07 \x01(\x01\x42\x03\xe0\x41\x03\x12\x63\n\x07\x62uckets\x18\x08 \x03(\x0b\x32M.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucketB\x03\xe0\x41\x03\x1aJ\n\rDatasetBucket\x12\x12\n\x05\x63ount\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\x12\x11\n\x04left\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\x12\x12\n\x05right\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\"\xfc\x05\n\x19SupervisedTuningDataStats\x12)\n\x1ctuning_dataset_example_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12)\n\x1ctotal_tuning_character_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12-\n\x1etotal_billable_character_count\x18\x03 \x01(\x03\x42\x05\x18\x01\xe0\x41\x03\x12\'\n\x1atotal_billable_token_count\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12\x1e\n\x11tuning_step_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12k\n\x1duser_input_token_distribution\x18\x05 \x01(\x0b\x32?.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\x03\xe0\x41\x03\x12l\n\x1euser_output_token_distribution\x18\x06 \x01(\x0b\x32?.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\x03\xe0\x41\x03\x12s\n%user_message_per_example_distribution\x18\x07 \x01(\x0b\x32?.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistributionB\x03\xe0\x41\x03\x12G\n\x15user_dataset_examples\x18\x08 \x03(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12*\n\x1dtotal_truncated_example_count\x18\n \x01(\x03\x42\x03\xe0\x41\x03\x12&\n\x19truncated_example_indices\x18\x0b \x03(\x03\x42\x03\xe0\x41\x03\x12$\n\x17\x64ropped_example_reasons\x18\x0c \x03(\tB\x03\xe0\x41\x03\"\x85\x01\n\x0fTuningDataStats\x12]\n\x1csupervised_tuning_data_stats\x18\x01 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.SupervisedTuningDataStatsH\x00\x42\x13\n\x11tuning_data_stats\"\xfa\x02\n\x19SupervisedHyperParameters\x12\x18\n\x0b\x65poch_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18learning_rate_multiplier\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01\x12\\\n\x0c\x61\x64\x61pter_size\x18\x03 \x01(\x0e\x32\x41.google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSizeB\x03\xe0\x41\x01\"\xbd\x01\n\x0b\x41\x64\x61pterSize\x12\x1c\n\x18\x41\x44\x41PTER_SIZE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x41\x44\x41PTER_SIZE_ONE\x10\x01\x12\x14\n\x10\x41\x44\x41PTER_SIZE_TWO\x10\x06\x12\x15\n\x11\x41\x44\x41PTER_SIZE_FOUR\x10\x02\x12\x16\n\x12\x41\x44\x41PTER_SIZE_EIGHT\x10\x03\x12\x18\n\x14\x41\x44\x41PTER_SIZE_SIXTEEN\x10\x04\x12\x1b\n\x17\x41\x44\x41PTER_SIZE_THIRTY_TWO\x10\x05\"\xde\x01\n\x14SupervisedTuningSpec\x12!\n\x14training_dataset_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16validation_dataset_uri\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12T\n\x10hyper_parameters\x18\x03 \x01(\x0b\x32\x35.google.cloud.aiplatform.v1.SupervisedHyperParametersB\x03\xe0\x41\x01\x12(\n\x1b\x65xport_last_checkpoint_only\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"\xe3\x01\n\rTunedModelRef\x12;\n\x0btuned_model\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x61iplatform.googleapis.com/ModelH\x00\x12>\n\ntuning_job\x18\x02 \x01(\tB(\xfa\x41%\n#aiplatform.googleapis.com/TuningJobH\x00\x12\x42\n\x0cpipeline_job\x18\x03 \x01(\tB*\xfa\x41\'\n%aiplatform.googleapis.com/PipelineJobH\x00\x42\x11\n\x0ftuned_model_ref\"\\\n\x14TunedModelCheckpoint\x12\x15\n\rcheckpoint_id\x18\x01 \x01(\t\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x0c\n\x04step\x18\x03 \x01(\x03\x12\x10\n\x08\x65ndpoint\x18\x04 \x01(\t\"\x84\x01\n\rPreTunedModel\x12>\n\x10tuned_model_name\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1a\n\rcheckpoint_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nbase_model\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\xcc\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0eTuningJobProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
|
|
17
17
|
|
|
18
18
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
19
19
|
|
|
@@ -58,6 +58,7 @@ module Google
|
|
|
58
58
|
SupervisedTuningSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.SupervisedTuningSpec").msgclass
|
|
59
59
|
TunedModelRef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.TunedModelRef").msgclass
|
|
60
60
|
TunedModelCheckpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.TunedModelCheckpoint").msgclass
|
|
61
|
+
PreTunedModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PreTunedModel").msgclass
|
|
61
62
|
end
|
|
62
63
|
end
|
|
63
64
|
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: google/cloud/aiplatform/v1/usage_metadata.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/field_behavior_pb'
|
|
8
|
+
require 'google/cloud/aiplatform/v1/content_pb'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
descriptor_data = "\n/google/cloud/aiplatform/v1/usage_metadata.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/content.proto\"\xe2\x05\n\rUsageMetadata\x12\x1a\n\x12prompt_token_count\x18\x01 \x01(\x05\x12\x1e\n\x16\x63\x61ndidates_token_count\x18\x02 \x01(\x05\x12\x19\n\x11total_token_count\x18\x03 \x01(\x05\x12(\n\x1btool_use_prompt_token_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12!\n\x14thoughts_token_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12\'\n\x1a\x63\x61\x63hed_content_token_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12R\n\x15prompt_tokens_details\x18\t \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12Q\n\x14\x63\x61\x63he_tokens_details\x18\n \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12V\n\x19\x63\x61ndidates_tokens_details\x18\x0b \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12[\n\x1etool_use_prompt_tokens_details\x18\x0c \x03(\x0b\x32..google.cloud.aiplatform.v1.ModalityTokenCountB\x03\xe0\x41\x03\x12P\n\x0ctraffic_type\x18\x08 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.UsageMetadata.TrafficTypeB\x03\xe0\x41\x03\"V\n\x0bTrafficType\x12\x1c\n\x18TRAFFIC_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tON_DEMAND\x10\x01\x12\x1a\n\x16PROVISIONED_THROUGHPUT\x10\x02\x42\xd0\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x12UsageMetadataProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
|
|
12
|
+
|
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
+
|
|
15
|
+
begin
|
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
|
17
|
+
rescue TypeError
|
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
21
|
+
parsed.clear_dependency
|
|
22
|
+
serialized = parsed.class.encode(parsed)
|
|
23
|
+
file = pool.add_serialized_file(serialized)
|
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
25
|
+
imports = [
|
|
26
|
+
["google.cloud.aiplatform.v1.ModalityTokenCount", "google/cloud/aiplatform/v1/content.proto"],
|
|
27
|
+
]
|
|
28
|
+
imports.each do |type_name, expected_filename|
|
|
29
|
+
import_file = pool.lookup(type_name).file_descriptor
|
|
30
|
+
if import_file.name != expected_filename
|
|
31
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
|
35
|
+
warn "This will become an error in the next major version."
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
module Google
|
|
39
|
+
module Cloud
|
|
40
|
+
module AIPlatform
|
|
41
|
+
module V1
|
|
42
|
+
UsageMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UsageMetadata").msgclass
|
|
43
|
+
UsageMetadata::TrafficType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.UsageMetadata.TrafficType").enummodule
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -668,6 +668,90 @@ module Google
|
|
|
668
668
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
669
669
|
end
|
|
670
670
|
end
|
|
671
|
+
|
|
672
|
+
# Request message for
|
|
673
|
+
# {::Google::Cloud::AIPlatform::V1::PredictionService::Client#embed_content PredictionService.EmbedContent}.
|
|
674
|
+
# @!attribute [rw] model
|
|
675
|
+
# @return [::String]
|
|
676
|
+
# Required. The name of the publisher model requested to serve the
|
|
677
|
+
# prediction. Format:
|
|
678
|
+
# `projects/{project}/locations/{location}/publishers/*/models/*`
|
|
679
|
+
# @!attribute [rw] content
|
|
680
|
+
# @return [::Google::Cloud::AIPlatform::V1::Content]
|
|
681
|
+
# Required. Input content to be embedded. Required.
|
|
682
|
+
# @!attribute [rw] title
|
|
683
|
+
# @return [::String]
|
|
684
|
+
# Optional. An optional title for the text.
|
|
685
|
+
# @!attribute [rw] task_type
|
|
686
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
|
|
687
|
+
# Optional. The task type of the embedding.
|
|
688
|
+
# @!attribute [rw] output_dimensionality
|
|
689
|
+
# @return [::Integer]
|
|
690
|
+
# Optional. Optional reduced dimension for the output embedding. If set,
|
|
691
|
+
# excessive values in the output embedding are truncated from the end.
|
|
692
|
+
# @!attribute [rw] auto_truncate
|
|
693
|
+
# @return [::Boolean]
|
|
694
|
+
# Optional. Whether to silently truncate the input content if it's longer
|
|
695
|
+
# than the maximum sequence length.
|
|
696
|
+
class EmbedContentRequest
|
|
697
|
+
include ::Google::Protobuf::MessageExts
|
|
698
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
699
|
+
|
|
700
|
+
# Represents a downstream task the embeddings will be used for.
|
|
701
|
+
module EmbeddingTaskType
|
|
702
|
+
# Unset value, which will default to one of the other enum values.
|
|
703
|
+
UNSPECIFIED = 0
|
|
704
|
+
|
|
705
|
+
# Specifies the given text is a query in a search/retrieval setting.
|
|
706
|
+
RETRIEVAL_QUERY = 2
|
|
707
|
+
|
|
708
|
+
# Specifies the given text is a document from the corpus being searched.
|
|
709
|
+
RETRIEVAL_DOCUMENT = 3
|
|
710
|
+
|
|
711
|
+
# Specifies the given text will be used for STS.
|
|
712
|
+
SEMANTIC_SIMILARITY = 4
|
|
713
|
+
|
|
714
|
+
# Specifies that the given text will be classified.
|
|
715
|
+
CLASSIFICATION = 5
|
|
716
|
+
|
|
717
|
+
# Specifies that the embeddings will be used for clustering.
|
|
718
|
+
CLUSTERING = 6
|
|
719
|
+
|
|
720
|
+
# Specifies that the embeddings will be used for question answering.
|
|
721
|
+
QUESTION_ANSWERING = 7
|
|
722
|
+
|
|
723
|
+
# Specifies that the embeddings will be used for fact verification.
|
|
724
|
+
FACT_VERIFICATION = 8
|
|
725
|
+
|
|
726
|
+
# Specifies that the embeddings will be used for code retrieval.
|
|
727
|
+
CODE_RETRIEVAL_QUERY = 9
|
|
728
|
+
end
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# Response message for
|
|
732
|
+
# {::Google::Cloud::AIPlatform::V1::PredictionService::Client#embed_content PredictionService.EmbedContent}.
|
|
733
|
+
# @!attribute [rw] embedding
|
|
734
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentResponse::Embedding]
|
|
735
|
+
# The embedding generated from the input content.
|
|
736
|
+
# @!attribute [rw] usage_metadata
|
|
737
|
+
# @return [::Google::Cloud::AIPlatform::V1::UsageMetadata]
|
|
738
|
+
# Metadata about the response(s).
|
|
739
|
+
# @!attribute [rw] truncated
|
|
740
|
+
# @return [::Boolean]
|
|
741
|
+
# Whether the input content was truncated before generating the embedding.
|
|
742
|
+
class EmbedContentResponse
|
|
743
|
+
include ::Google::Protobuf::MessageExts
|
|
744
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
745
|
+
|
|
746
|
+
# A list of floats representing an embedding.
|
|
747
|
+
# @!attribute [rw] values
|
|
748
|
+
# @return [::Array<::Float>]
|
|
749
|
+
# Embedding vector values.
|
|
750
|
+
class Embedding
|
|
751
|
+
include ::Google::Protobuf::MessageExts
|
|
752
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
753
|
+
end
|
|
754
|
+
end
|
|
671
755
|
end
|
|
672
756
|
end
|
|
673
757
|
end
|
|
@@ -107,6 +107,14 @@ module Google
|
|
|
107
107
|
# @!attribute [rw] environment
|
|
108
108
|
# @return [::Google::Cloud::AIPlatform::V1::Tool::ComputerUse::Environment]
|
|
109
109
|
# Required. The environment being operated.
|
|
110
|
+
# @!attribute [rw] excluded_predefined_functions
|
|
111
|
+
# @return [::Array<::String>]
|
|
112
|
+
# Optional. By default, [predefined
|
|
113
|
+
# functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions)
|
|
114
|
+
# are included in the final model call. Some of them can be explicitly
|
|
115
|
+
# excluded from being automatically included. This can serve two purposes:
|
|
116
|
+
# 1. Using a more restricted / different action space.
|
|
117
|
+
# 2. Improving the definitions / instructions of predefined functions.
|
|
110
118
|
class ComputerUse
|
|
111
119
|
include ::Google::Protobuf::MessageExts
|
|
112
120
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -238,6 +246,74 @@ module Google
|
|
|
238
246
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
239
247
|
end
|
|
240
248
|
|
|
249
|
+
# A datatype containing media that is part of a `FunctionResponse` message.
|
|
250
|
+
#
|
|
251
|
+
# A `FunctionResponsePart` consists of data which has an associated datatype. A
|
|
252
|
+
# `FunctionResponsePart` can only contain one of the accepted types in
|
|
253
|
+
# `FunctionResponsePart.data`.
|
|
254
|
+
#
|
|
255
|
+
# A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
|
|
256
|
+
# type and subtype of the media if the `inline_data` field is filled with raw
|
|
257
|
+
# bytes.
|
|
258
|
+
# @!attribute [rw] inline_data
|
|
259
|
+
# @return [::Google::Cloud::AIPlatform::V1::FunctionResponseBlob]
|
|
260
|
+
# Inline media bytes.
|
|
261
|
+
#
|
|
262
|
+
# Note: The following fields are mutually exclusive: `inline_data`, `file_data`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
263
|
+
# @!attribute [rw] file_data
|
|
264
|
+
# @return [::Google::Cloud::AIPlatform::V1::FunctionResponseFileData]
|
|
265
|
+
# URI based data.
|
|
266
|
+
#
|
|
267
|
+
# Note: The following fields are mutually exclusive: `file_data`, `inline_data`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
268
|
+
class FunctionResponsePart
|
|
269
|
+
include ::Google::Protobuf::MessageExts
|
|
270
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Raw media bytes for function response.
|
|
274
|
+
#
|
|
275
|
+
# Text should not be sent as raw bytes, use the 'text' field.
|
|
276
|
+
# @!attribute [rw] mime_type
|
|
277
|
+
# @return [::String]
|
|
278
|
+
# Required. The IANA standard MIME type of the source data.
|
|
279
|
+
# @!attribute [rw] data
|
|
280
|
+
# @return [::String]
|
|
281
|
+
# Required. Raw bytes.
|
|
282
|
+
# @!attribute [rw] display_name
|
|
283
|
+
# @return [::String]
|
|
284
|
+
# Optional. Display name of the blob.
|
|
285
|
+
#
|
|
286
|
+
# Used to provide a label or filename to distinguish blobs.
|
|
287
|
+
#
|
|
288
|
+
# This field is only returned in PromptMessage for prompt management.
|
|
289
|
+
# It is currently used in the Gemini GenerateContent calls only when server
|
|
290
|
+
# side tools (code_execution, google_search, and url_context) are enabled.
|
|
291
|
+
class FunctionResponseBlob
|
|
292
|
+
include ::Google::Protobuf::MessageExts
|
|
293
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# URI based data for function response.
|
|
297
|
+
# @!attribute [rw] mime_type
|
|
298
|
+
# @return [::String]
|
|
299
|
+
# Required. The IANA standard MIME type of the source data.
|
|
300
|
+
# @!attribute [rw] file_uri
|
|
301
|
+
# @return [::String]
|
|
302
|
+
# Required. URI.
|
|
303
|
+
# @!attribute [rw] display_name
|
|
304
|
+
# @return [::String]
|
|
305
|
+
# Optional. Display name of the file data.
|
|
306
|
+
#
|
|
307
|
+
# Used to provide a label or filename to distinguish file datas.
|
|
308
|
+
#
|
|
309
|
+
# This field is only returned in PromptMessage for prompt management.
|
|
310
|
+
# It is currently used in the Gemini GenerateContent calls only when server
|
|
311
|
+
# side tools (code_execution, google_search, and url_context) are enabled.
|
|
312
|
+
class FunctionResponseFileData
|
|
313
|
+
include ::Google::Protobuf::MessageExts
|
|
314
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
315
|
+
end
|
|
316
|
+
|
|
241
317
|
# The result output from a [FunctionCall] that contains a string representing
|
|
242
318
|
# the [FunctionDeclaration.name] and a structured JSON object containing any
|
|
243
319
|
# output from the function is used as context to the model. This should contain
|
|
@@ -252,6 +328,10 @@ module Google
|
|
|
252
328
|
# Use "output" key to specify function output and "error" key to specify
|
|
253
329
|
# error details (if any). If "output" and "error" keys are not specified,
|
|
254
330
|
# then whole "response" is treated as function output.
|
|
331
|
+
# @!attribute [rw] parts
|
|
332
|
+
# @return [::Array<::Google::Cloud::AIPlatform::V1::FunctionResponsePart>]
|
|
333
|
+
# Optional. Ordered `Parts` that constitute a function response. Parts may
|
|
334
|
+
# have different IANA MIME types.
|
|
255
335
|
class FunctionResponse
|
|
256
336
|
include ::Google::Protobuf::MessageExts
|
|
257
337
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -26,6 +26,13 @@ module Google
|
|
|
26
26
|
# @return [::String]
|
|
27
27
|
# The base model that is being tuned. See [Supported
|
|
28
28
|
# models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).
|
|
29
|
+
#
|
|
30
|
+
# Note: The following fields are mutually exclusive: `base_model`, `pre_tuned_model`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
31
|
+
# @!attribute [rw] pre_tuned_model
|
|
32
|
+
# @return [::Google::Cloud::AIPlatform::V1::PreTunedModel]
|
|
33
|
+
# The pre-tuned model for continuous tuning.
|
|
34
|
+
#
|
|
35
|
+
# Note: The following fields are mutually exclusive: `pre_tuned_model`, `base_model`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
29
36
|
# @!attribute [rw] supervised_tuning_spec
|
|
30
37
|
# @return [::Google::Cloud::AIPlatform::V1::SupervisedTuningSpec]
|
|
31
38
|
# Tuning Spec for Supervised Fine Tuning.
|
|
@@ -37,7 +44,10 @@ module Google
|
|
|
37
44
|
# @return [::String]
|
|
38
45
|
# Optional. The display name of the
|
|
39
46
|
# {::Google::Cloud::AIPlatform::V1::Model TunedModel}. The name can be up to 128
|
|
40
|
-
# characters long and can consist of any UTF-8 characters.
|
|
47
|
+
# characters long and can consist of any UTF-8 characters. For continuous
|
|
48
|
+
# tuning, tuned_model_display_name will by default use the same display name
|
|
49
|
+
# as the pre-tuned model. If a new display name is provided, the tuning job
|
|
50
|
+
# will create a new model instead of a new version.
|
|
41
51
|
# @!attribute [rw] description
|
|
42
52
|
# @return [::String]
|
|
43
53
|
# Optional. The description of the
|
|
@@ -125,7 +135,18 @@ module Google
|
|
|
125
135
|
# @!attribute [r] model
|
|
126
136
|
# @return [::String]
|
|
127
137
|
# Output only. The resource name of the TunedModel. Format:
|
|
128
|
-
#
|
|
138
|
+
#
|
|
139
|
+
# `projects/{project}/locations/{location}/models/{model}@{version_id}`
|
|
140
|
+
#
|
|
141
|
+
# When tuning from a base model, the version ID will be 1.
|
|
142
|
+
#
|
|
143
|
+
# For continuous tuning, if the provided tuned_model_display_name is set and
|
|
144
|
+
# different from parent model's display name, the tuned model will have a new
|
|
145
|
+
# parent model with version 1. Otherwise the version id will be incremented
|
|
146
|
+
# by 1 from the last version ID in the parent model. E.g.,
|
|
147
|
+
#
|
|
148
|
+
# `projects/{project}/locations/{location}/models/{model}@{last_version_id +
|
|
149
|
+
# 1}`
|
|
129
150
|
# @!attribute [r] endpoint
|
|
130
151
|
# @return [::String]
|
|
131
152
|
# Output only. A resource name of an Endpoint. Format:
|
|
@@ -349,6 +370,32 @@ module Google
|
|
|
349
370
|
include ::Google::Protobuf::MessageExts
|
|
350
371
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
351
372
|
end
|
|
373
|
+
|
|
374
|
+
# A pre-tuned model for continuous tuning.
|
|
375
|
+
# @!attribute [rw] tuned_model_name
|
|
376
|
+
# @return [::String]
|
|
377
|
+
# The resource name of the Model.
|
|
378
|
+
# E.g., a model resource name with a specified version id or alias:
|
|
379
|
+
#
|
|
380
|
+
# `projects/{project}/locations/{location}/models/{model}@{version_id}`
|
|
381
|
+
#
|
|
382
|
+
# `projects/{project}/locations/{location}/models/{model}@{alias}`
|
|
383
|
+
#
|
|
384
|
+
# Or, omit the version id to use the default version:
|
|
385
|
+
#
|
|
386
|
+
# `projects/{project}/locations/{location}/models/{model}`
|
|
387
|
+
# @!attribute [rw] checkpoint_id
|
|
388
|
+
# @return [::String]
|
|
389
|
+
# Optional. The source checkpoint id. If not specified, the default
|
|
390
|
+
# checkpoint will be used.
|
|
391
|
+
# @!attribute [r] base_model
|
|
392
|
+
# @return [::String]
|
|
393
|
+
# Output only. The name of the base model this
|
|
394
|
+
# {::Google::Cloud::AIPlatform::V1::PreTunedModel PreTunedModel} was tuned from.
|
|
395
|
+
class PreTunedModel
|
|
396
|
+
include ::Google::Protobuf::MessageExts
|
|
397
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
398
|
+
end
|
|
352
399
|
end
|
|
353
400
|
end
|
|
354
401
|
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2025 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
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module AIPlatform
|
|
23
|
+
module V1
|
|
24
|
+
# Usage metadata about the content generation request and response.
|
|
25
|
+
# This message provides a detailed breakdown of token usage and other
|
|
26
|
+
# relevant metrics.
|
|
27
|
+
# @!attribute [rw] prompt_token_count
|
|
28
|
+
# @return [::Integer]
|
|
29
|
+
# The total number of tokens in the prompt. This includes any text, images,
|
|
30
|
+
# or other media provided in the request. When `cached_content` is set,
|
|
31
|
+
# this also includes the number of tokens in the cached content.
|
|
32
|
+
# @!attribute [rw] candidates_token_count
|
|
33
|
+
# @return [::Integer]
|
|
34
|
+
# The total number of tokens in the generated candidates.
|
|
35
|
+
# @!attribute [rw] total_token_count
|
|
36
|
+
# @return [::Integer]
|
|
37
|
+
# The total number of tokens for the entire request. This is the sum of
|
|
38
|
+
# `prompt_token_count`, `candidates_token_count`,
|
|
39
|
+
# `tool_use_prompt_token_count`, and `thoughts_token_count`.
|
|
40
|
+
# @!attribute [r] tool_use_prompt_token_count
|
|
41
|
+
# @return [::Integer]
|
|
42
|
+
# Output only. The number of tokens in the results from tool executions,
|
|
43
|
+
# which are provided back to the model as input, if applicable.
|
|
44
|
+
# @!attribute [r] thoughts_token_count
|
|
45
|
+
# @return [::Integer]
|
|
46
|
+
# Output only. The number of tokens that were part of the model's generated
|
|
47
|
+
# "thoughts" output, if applicable.
|
|
48
|
+
# @!attribute [r] cached_content_token_count
|
|
49
|
+
# @return [::Integer]
|
|
50
|
+
# Output only. The number of tokens in the cached content that was used for
|
|
51
|
+
# this request.
|
|
52
|
+
# @!attribute [r] prompt_tokens_details
|
|
53
|
+
# @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>]
|
|
54
|
+
# Output only. A detailed breakdown of the token count for each modality in
|
|
55
|
+
# the prompt.
|
|
56
|
+
# @!attribute [r] cache_tokens_details
|
|
57
|
+
# @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>]
|
|
58
|
+
# Output only. A detailed breakdown of the token count for each modality in
|
|
59
|
+
# the cached content.
|
|
60
|
+
# @!attribute [r] candidates_tokens_details
|
|
61
|
+
# @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>]
|
|
62
|
+
# Output only. A detailed breakdown of the token count for each modality in
|
|
63
|
+
# the generated candidates.
|
|
64
|
+
# @!attribute [r] tool_use_prompt_tokens_details
|
|
65
|
+
# @return [::Array<::Google::Cloud::AIPlatform::V1::ModalityTokenCount>]
|
|
66
|
+
# Output only. A detailed breakdown by modality of the token counts from the
|
|
67
|
+
# results of tool executions, which are provided back to the model as input.
|
|
68
|
+
# @!attribute [r] traffic_type
|
|
69
|
+
# @return [::Google::Cloud::AIPlatform::V1::UsageMetadata::TrafficType]
|
|
70
|
+
# Output only. The traffic type for this request.
|
|
71
|
+
class UsageMetadata
|
|
72
|
+
include ::Google::Protobuf::MessageExts
|
|
73
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
74
|
+
|
|
75
|
+
# The type of traffic that this request was processed with, indicating which
|
|
76
|
+
# quota gets consumed.
|
|
77
|
+
module TrafficType
|
|
78
|
+
# Unspecified request traffic type.
|
|
79
|
+
TRAFFIC_TYPE_UNSPECIFIED = 0
|
|
80
|
+
|
|
81
|
+
# Type for Pay-As-You-Go traffic.
|
|
82
|
+
ON_DEMAND = 1
|
|
83
|
+
|
|
84
|
+
# Type for Provisioned Throughput traffic.
|
|
85
|
+
PROVISIONED_THROUGHPUT = 2
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-ai_platform-v1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.30.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -506,6 +506,7 @@ files:
|
|
|
506
506
|
- lib/google/cloud/aiplatform/v1/tuning_job_pb.rb
|
|
507
507
|
- lib/google/cloud/aiplatform/v1/types_pb.rb
|
|
508
508
|
- lib/google/cloud/aiplatform/v1/unmanaged_container_model_pb.rb
|
|
509
|
+
- lib/google/cloud/aiplatform/v1/usage_metadata_pb.rb
|
|
509
510
|
- lib/google/cloud/aiplatform/v1/user_action_reference_pb.rb
|
|
510
511
|
- lib/google/cloud/aiplatform/v1/value_pb.rb
|
|
511
512
|
- lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb
|
|
@@ -672,6 +673,7 @@ files:
|
|
|
672
673
|
- proto_docs/google/cloud/aiplatform/v1/tuning_job.rb
|
|
673
674
|
- proto_docs/google/cloud/aiplatform/v1/types.rb
|
|
674
675
|
- proto_docs/google/cloud/aiplatform/v1/unmanaged_container_model.rb
|
|
676
|
+
- proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb
|
|
675
677
|
- proto_docs/google/cloud/aiplatform/v1/user_action_reference.rb
|
|
676
678
|
- proto_docs/google/cloud/aiplatform/v1/value.rb
|
|
677
679
|
- proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb
|