google-apis-aiplatform_v1 0.69.0 → 0.71.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.
@@ -7448,6 +7448,107 @@ module Google
7448
7448
  end
7449
7449
  end
7450
7450
 
7451
+ # Request message for PredictionService.EmbedContent.
7452
+ class GoogleCloudAiplatformV1EmbedContentRequest
7453
+ include Google::Apis::Core::Hashable
7454
+
7455
+ # Optional. Whether to silently truncate the input content if it's longer than
7456
+ # the maximum sequence length.
7457
+ # Corresponds to the JSON property `autoTruncate`
7458
+ # @return [Boolean]
7459
+ attr_accessor :auto_truncate
7460
+ alias_method :auto_truncate?, :auto_truncate
7461
+
7462
+ # The base structured datatype containing multi-part content of a message. A `
7463
+ # Content` includes a `role` field designating the producer of the `Content` and
7464
+ # a `parts` field containing multi-part data that contains the content of the
7465
+ # message turn.
7466
+ # Corresponds to the JSON property `content`
7467
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content]
7468
+ attr_accessor :content
7469
+
7470
+ # Optional. Optional reduced dimension for the output embedding. If set,
7471
+ # excessive values in the output embedding are truncated from the end.
7472
+ # Corresponds to the JSON property `outputDimensionality`
7473
+ # @return [Fixnum]
7474
+ attr_accessor :output_dimensionality
7475
+
7476
+ # Optional. The task type of the embedding.
7477
+ # Corresponds to the JSON property `taskType`
7478
+ # @return [String]
7479
+ attr_accessor :task_type
7480
+
7481
+ # Optional. An optional title for the text.
7482
+ # Corresponds to the JSON property `title`
7483
+ # @return [String]
7484
+ attr_accessor :title
7485
+
7486
+ def initialize(**args)
7487
+ update!(**args)
7488
+ end
7489
+
7490
+ # Update properties of this object
7491
+ def update!(**args)
7492
+ @auto_truncate = args[:auto_truncate] if args.key?(:auto_truncate)
7493
+ @content = args[:content] if args.key?(:content)
7494
+ @output_dimensionality = args[:output_dimensionality] if args.key?(:output_dimensionality)
7495
+ @task_type = args[:task_type] if args.key?(:task_type)
7496
+ @title = args[:title] if args.key?(:title)
7497
+ end
7498
+ end
7499
+
7500
+ # Response message for PredictionService.EmbedContent.
7501
+ class GoogleCloudAiplatformV1EmbedContentResponse
7502
+ include Google::Apis::Core::Hashable
7503
+
7504
+ # A list of floats representing an embedding.
7505
+ # Corresponds to the JSON property `embedding`
7506
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EmbedContentResponseEmbedding]
7507
+ attr_accessor :embedding
7508
+
7509
+ # Whether the input content was truncated before generating the embedding.
7510
+ # Corresponds to the JSON property `truncated`
7511
+ # @return [Boolean]
7512
+ attr_accessor :truncated
7513
+ alias_method :truncated?, :truncated
7514
+
7515
+ # Usage metadata about the content generation request and response. This message
7516
+ # provides a detailed breakdown of token usage and other relevant metrics.
7517
+ # Corresponds to the JSON property `usageMetadata`
7518
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1UsageMetadata]
7519
+ attr_accessor :usage_metadata
7520
+
7521
+ def initialize(**args)
7522
+ update!(**args)
7523
+ end
7524
+
7525
+ # Update properties of this object
7526
+ def update!(**args)
7527
+ @embedding = args[:embedding] if args.key?(:embedding)
7528
+ @truncated = args[:truncated] if args.key?(:truncated)
7529
+ @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
7530
+ end
7531
+ end
7532
+
7533
+ # A list of floats representing an embedding.
7534
+ class GoogleCloudAiplatformV1EmbedContentResponseEmbedding
7535
+ include Google::Apis::Core::Hashable
7536
+
7537
+ # Embedding vector values.
7538
+ # Corresponds to the JSON property `values`
7539
+ # @return [Array<Float>]
7540
+ attr_accessor :values
7541
+
7542
+ def initialize(**args)
7543
+ update!(**args)
7544
+ end
7545
+
7546
+ # Update properties of this object
7547
+ def update!(**args)
7548
+ @values = args[:values] if args.key?(:values)
7549
+ end
7550
+ end
7551
+
7451
7552
  # Represents a customer-managed encryption key spec that can be applied to a top-
7452
7553
  # level resource.
7453
7554
  class GoogleCloudAiplatformV1EncryptionSpec
@@ -8511,6 +8612,11 @@ module Google
8511
8612
  class GoogleCloudAiplatformV1EvaluationInstance
8512
8613
  include Google::Apis::Core::Hashable
8513
8614
 
8615
+ # Contains data specific to agent evaluations.
8616
+ # Corresponds to the JSON property `agentData`
8617
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceAgentData]
8618
+ attr_accessor :agent_data
8619
+
8514
8620
  # Instance data specified as a map.
8515
8621
  # Corresponds to the JSON property `otherData`
8516
8622
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceMapInstance]
@@ -8544,6 +8650,7 @@ module Google
8544
8650
 
8545
8651
  # Update properties of this object
8546
8652
  def update!(**args)
8653
+ @agent_data = args[:agent_data] if args.key?(:agent_data)
8547
8654
  @other_data = args[:other_data] if args.key?(:other_data)
8548
8655
  @prompt = args[:prompt] if args.key?(:prompt)
8549
8656
  @reference = args[:reference] if args.key?(:reference)
@@ -8552,6 +8659,150 @@ module Google
8552
8659
  end
8553
8660
  end
8554
8661
 
8662
+ # Configuration for an Agent.
8663
+ class GoogleCloudAiplatformV1EvaluationInstanceAgentConfig
8664
+ include Google::Apis::Core::Hashable
8665
+
8666
+ # Instance data used to populate placeholders in a metric prompt template.
8667
+ # Corresponds to the JSON property `developerInstruction`
8668
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceData]
8669
+ attr_accessor :developer_instruction
8670
+
8671
+ # Represents a list of tools for an agent.
8672
+ # Corresponds to the JSON property `tools`
8673
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceAgentConfigTools]
8674
+ attr_accessor :tools
8675
+
8676
+ # A JSON string containing a list of tools available to an agent with info such
8677
+ # as name, description, parameters and required parameters.
8678
+ # Corresponds to the JSON property `toolsText`
8679
+ # @return [String]
8680
+ attr_accessor :tools_text
8681
+
8682
+ def initialize(**args)
8683
+ update!(**args)
8684
+ end
8685
+
8686
+ # Update properties of this object
8687
+ def update!(**args)
8688
+ @developer_instruction = args[:developer_instruction] if args.key?(:developer_instruction)
8689
+ @tools = args[:tools] if args.key?(:tools)
8690
+ @tools_text = args[:tools_text] if args.key?(:tools_text)
8691
+ end
8692
+ end
8693
+
8694
+ # Represents a list of tools for an agent.
8695
+ class GoogleCloudAiplatformV1EvaluationInstanceAgentConfigTools
8696
+ include Google::Apis::Core::Hashable
8697
+
8698
+ # Optional. List of tools: each tool can have multiple function declarations.
8699
+ # Corresponds to the JSON property `tool`
8700
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool>]
8701
+ attr_accessor :tool
8702
+
8703
+ def initialize(**args)
8704
+ update!(**args)
8705
+ end
8706
+
8707
+ # Update properties of this object
8708
+ def update!(**args)
8709
+ @tool = args[:tool] if args.key?(:tool)
8710
+ end
8711
+ end
8712
+
8713
+ # Contains data specific to agent evaluations.
8714
+ class GoogleCloudAiplatformV1EvaluationInstanceAgentData
8715
+ include Google::Apis::Core::Hashable
8716
+
8717
+ # Configuration for an Agent.
8718
+ # Corresponds to the JSON property `agentConfig`
8719
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceAgentConfig]
8720
+ attr_accessor :agent_config
8721
+
8722
+ # Instance data used to populate placeholders in a metric prompt template.
8723
+ # Corresponds to the JSON property `developerInstruction`
8724
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceInstanceData]
8725
+ attr_accessor :developer_instruction
8726
+
8727
+ # Represents a list of events for an agent.
8728
+ # Corresponds to the JSON property `events`
8729
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceAgentDataEvents]
8730
+ attr_accessor :events
8731
+
8732
+ # A JSON string containing a sequence of events.
8733
+ # Corresponds to the JSON property `eventsText`
8734
+ # @return [String]
8735
+ attr_accessor :events_text
8736
+
8737
+ # Represents a list of tools for an agent.
8738
+ # Corresponds to the JSON property `tools`
8739
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceAgentDataTools]
8740
+ attr_accessor :tools
8741
+
8742
+ # A JSON string containing a list of tools available to an agent with info such
8743
+ # as name, description, parameters and required parameters. Example: [ ` "name":
8744
+ # "search_actors", "description": "Search for actors in a movie. Returns a list
8745
+ # of actors, their roles, their birthdate, and their place of birth.", "
8746
+ # parameters": [ ` "name": "movie_name", "description": "The name of the movie."
8747
+ # `, ` "name": "character_name", "description": "The name of the character." ` ],
8748
+ # "required": ["movie_name", "character_name"] ` ]
8749
+ # Corresponds to the JSON property `toolsText`
8750
+ # @return [String]
8751
+ attr_accessor :tools_text
8752
+
8753
+ def initialize(**args)
8754
+ update!(**args)
8755
+ end
8756
+
8757
+ # Update properties of this object
8758
+ def update!(**args)
8759
+ @agent_config = args[:agent_config] if args.key?(:agent_config)
8760
+ @developer_instruction = args[:developer_instruction] if args.key?(:developer_instruction)
8761
+ @events = args[:events] if args.key?(:events)
8762
+ @events_text = args[:events_text] if args.key?(:events_text)
8763
+ @tools = args[:tools] if args.key?(:tools)
8764
+ @tools_text = args[:tools_text] if args.key?(:tools_text)
8765
+ end
8766
+ end
8767
+
8768
+ # Represents a list of events for an agent.
8769
+ class GoogleCloudAiplatformV1EvaluationInstanceAgentDataEvents
8770
+ include Google::Apis::Core::Hashable
8771
+
8772
+ # Optional. A list of events.
8773
+ # Corresponds to the JSON property `event`
8774
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
8775
+ attr_accessor :event
8776
+
8777
+ def initialize(**args)
8778
+ update!(**args)
8779
+ end
8780
+
8781
+ # Update properties of this object
8782
+ def update!(**args)
8783
+ @event = args[:event] if args.key?(:event)
8784
+ end
8785
+ end
8786
+
8787
+ # Represents a list of tools for an agent.
8788
+ class GoogleCloudAiplatformV1EvaluationInstanceAgentDataTools
8789
+ include Google::Apis::Core::Hashable
8790
+
8791
+ # Optional. List of tools: each tool can have multiple function declarations.
8792
+ # Corresponds to the JSON property `tool`
8793
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool>]
8794
+ attr_accessor :tool
8795
+
8796
+ def initialize(**args)
8797
+ update!(**args)
8798
+ end
8799
+
8800
+ # Update properties of this object
8801
+ def update!(**args)
8802
+ @tool = args[:tool] if args.key?(:tool)
8803
+ end
8804
+ end
8805
+
8555
8806
  # Instance data used to populate placeholders in a metric prompt template.
8556
8807
  class GoogleCloudAiplatformV1EvaluationInstanceInstanceData
8557
8808
  include Google::Apis::Core::Hashable
@@ -9207,6 +9458,11 @@ module Google
9207
9458
  # @return [String]
9208
9459
  attr_accessor :metric
9209
9460
 
9461
+ # The metric used for running evaluations.
9462
+ # Corresponds to the JSON property `metricConfig`
9463
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric]
9464
+ attr_accessor :metric_config
9465
+
9210
9466
  # Specification for a pre-defined metric.
9211
9467
  # Corresponds to the JSON property `predefinedMetricSpec`
9212
9468
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationRunMetricPredefinedMetricSpec]
@@ -9225,6 +9481,7 @@ module Google
9225
9481
  def update!(**args)
9226
9482
  @llm_based_metric_spec = args[:llm_based_metric_spec] if args.key?(:llm_based_metric_spec)
9227
9483
  @metric = args[:metric] if args.key?(:metric)
9484
+ @metric_config = args[:metric_config] if args.key?(:metric_config)
9228
9485
  @predefined_metric_spec = args[:predefined_metric_spec] if args.key?(:predefined_metric_spec)
9229
9486
  @rubric_based_metric_spec = args[:rubric_based_metric_spec] if args.key?(:rubric_based_metric_spec)
9230
9487
  end
@@ -13877,6 +14134,12 @@ module Google
13877
14134
  # @return [String]
13878
14135
  attr_accessor :name
13879
14136
 
14137
+ # Optional. Ordered `Parts` that constitute a function response. Parts may have
14138
+ # different IANA MIME types.
14139
+ # Corresponds to the JSON property `parts`
14140
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionResponsePart>]
14141
+ attr_accessor :parts
14142
+
13880
14143
  # Required. The function response in JSON object format. Use "output" key to
13881
14144
  # specify function output and "error" key to specify error details (if any). If "
13882
14145
  # output" and "error" keys are not specified, then whole "response" is treated
@@ -13892,10 +14155,113 @@ module Google
13892
14155
  # Update properties of this object
13893
14156
  def update!(**args)
13894
14157
  @name = args[:name] if args.key?(:name)
14158
+ @parts = args[:parts] if args.key?(:parts)
13895
14159
  @response = args[:response] if args.key?(:response)
13896
14160
  end
13897
14161
  end
13898
14162
 
14163
+ # Raw media bytes for function response. Text should not be sent as raw bytes,
14164
+ # use the 'text' field.
14165
+ class GoogleCloudAiplatformV1FunctionResponseBlob
14166
+ include Google::Apis::Core::Hashable
14167
+
14168
+ # Required. Raw bytes.
14169
+ # Corresponds to the JSON property `data`
14170
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
14171
+ # @return [String]
14172
+ attr_accessor :data
14173
+
14174
+ # Optional. Display name of the blob. Used to provide a label or filename to
14175
+ # distinguish blobs. This field is only returned in PromptMessage for prompt
14176
+ # management. It is currently used in the Gemini GenerateContent calls only when
14177
+ # server side tools (code_execution, google_search, and url_context) are enabled.
14178
+ # Corresponds to the JSON property `displayName`
14179
+ # @return [String]
14180
+ attr_accessor :display_name
14181
+
14182
+ # Required. The IANA standard MIME type of the source data.
14183
+ # Corresponds to the JSON property `mimeType`
14184
+ # @return [String]
14185
+ attr_accessor :mime_type
14186
+
14187
+ def initialize(**args)
14188
+ update!(**args)
14189
+ end
14190
+
14191
+ # Update properties of this object
14192
+ def update!(**args)
14193
+ @data = args[:data] if args.key?(:data)
14194
+ @display_name = args[:display_name] if args.key?(:display_name)
14195
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
14196
+ end
14197
+ end
14198
+
14199
+ # URI based data for function response.
14200
+ class GoogleCloudAiplatformV1FunctionResponseFileData
14201
+ include Google::Apis::Core::Hashable
14202
+
14203
+ # Optional. Display name of the file data. Used to provide a label or filename
14204
+ # to distinguish file datas. This field is only returned in PromptMessage for
14205
+ # prompt management. It is currently used in the Gemini GenerateContent calls
14206
+ # only when server side tools (code_execution, google_search, and url_context)
14207
+ # are enabled.
14208
+ # Corresponds to the JSON property `displayName`
14209
+ # @return [String]
14210
+ attr_accessor :display_name
14211
+
14212
+ # Required. URI.
14213
+ # Corresponds to the JSON property `fileUri`
14214
+ # @return [String]
14215
+ attr_accessor :file_uri
14216
+
14217
+ # Required. The IANA standard MIME type of the source data.
14218
+ # Corresponds to the JSON property `mimeType`
14219
+ # @return [String]
14220
+ attr_accessor :mime_type
14221
+
14222
+ def initialize(**args)
14223
+ update!(**args)
14224
+ end
14225
+
14226
+ # Update properties of this object
14227
+ def update!(**args)
14228
+ @display_name = args[:display_name] if args.key?(:display_name)
14229
+ @file_uri = args[:file_uri] if args.key?(:file_uri)
14230
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
14231
+ end
14232
+ end
14233
+
14234
+ # A datatype containing media that is part of a `FunctionResponse` message. A `
14235
+ # FunctionResponsePart` consists of data which has an associated datatype. A `
14236
+ # FunctionResponsePart` can only contain one of the accepted types in `
14237
+ # FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA
14238
+ # MIME type identifying the type and subtype of the media if the `inline_data`
14239
+ # field is filled with raw bytes.
14240
+ class GoogleCloudAiplatformV1FunctionResponsePart
14241
+ include Google::Apis::Core::Hashable
14242
+
14243
+ # URI based data for function response.
14244
+ # Corresponds to the JSON property `fileData`
14245
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionResponseFileData]
14246
+ attr_accessor :file_data
14247
+
14248
+ # Raw media bytes for function response. Text should not be sent as raw bytes,
14249
+ # use the 'text' field.
14250
+ # Corresponds to the JSON property `inlineData`
14251
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionResponseBlob]
14252
+ attr_accessor :inline_data
14253
+
14254
+ def initialize(**args)
14255
+ update!(**args)
14256
+ end
14257
+
14258
+ # Update properties of this object
14259
+ def update!(**args)
14260
+ @file_data = args[:file_data] if args.key?(:file_data)
14261
+ @inline_data = args[:inline_data] if args.key?(:inline_data)
14262
+ end
14263
+ end
14264
+
13899
14265
  # The Google Cloud Storage location where the output is to be written to.
13900
14266
  class GoogleCloudAiplatformV1GcsDestination
13901
14267
  include Google::Apis::Core::Hashable
@@ -14303,6 +14669,11 @@ module Google
14303
14669
  class GoogleCloudAiplatformV1GenerateInstanceRubricsRequest
14304
14670
  include Google::Apis::Core::Hashable
14305
14671
 
14672
+ # Configuration for an Agent.
14673
+ # Corresponds to the JSON property `agentConfig`
14674
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1EvaluationInstanceAgentConfig]
14675
+ attr_accessor :agent_config
14676
+
14306
14677
  # Required. The prompt to generate rubrics from. For single-turn queries, this
14307
14678
  # is a single instance. For multi-turn queries, this is a repeated field that
14308
14679
  # contains conversation history + latest request.
@@ -14326,6 +14697,7 @@ module Google
14326
14697
 
14327
14698
  # Update properties of this object
14328
14699
  def update!(**args)
14700
+ @agent_config = args[:agent_config] if args.key?(:agent_config)
14329
14701
  @contents = args[:contents] if args.key?(:contents)
14330
14702
  @predefined_rubric_generation_spec = args[:predefined_rubric_generation_spec] if args.key?(:predefined_rubric_generation_spec)
14331
14703
  @rubric_generation_spec = args[:rubric_generation_spec] if args.key?(:rubric_generation_spec)
@@ -15472,6 +15844,16 @@ module Google
15472
15844
  # @return [String]
15473
15845
  attr_accessor :aspect_ratio
15474
15846
 
15847
+ # The image output format for generated images.
15848
+ # Corresponds to the JSON property `imageOutputOptions`
15849
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ImageConfigImageOutputOptions]
15850
+ attr_accessor :image_output_options
15851
+
15852
+ # Optional. Controls whether the model can generate people.
15853
+ # Corresponds to the JSON property `personGeneration`
15854
+ # @return [String]
15855
+ attr_accessor :person_generation
15856
+
15475
15857
  def initialize(**args)
15476
15858
  update!(**args)
15477
15859
  end
@@ -15479,6 +15861,33 @@ module Google
15479
15861
  # Update properties of this object
15480
15862
  def update!(**args)
15481
15863
  @aspect_ratio = args[:aspect_ratio] if args.key?(:aspect_ratio)
15864
+ @image_output_options = args[:image_output_options] if args.key?(:image_output_options)
15865
+ @person_generation = args[:person_generation] if args.key?(:person_generation)
15866
+ end
15867
+ end
15868
+
15869
+ # The image output format for generated images.
15870
+ class GoogleCloudAiplatformV1ImageConfigImageOutputOptions
15871
+ include Google::Apis::Core::Hashable
15872
+
15873
+ # Optional. The compression quality of the output image.
15874
+ # Corresponds to the JSON property `compressionQuality`
15875
+ # @return [Fixnum]
15876
+ attr_accessor :compression_quality
15877
+
15878
+ # Optional. The image format that the output should be saved as.
15879
+ # Corresponds to the JSON property `mimeType`
15880
+ # @return [String]
15881
+ attr_accessor :mime_type
15882
+
15883
+ def initialize(**args)
15884
+ update!(**args)
15885
+ end
15886
+
15887
+ # Update properties of this object
15888
+ def update!(**args)
15889
+ @compression_quality = args[:compression_quality] if args.key?(:compression_quality)
15890
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
15482
15891
  end
15483
15892
  end
15484
15893
 
@@ -24753,6 +25162,12 @@ module Google
24753
25162
  # @return [Array<Object>]
24754
25163
  attr_accessor :instances
24755
25164
 
25165
+ # Optional. The user labels for Imagen billing usage only. Only Imagen supports
25166
+ # labels. For other use cases, it will be ignored.
25167
+ # Corresponds to the JSON property `labels`
25168
+ # @return [Hash<String,String>]
25169
+ attr_accessor :labels
25170
+
24756
25171
  # The parameters that govern the prediction. The schema of the parameters may be
24757
25172
  # specified via Endpoint's DeployedModels' Model's PredictSchemata's
24758
25173
  # parameters_schema_uri.
@@ -24767,6 +25182,7 @@ module Google
24767
25182
  # Update properties of this object
24768
25183
  def update!(**args)
24769
25184
  @instances = args[:instances] if args.key?(:instances)
25185
+ @labels = args[:labels] if args.key?(:labels)
24770
25186
  @parameters = args[:parameters] if args.key?(:parameters)
24771
25187
  end
24772
25188
  end
@@ -28181,6 +28597,11 @@ module Google
28181
28597
  # @return [String]
28182
28598
  attr_accessor :service_account
28183
28599
 
28600
+ # Specification for deploying from source code.
28601
+ # Corresponds to the JSON property `sourceCodeSpec`
28602
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ReasoningEngineSpecSourceCodeSpec]
28603
+ attr_accessor :source_code_spec
28604
+
28184
28605
  def initialize(**args)
28185
28606
  update!(**args)
28186
28607
  end
@@ -28192,6 +28613,7 @@ module Google
28192
28613
  @deployment_spec = args[:deployment_spec] if args.key?(:deployment_spec)
28193
28614
  @package_spec = args[:package_spec] if args.key?(:package_spec)
28194
28615
  @service_account = args[:service_account] if args.key?(:service_account)
28616
+ @source_code_spec = args[:source_code_spec] if args.key?(:source_code_spec)
28195
28617
  end
28196
28618
  end
28197
28619
 
@@ -28303,6 +28725,95 @@ module Google
28303
28725
  end
28304
28726
  end
28305
28727
 
28728
+ # Specification for deploying from source code.
28729
+ class GoogleCloudAiplatformV1ReasoningEngineSpecSourceCodeSpec
28730
+ include Google::Apis::Core::Hashable
28731
+
28732
+ # Specifies source code provided as a byte stream.
28733
+ # Corresponds to the JSON property `inlineSource`
28734
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ReasoningEngineSpecSourceCodeSpecInlineSource]
28735
+ attr_accessor :inline_source
28736
+
28737
+ # Specification for running a Python application from source.
28738
+ # Corresponds to the JSON property `pythonSpec`
28739
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ReasoningEngineSpecSourceCodeSpecPythonSpec]
28740
+ attr_accessor :python_spec
28741
+
28742
+ def initialize(**args)
28743
+ update!(**args)
28744
+ end
28745
+
28746
+ # Update properties of this object
28747
+ def update!(**args)
28748
+ @inline_source = args[:inline_source] if args.key?(:inline_source)
28749
+ @python_spec = args[:python_spec] if args.key?(:python_spec)
28750
+ end
28751
+ end
28752
+
28753
+ # Specifies source code provided as a byte stream.
28754
+ class GoogleCloudAiplatformV1ReasoningEngineSpecSourceCodeSpecInlineSource
28755
+ include Google::Apis::Core::Hashable
28756
+
28757
+ # Required. Input only. The application source code archive, provided as a
28758
+ # compressed tarball (.tar.gz) file.
28759
+ # Corresponds to the JSON property `sourceArchive`
28760
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
28761
+ # @return [String]
28762
+ attr_accessor :source_archive
28763
+
28764
+ def initialize(**args)
28765
+ update!(**args)
28766
+ end
28767
+
28768
+ # Update properties of this object
28769
+ def update!(**args)
28770
+ @source_archive = args[:source_archive] if args.key?(:source_archive)
28771
+ end
28772
+ end
28773
+
28774
+ # Specification for running a Python application from source.
28775
+ class GoogleCloudAiplatformV1ReasoningEngineSpecSourceCodeSpecPythonSpec
28776
+ include Google::Apis::Core::Hashable
28777
+
28778
+ # Optional. The Python module to load as the entrypoint, specified as a fully
28779
+ # qualified module name. For example: path.to.agent. If not specified, defaults
28780
+ # to "agent". The project root will be added to Python sys.path, allowing
28781
+ # imports to be specified relative to the root.
28782
+ # Corresponds to the JSON property `entrypointModule`
28783
+ # @return [String]
28784
+ attr_accessor :entrypoint_module
28785
+
28786
+ # Optional. The name of the callable object within the `entrypoint_module` to
28787
+ # use as the application If not specified, defaults to "root_agent".
28788
+ # Corresponds to the JSON property `entrypointObject`
28789
+ # @return [String]
28790
+ attr_accessor :entrypoint_object
28791
+
28792
+ # Optional. The path to the requirements file, relative to the source root. If
28793
+ # not specified, defaults to "requirements.txt".
28794
+ # Corresponds to the JSON property `requirementsFile`
28795
+ # @return [String]
28796
+ attr_accessor :requirements_file
28797
+
28798
+ # Optional. The version of Python to use. Support version includes 3.9, 3.10, 3.
28799
+ # 11, 3.12, 3.13. If not specified, default value is 3.10.
28800
+ # Corresponds to the JSON property `version`
28801
+ # @return [String]
28802
+ attr_accessor :version
28803
+
28804
+ def initialize(**args)
28805
+ update!(**args)
28806
+ end
28807
+
28808
+ # Update properties of this object
28809
+ def update!(**args)
28810
+ @entrypoint_module = args[:entrypoint_module] if args.key?(:entrypoint_module)
28811
+ @entrypoint_object = args[:entrypoint_object] if args.key?(:entrypoint_object)
28812
+ @requirements_file = args[:requirements_file] if args.key?(:requirements_file)
28813
+ @version = args[:version] if args.key?(:version)
28814
+ end
28815
+ end
28816
+
28306
28817
  # Request message for GenAiTuningService.RebaseTunedModel.
28307
28818
  class GoogleCloudAiplatformV1RebaseTunedModelRequest
28308
28819
  include Google::Apis::Core::Hashable
@@ -40257,6 +40768,11 @@ module Google
40257
40768
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolCodeExecution]
40258
40769
  attr_accessor :code_execution
40259
40770
 
40771
+ # Tool to support computer use.
40772
+ # Corresponds to the JSON property `computerUse`
40773
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolComputerUse]
40774
+ attr_accessor :computer_use
40775
+
40260
40776
  # Tool to search public web data, powered by Vertex AI Search and Sec4
40261
40777
  # compliance.
40262
40778
  # Corresponds to the JSON property `enterpriseWebSearch`
@@ -40306,6 +40822,7 @@ module Google
40306
40822
  # Update properties of this object
40307
40823
  def update!(**args)
40308
40824
  @code_execution = args[:code_execution] if args.key?(:code_execution)
40825
+ @computer_use = args[:computer_use] if args.key?(:computer_use)
40309
40826
  @enterprise_web_search = args[:enterprise_web_search] if args.key?(:enterprise_web_search)
40310
40827
  @function_declarations = args[:function_declarations] if args.key?(:function_declarations)
40311
40828
  @google_maps = args[:google_maps] if args.key?(:google_maps)
@@ -40457,6 +40974,36 @@ module Google
40457
40974
  end
40458
40975
  end
40459
40976
 
40977
+ # Tool to support computer use.
40978
+ class GoogleCloudAiplatformV1ToolComputerUse
40979
+ include Google::Apis::Core::Hashable
40980
+
40981
+ # Required. The environment being operated.
40982
+ # Corresponds to the JSON property `environment`
40983
+ # @return [String]
40984
+ attr_accessor :environment
40985
+
40986
+ # Optional. By default, [predefined functions](https://cloud.google.com/vertex-
40987
+ # ai/generative-ai/docs/computer-use#supported-actions) are included in the
40988
+ # final model call. Some of them can be explicitly excluded from being
40989
+ # automatically included. This can serve two purposes: 1. Using a more
40990
+ # restricted / different action space. 2. Improving the definitions /
40991
+ # instructions of predefined functions.
40992
+ # Corresponds to the JSON property `excludedPredefinedFunctions`
40993
+ # @return [Array<String>]
40994
+ attr_accessor :excluded_predefined_functions
40995
+
40996
+ def initialize(**args)
40997
+ update!(**args)
40998
+ end
40999
+
41000
+ # Update properties of this object
41001
+ def update!(**args)
41002
+ @environment = args[:environment] if args.key?(:environment)
41003
+ @excluded_predefined_functions = args[:excluded_predefined_functions] if args.key?(:excluded_predefined_functions)
41004
+ end
41005
+ end
41006
+
40460
41007
  # Tool config. This config is shared for all tools provided in the request.
40461
41008
  class GoogleCloudAiplatformV1ToolConfig
40462
41009
  include Google::Apis::Core::Hashable
@@ -42827,6 +43374,97 @@ module Google
42827
43374
  end
42828
43375
  end
42829
43376
 
43377
+ # Usage metadata about the content generation request and response. This message
43378
+ # provides a detailed breakdown of token usage and other relevant metrics.
43379
+ class GoogleCloudAiplatformV1UsageMetadata
43380
+ include Google::Apis::Core::Hashable
43381
+
43382
+ # Output only. A detailed breakdown of the token count for each modality in the
43383
+ # cached content.
43384
+ # Corresponds to the JSON property `cacheTokensDetails`
43385
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>]
43386
+ attr_accessor :cache_tokens_details
43387
+
43388
+ # Output only. The number of tokens in the cached content that was used for this
43389
+ # request.
43390
+ # Corresponds to the JSON property `cachedContentTokenCount`
43391
+ # @return [Fixnum]
43392
+ attr_accessor :cached_content_token_count
43393
+
43394
+ # The total number of tokens in the generated candidates.
43395
+ # Corresponds to the JSON property `candidatesTokenCount`
43396
+ # @return [Fixnum]
43397
+ attr_accessor :candidates_token_count
43398
+
43399
+ # Output only. A detailed breakdown of the token count for each modality in the
43400
+ # generated candidates.
43401
+ # Corresponds to the JSON property `candidatesTokensDetails`
43402
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>]
43403
+ attr_accessor :candidates_tokens_details
43404
+
43405
+ # The total number of tokens in the prompt. This includes any text, images, or
43406
+ # other media provided in the request. When `cached_content` is set, this also
43407
+ # includes the number of tokens in the cached content.
43408
+ # Corresponds to the JSON property `promptTokenCount`
43409
+ # @return [Fixnum]
43410
+ attr_accessor :prompt_token_count
43411
+
43412
+ # Output only. A detailed breakdown of the token count for each modality in the
43413
+ # prompt.
43414
+ # Corresponds to the JSON property `promptTokensDetails`
43415
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>]
43416
+ attr_accessor :prompt_tokens_details
43417
+
43418
+ # Output only. The number of tokens that were part of the model's generated "
43419
+ # thoughts" output, if applicable.
43420
+ # Corresponds to the JSON property `thoughtsTokenCount`
43421
+ # @return [Fixnum]
43422
+ attr_accessor :thoughts_token_count
43423
+
43424
+ # Output only. The number of tokens in the results from tool executions, which
43425
+ # are provided back to the model as input, if applicable.
43426
+ # Corresponds to the JSON property `toolUsePromptTokenCount`
43427
+ # @return [Fixnum]
43428
+ attr_accessor :tool_use_prompt_token_count
43429
+
43430
+ # Output only. A detailed breakdown by modality of the token counts from the
43431
+ # results of tool executions, which are provided back to the model as input.
43432
+ # Corresponds to the JSON property `toolUsePromptTokensDetails`
43433
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>]
43434
+ attr_accessor :tool_use_prompt_tokens_details
43435
+
43436
+ # The total number of tokens for the entire request. This is the sum of `
43437
+ # prompt_token_count`, `candidates_token_count`, `tool_use_prompt_token_count`,
43438
+ # and `thoughts_token_count`.
43439
+ # Corresponds to the JSON property `totalTokenCount`
43440
+ # @return [Fixnum]
43441
+ attr_accessor :total_token_count
43442
+
43443
+ # Output only. The traffic type for this request.
43444
+ # Corresponds to the JSON property `trafficType`
43445
+ # @return [String]
43446
+ attr_accessor :traffic_type
43447
+
43448
+ def initialize(**args)
43449
+ update!(**args)
43450
+ end
43451
+
43452
+ # Update properties of this object
43453
+ def update!(**args)
43454
+ @cache_tokens_details = args[:cache_tokens_details] if args.key?(:cache_tokens_details)
43455
+ @cached_content_token_count = args[:cached_content_token_count] if args.key?(:cached_content_token_count)
43456
+ @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
43457
+ @candidates_tokens_details = args[:candidates_tokens_details] if args.key?(:candidates_tokens_details)
43458
+ @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
43459
+ @prompt_tokens_details = args[:prompt_tokens_details] if args.key?(:prompt_tokens_details)
43460
+ @thoughts_token_count = args[:thoughts_token_count] if args.key?(:thoughts_token_count)
43461
+ @tool_use_prompt_token_count = args[:tool_use_prompt_token_count] if args.key?(:tool_use_prompt_token_count)
43462
+ @tool_use_prompt_tokens_details = args[:tool_use_prompt_tokens_details] if args.key?(:tool_use_prompt_tokens_details)
43463
+ @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
43464
+ @traffic_type = args[:traffic_type] if args.key?(:traffic_type)
43465
+ end
43466
+ end
43467
+
42830
43468
  # References an API call. It contains more information about long running
42831
43469
  # operation and Jobs that are triggered by the API call.
42832
43470
  class GoogleCloudAiplatformV1UserActionReference