From f828adecf9082d44dd1fc68d8c3563adb0ca8dc3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 20 Oct 2024 09:27:40 +0000 Subject: [PATCH] feat: Automated regeneration of aiplatform v1 client --- api_names_out.yaml | 47 +++ .../google-apis-aiplatform_v1/CHANGELOG.md | 4 + .../lib/google/apis/aiplatform_v1/classes.rb | 313 +++++++++++++++++- .../google/apis/aiplatform_v1/gem_version.rb | 4 +- .../apis/aiplatform_v1/representations.rb | 155 +++++++++ .../lib/google/apis/aiplatform_v1/service.rb | 36 ++ 6 files changed, 553 insertions(+), 6 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 60331bbeb2b..577a69f1250 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -6592,10 +6592,15 @@ "/aiplatform:v1/CloudAiLargeModelsVisionImage/generationSeed": generation_seed "/aiplatform:v1/CloudAiLargeModelsVisionImage/image": image "/aiplatform:v1/CloudAiLargeModelsVisionImage/imageRaiScores": image_rai_scores +"/aiplatform:v1/CloudAiLargeModelsVisionImage/imageSize": image_size "/aiplatform:v1/CloudAiLargeModelsVisionImage/raiInfo": rai_info "/aiplatform:v1/CloudAiLargeModelsVisionImage/semanticFilterResponse": semantic_filter_response "/aiplatform:v1/CloudAiLargeModelsVisionImage/text": text "/aiplatform:v1/CloudAiLargeModelsVisionImage/uri": uri +"/aiplatform:v1/CloudAiLargeModelsVisionImageImageSize": cloud_ai_large_models_vision_image_image_size +"/aiplatform:v1/CloudAiLargeModelsVisionImageImageSize/channels": channels +"/aiplatform:v1/CloudAiLargeModelsVisionImageImageSize/height": height +"/aiplatform:v1/CloudAiLargeModelsVisionImageImageSize/width": width "/aiplatform:v1/CloudAiLargeModelsVisionImageRAIScores": cloud_ai_large_models_vision_image_rai_scores "/aiplatform:v1/CloudAiLargeModelsVisionImageRAIScores/agileWatermarkDetectionScore": agile_watermark_detection_score "/aiplatform:v1/CloudAiLargeModelsVisionMedia": cloud_ai_large_models_vision_media @@ -7100,6 +7105,7 @@ "/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/network": network "/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/persistentResourceId": persistent_resource_id "/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/protectedArtifactLocationId": protected_artifact_location_id +"/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/pscInterfaceConfig": psc_interface_config "/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/reservedIpRanges": reserved_ip_ranges "/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/reservedIpRanges/reserved_ip_range": reserved_ip_range "/aiplatform:v1/GoogleCloudAiplatformV1CustomJobSpec/scheduling": scheduling @@ -7787,6 +7793,7 @@ "/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSync/satisfiesPzs": satisfies_pzs "/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSync/syncSummary": sync_summary "/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSyncConfig": google_cloud_aiplatform_v1_feature_view_sync_config +"/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSyncConfig/continuous": continuous "/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSyncConfig/cron": cron "/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSyncSyncSummary": google_cloud_aiplatform_v1_feature_view_sync_sync_summary "/aiplatform:v1/GoogleCloudAiplatformV1FeatureViewSyncSyncSummary/rowSynced": row_synced @@ -7955,6 +7962,7 @@ "/aiplatform:v1/GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata/promptTokenCount": prompt_token_count "/aiplatform:v1/GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata/totalTokenCount": total_token_count "/aiplatform:v1/GoogleCloudAiplatformV1GenerationConfig": google_cloud_aiplatform_v1_generation_config +"/aiplatform:v1/GoogleCloudAiplatformV1GenerationConfig/audioTimestamp": audio_timestamp "/aiplatform:v1/GoogleCloudAiplatformV1GenerationConfig/candidateCount": candidate_count "/aiplatform:v1/GoogleCloudAiplatformV1GenerationConfig/frequencyPenalty": frequency_penalty "/aiplatform:v1/GoogleCloudAiplatformV1GenerationConfig/logprobs": logprobs @@ -9964,6 +9972,42 @@ "/aiplatform:v1/GoogleCloudAiplatformV1SchemaPredictionResultError": google_cloud_aiplatform_v1_schema_prediction_result_error "/aiplatform:v1/GoogleCloudAiplatformV1SchemaPredictionResultError/message": message "/aiplatform:v1/GoogleCloudAiplatformV1SchemaPredictionResultError/status": status +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptApiSchema": google_cloud_aiplatform_v1_schema_prompt_api_schema +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptApiSchema/apiSchemaVersion": api_schema_version +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptApiSchema/executions": executions +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptApiSchema/executions/execution": execution +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptApiSchema/multimodalPrompt": multimodal_prompt +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptApiSchema/structuredPrompt": structured_prompt +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution": google_cloud_aiplatform_v1_schema_prompt_instance_prompt_execution +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution/arguments": arguments +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution/arguments/argument": argument +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue": google_cloud_aiplatform_v1_schema_prompt_instance_variable_value +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue/partList": part_list +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt": google_cloud_aiplatform_v1_schema_prompt_spec_multimodal_prompt +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt/promptMessage": prompt_message +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPartList": google_cloud_aiplatform_v1_schema_prompt_spec_part_list +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPartList/parts": parts +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPartList/parts/part": part +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage": google_cloud_aiplatform_v1_schema_prompt_spec_prompt_message +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/contents": contents +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/contents/content": content +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/generationConfig": generation_config +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/model": model +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/safetySettings": safety_settings +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/safetySettings/safety_setting": safety_setting +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/systemInstruction": system_instruction +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/toolConfig": tool_config +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/tools": tools +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage/tools/tool": tool +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt": google_cloud_aiplatform_v1_schema_prompt_spec_structured_prompt +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/context": context +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/examples": examples +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/examples/example": example +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/inputPrefixes": input_prefixes +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/inputPrefixes/input_prefix": input_prefix +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/outputPrefixes": output_prefixes +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/outputPrefixes/output_prefix": output_prefix +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt/promptMessage": prompt_message "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTablesDatasetMetadata": google_cloud_aiplatform_v1_schema_tables_dataset_metadata "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTablesDatasetMetadata/inputConfig": input_config "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTablesDatasetMetadataBigQuerySource": google_cloud_aiplatform_v1_schema_tables_dataset_metadata_big_query_source @@ -9994,6 +10038,7 @@ "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/logprobs": logprobs "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/maxOutputTokens": max_output_tokens "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/note": note +"/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/promptApiSchema": prompt_api_schema "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/promptType": prompt_type "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/seedEnabled": seed_enabled "/aiplatform:v1/GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata/seedValue": seed_value @@ -11506,6 +11551,8 @@ "/aiplatform:v1/aiplatform.projects.locations.featureGroups.delete": delete_project_location_feature_group "/aiplatform:v1/aiplatform.projects.locations.featureGroups.delete/force": force "/aiplatform:v1/aiplatform.projects.locations.featureGroups.delete/name": name +"/aiplatform:v1/aiplatform.projects.locations.featureGroups.features.batchCreate": batch_project_location_feature_group_feature_create +"/aiplatform:v1/aiplatform.projects.locations.featureGroups.features.batchCreate/parent": parent "/aiplatform:v1/aiplatform.projects.locations.featureGroups.features.create": create_project_location_feature_group_feature "/aiplatform:v1/aiplatform.projects.locations.featureGroups.features.create/featureId": feature_id "/aiplatform:v1/aiplatform.projects.locations.featureGroups.features.create/parent": parent diff --git a/generated/google-apis-aiplatform_v1/CHANGELOG.md b/generated/google-apis-aiplatform_v1/CHANGELOG.md index efb4f6fb20a..7869402004c 100644 --- a/generated/google-apis-aiplatform_v1/CHANGELOG.md +++ b/generated/google-apis-aiplatform_v1/CHANGELOG.md @@ -1,5 +1,9 @@ # Release history for google-apis-aiplatform_v1 +### v0.39.0 (2024-10-20) + +* Regenerated from discovery document revision 20241007 + ### v0.38.0 (2024-10-13) * Regenerated from discovery document revision 20241001 diff --git a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/classes.rb b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/classes.rb index aac46c3ee72..5e0c8053eed 100644 --- a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/classes.rb +++ b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/classes.rb @@ -80,6 +80,11 @@ class CloudAiLargeModelsVisionImage # @return [Google::Apis::AiplatformV1::CloudAiLargeModelsVisionImageRaiScores] attr_accessor :image_rai_scores + # Image size. + # Corresponds to the JSON property `imageSize` + # @return [Google::Apis::AiplatformV1::CloudAiLargeModelsVisionImageImageSize] + attr_accessor :image_size + # Next ID: 6 # Corresponds to the JSON property `raiInfo` # @return [Google::Apis::AiplatformV1::CloudAiLargeModelsVisionRaiInfo] @@ -110,6 +115,7 @@ def update!(**args) @generation_seed = args[:generation_seed] if args.key?(:generation_seed) @image = args[:image] if args.key?(:image) @image_rai_scores = args[:image_rai_scores] if args.key?(:image_rai_scores) + @image_size = args[:image_size] if args.key?(:image_size) @rai_info = args[:rai_info] if args.key?(:rai_info) @semantic_filter_response = args[:semantic_filter_response] if args.key?(:semantic_filter_response) @text = args[:text] if args.key?(:text) @@ -117,6 +123,37 @@ def update!(**args) end end + # Image size. + class CloudAiLargeModelsVisionImageImageSize + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `channels` + # @return [Fixnum] + attr_accessor :channels + + # + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + + # + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @channels = args[:channels] if args.key?(:channels) + @height = args[:height] if args.key?(:height) + @width = args[:width] if args.key?(:width) + end + end + # RAI scores for generated image returned. class CloudAiLargeModelsVisionImageRaiScores include Google::Apis::Core::Hashable @@ -4068,6 +4105,11 @@ class GoogleCloudAiplatformV1CustomJobSpec # @return [String] attr_accessor :protected_artifact_location_id + # Configuration for PSC-I. + # Corresponds to the JSON property `pscInterfaceConfig` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PscInterfaceConfig] + attr_accessor :psc_interface_config + # Optional. A list of names for the reserved ip ranges under the VPC network # that can be used for this job. If set, we will deploy the job within the # provided ip ranges. Otherwise, the job will be deployed to any ip ranges under @@ -4118,6 +4160,7 @@ def update!(**args) @network = args[:network] if args.key?(:network) @persistent_resource_id = args[:persistent_resource_id] if args.key?(:persistent_resource_id) @protected_artifact_location_id = args[:protected_artifact_location_id] if args.key?(:protected_artifact_location_id) + @psc_interface_config = args[:psc_interface_config] if args.key?(:psc_interface_config) @reserved_ip_ranges = args[:reserved_ip_ranges] if args.key?(:reserved_ip_ranges) @scheduling = args[:scheduling] if args.key?(:scheduling) @service_account = args[:service_account] if args.key?(:service_account) @@ -9245,6 +9288,13 @@ def update!(**args) class GoogleCloudAiplatformV1FeatureViewSyncConfig include Google::Apis::Core::Hashable + # Optional. If true, syncs the FeatureView in a continuous manner to Online + # Store. + # Corresponds to the JSON property `continuous` + # @return [Boolean] + attr_accessor :continuous + alias_method :continuous?, :continuous + # Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch scheduled runs. # To explicitly set a timezone to the cron tab, apply a prefix in the cron tab: " # CRON_TZ=$`IANA_TIME_ZONE`" or "TZ=$`IANA_TIME_ZONE`". The $`IANA_TIME_ZONE` @@ -9260,6 +9310,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @continuous = args[:continuous] if args.key?(:continuous) @cron = args[:cron] if args.key?(:cron) end end @@ -10587,6 +10638,13 @@ def update!(**args) class GoogleCloudAiplatformV1GenerationConfig include Google::Apis::Core::Hashable + # Optional. If enabled, audio timestamp will be included in the request to the + # model. + # Corresponds to the JSON property `audioTimestamp` + # @return [Boolean] + attr_accessor :audio_timestamp + alias_method :audio_timestamp?, :audio_timestamp + # Optional. Number of candidates to generate. # Corresponds to the JSON property `candidateCount` # @return [Fixnum] @@ -10670,6 +10728,7 @@ def initialize(**args) # Update properties of this object def update!(**args) + @audio_timestamp = args[:audio_timestamp] if args.key?(:audio_timestamp) @candidate_count = args[:candidate_count] if args.key?(:candidate_count) @frequency_penalty = args[:frequency_penalty] if args.key?(:frequency_penalty) @logprobs = args[:logprobs] if args.key?(:logprobs) @@ -19439,6 +19498,19 @@ def update!(**args) end end + # Configuration for PSC-I. + class GoogleCloudAiplatformV1PscInterfaceConfig + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # A Model Garden Publisher Model. class GoogleCloudAiplatformV1PublisherModel include Google::Apis::Core::Hashable @@ -22380,9 +22452,10 @@ class GoogleCloudAiplatformV1Schema # @return [String] attr_accessor :description - # Optional. Possible values of the element of Type.STRING with enum format. For - # example we can define an Enum Direction as : `type:STRING, format:enum, enum:[" - # EAST", NORTH", "SOUTH", "WEST"]` + # Optional. Possible values of the element of primitive type with enum format. + # Examples: 1. We can define direction as : `type:STRING, format:enum, enum:[" + # EAST", NORTH", "SOUTH", "WEST"]` 2. We can define apartment number as : `type: + # INTEGER, format:enum, enum:["101", "201", "301"]` # Corresponds to the JSON property `enum` # @return [Array] attr_accessor :enum @@ -25168,6 +25241,232 @@ def update!(**args) end end + # The A2 schema of a prompt. + class GoogleCloudAiplatformV1SchemaPromptApiSchema + include Google::Apis::Core::Hashable + + # The Schema version that represents changes to the API behavior. + # Corresponds to the JSON property `apiSchemaVersion` + # @return [String] + attr_accessor :api_schema_version + + # A list of execution instances for constructing a ready-to-use prompt. + # Corresponds to the JSON property `executions` + # @return [Array] + attr_accessor :executions + + # Prompt variation that embeds preambles to prompt string. + # Corresponds to the JSON property `multimodalPrompt` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt] + attr_accessor :multimodal_prompt + + # Prompt variation that stores preambles in separate fields. + # Corresponds to the JSON property `structuredPrompt` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt] + attr_accessor :structured_prompt + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_schema_version = args[:api_schema_version] if args.key?(:api_schema_version) + @executions = args[:executions] if args.key?(:executions) + @multimodal_prompt = args[:multimodal_prompt] if args.key?(:multimodal_prompt) + @structured_prompt = args[:structured_prompt] if args.key?(:structured_prompt) + end + end + + # A prompt instance's parameters set that contains a set of variable values. + class GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution + include Google::Apis::Core::Hashable + + # Maps variable names to their value. + # Corresponds to the JSON property `arguments` + # @return [Hash] + attr_accessor :arguments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @arguments = args[:arguments] if args.key?(:arguments) + end + end + + # The value of a variable in prompt. + class GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue + include Google::Apis::Core::Hashable + + # A list of elements and information that make up a portion of prompt. + # Corresponds to the JSON property `partList` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList] + attr_accessor :part_list + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @part_list = args[:part_list] if args.key?(:part_list) + end + end + + # Prompt variation that embeds preambles to prompt string. + class GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt + include Google::Apis::Core::Hashable + + # The prompt message that aligns with the prompt message in google.cloud. + # aiplatform.master.GenerateContentRequest. + # Corresponds to the JSON property `promptMessage` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage] + attr_accessor :prompt_message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @prompt_message = args[:prompt_message] if args.key?(:prompt_message) + end + end + + # A list of elements and information that make up a portion of prompt. + class GoogleCloudAiplatformV1SchemaPromptSpecPartList + include Google::Apis::Core::Hashable + + # A list of elements that can be part of a prompt. + # Corresponds to the JSON property `parts` + # @return [Array] + attr_accessor :parts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parts = args[:parts] if args.key?(:parts) + end + end + + # The prompt message that aligns with the prompt message in google.cloud. + # aiplatform.master.GenerateContentRequest. + class GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage + include Google::Apis::Core::Hashable + + # The content of the current conversation with the model. For single-turn + # queries, this is a single instance. For multi-turn queries, this is a repeated + # field that contains conversation history + latest request. + # Corresponds to the JSON property `contents` + # @return [Array] + attr_accessor :contents + + # Generation config. + # Corresponds to the JSON property `generationConfig` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig] + attr_accessor :generation_config + + # The model name. + # Corresponds to the JSON property `model` + # @return [String] + attr_accessor :model + + # Per request settings for blocking unsafe content. Enforced on + # GenerateContentResponse.candidates. + # Corresponds to the JSON property `safetySettings` + # @return [Array] + attr_accessor :safety_settings + + # The base structured datatype containing multi-part content of a message. A ` + # Content` includes a `role` field designating the producer of the `Content` and + # a `parts` field containing multi-part data that contains the content of the + # message turn. + # Corresponds to the JSON property `systemInstruction` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content] + attr_accessor :system_instruction + + # Tool config. This config is shared for all tools provided in the request. + # Corresponds to the JSON property `toolConfig` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolConfig] + attr_accessor :tool_config + + # A list of `Tools` the model may use to generate the next response. A `Tool` is + # a piece of code that enables the system to interact with external systems to + # perform an action, or set of actions, outside of knowledge and scope of the + # model. + # Corresponds to the JSON property `tools` + # @return [Array] + attr_accessor :tools + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @contents = args[:contents] if args.key?(:contents) + @generation_config = args[:generation_config] if args.key?(:generation_config) + @model = args[:model] if args.key?(:model) + @safety_settings = args[:safety_settings] if args.key?(:safety_settings) + @system_instruction = args[:system_instruction] if args.key?(:system_instruction) + @tool_config = args[:tool_config] if args.key?(:tool_config) + @tools = args[:tools] if args.key?(:tools) + end + end + + # Prompt variation that stores preambles in separate fields. + class GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt + include Google::Apis::Core::Hashable + + # The base structured datatype containing multi-part content of a message. A ` + # Content` includes a `role` field designating the producer of the `Content` and + # a `parts` field containing multi-part data that contains the content of the + # message turn. + # Corresponds to the JSON property `context` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content] + attr_accessor :context + + # Preamble: A set of examples for expected model response. + # Corresponds to the JSON property `examples` + # @return [Array] + attr_accessor :examples + + # Preamble: The input prefixes before each example input. + # Corresponds to the JSON property `inputPrefixes` + # @return [Array] + attr_accessor :input_prefixes + + # Preamble: The output prefixes before each example output. + # Corresponds to the JSON property `outputPrefixes` + # @return [Array] + attr_accessor :output_prefixes + + # The prompt message that aligns with the prompt message in google.cloud. + # aiplatform.master.GenerateContentRequest. + # Corresponds to the JSON property `promptMessage` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage] + attr_accessor :prompt_message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @context = args[:context] if args.key?(:context) + @examples = args[:examples] if args.key?(:examples) + @input_prefixes = args[:input_prefixes] if args.key?(:input_prefixes) + @output_prefixes = args[:output_prefixes] if args.key?(:output_prefixes) + @prompt_message = args[:prompt_message] if args.key?(:prompt_message) + end + end + # The metadata of Datasets that contain tables data. class GoogleCloudAiplatformV1SchemaTablesDatasetMetadata include Google::Apis::Core::Hashable @@ -25399,6 +25698,11 @@ class GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata # @return [String] attr_accessor :note + # The A2 schema of a prompt. + # Corresponds to the JSON property `promptApiSchema` + # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptApiSchema] + attr_accessor :prompt_api_schema + # Type of the prompt dataset. # Corresponds to the JSON property `promptType` # @return [String] @@ -25470,6 +25774,7 @@ def update!(**args) @logprobs = args[:logprobs] if args.key?(:logprobs) @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens) @note = args[:note] if args.key?(:note) + @prompt_api_schema = args[:prompt_api_schema] if args.key?(:prompt_api_schema) @prompt_type = args[:prompt_type] if args.key?(:prompt_type) @seed_enabled = args[:seed_enabled] if args.key?(:seed_enabled) @seed_value = args[:seed_value] if args.key?(:seed_value) @@ -32027,7 +32332,7 @@ def update!(**args) class GoogleCloudAiplatformV1ToolParameterKvMatchSpec include Google::Apis::Core::Hashable - # Optional. Whether to use STRCIT string match on parameter values. + # Optional. Whether to use STRICT string match on parameter values. # Corresponds to the JSON property `useStrictStringMatch` # @return [Boolean] attr_accessor :use_strict_string_match diff --git a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/gem_version.rb b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/gem_version.rb index a53456de6bd..e26d74edcd4 100644 --- a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/gem_version.rb +++ b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module AiplatformV1 # Version of the google-apis-aiplatform_v1 gem - GEM_VERSION = "0.38.0" + GEM_VERSION = "0.39.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.15.1" # Revision of the discovery document this client was generated from - REVISION = "20241001" + REVISION = "20241007" end end end diff --git a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/representations.rb b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/representations.rb index 019522c4e37..5ea1c866c15 100644 --- a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/representations.rb +++ b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/representations.rb @@ -34,6 +34,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class CloudAiLargeModelsVisionImageImageSize + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CloudAiLargeModelsVisionImageRaiScores class Representation < Google::Apis::Core::JsonRepresentation; end @@ -3124,6 +3130,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudAiplatformV1PscInterfaceConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudAiplatformV1PublisherModel class Representation < Google::Apis::Core::JsonRepresentation; end @@ -4096,6 +4108,48 @@ class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GoogleCloudAiplatformV1SchemaPromptApiSchema + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudAiplatformV1SchemaPromptSpecPartList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GoogleCloudAiplatformV1SchemaTablesDatasetMetadata class Representation < Google::Apis::Core::JsonRepresentation; end @@ -5716,6 +5770,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :image, :base64 => true, as: 'image' property :image_rai_scores, as: 'imageRaiScores', class: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionImageRaiScores, decorator: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionImageRaiScores::Representation + property :image_size, as: 'imageSize', class: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionImageImageSize, decorator: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionImageImageSize::Representation + property :rai_info, as: 'raiInfo', class: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionRaiInfo, decorator: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionRaiInfo::Representation property :semantic_filter_response, as: 'semanticFilterResponse', class: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionSemanticFilterResponse, decorator: Google::Apis::AiplatformV1::CloudAiLargeModelsVisionSemanticFilterResponse::Representation @@ -5725,6 +5781,15 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class CloudAiLargeModelsVisionImageImageSize + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :channels, as: 'channels' + property :height, as: 'height' + property :width, as: 'width' + end + end + class CloudAiLargeModelsVisionImageRaiScores # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -6908,6 +6973,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :network, as: 'network' property :persistent_resource_id, as: 'persistentResourceId' property :protected_artifact_location_id, as: 'protectedArtifactLocationId' + property :psc_interface_config, as: 'pscInterfaceConfig', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PscInterfaceConfig, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PscInterfaceConfig::Representation + collection :reserved_ip_ranges, as: 'reservedIpRanges' property :scheduling, as: 'scheduling', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Scheduling, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Scheduling::Representation @@ -8272,6 +8339,7 @@ class Representation < Google::Apis::Core::JsonRepresentation class GoogleCloudAiplatformV1FeatureViewSyncConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :continuous, as: 'continuous' property :cron, as: 'cron' end end @@ -8660,6 +8728,7 @@ class Representation < Google::Apis::Core::JsonRepresentation class GoogleCloudAiplatformV1GenerationConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :audio_timestamp, as: 'audioTimestamp' property :candidate_count, as: 'candidateCount' property :frequency_penalty, as: 'frequencyPenalty' property :logprobs, as: 'logprobs' @@ -11097,6 +11166,12 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudAiplatformV1PscInterfaceConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class GoogleCloudAiplatformV1PublisherModel # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -12704,6 +12779,84 @@ class Representation < Google::Apis::Core::JsonRepresentation end end + class GoogleCloudAiplatformV1SchemaPromptApiSchema + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_schema_version, as: 'apiSchemaVersion' + collection :executions, as: 'executions', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution::Representation + + property :multimodal_prompt, as: 'multimodalPrompt', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt::Representation + + property :structured_prompt, as: 'structuredPrompt', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt::Representation + + end + end + + class GoogleCloudAiplatformV1SchemaPromptInstancePromptExecution + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :arguments, as: 'arguments', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue::Representation + + end + end + + class GoogleCloudAiplatformV1SchemaPromptInstanceVariableValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :part_list, as: 'partList', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList::Representation + + end + end + + class GoogleCloudAiplatformV1SchemaPromptSpecMultimodalPrompt + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :prompt_message, as: 'promptMessage', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage::Representation + + end + end + + class GoogleCloudAiplatformV1SchemaPromptSpecPartList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :parts, as: 'parts', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Part, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Part::Representation + + end + end + + class GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :contents, as: 'contents', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content::Representation + + property :generation_config, as: 'generationConfig', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig::Representation + + property :model, as: 'model' + collection :safety_settings, as: 'safetySettings', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetySetting, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetySetting::Representation + + property :system_instruction, as: 'systemInstruction', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content::Representation + + property :tool_config, as: 'toolConfig', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolConfig, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ToolConfig::Representation + + collection :tools, as: 'tools', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool::Representation + + end + end + + class GoogleCloudAiplatformV1SchemaPromptSpecStructuredPrompt + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :context, as: 'context', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content::Representation + + collection :examples, as: 'examples', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPartList::Representation + + collection :input_prefixes, as: 'inputPrefixes' + collection :output_prefixes, as: 'outputPrefixes' + property :prompt_message, as: 'promptMessage', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptSpecPromptMessage::Representation + + end + end + class GoogleCloudAiplatformV1SchemaTablesDatasetMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -12780,6 +12933,8 @@ class Representation < Google::Apis::Core::JsonRepresentation property :logprobs, as: 'logprobs' property :max_output_tokens, :numeric_string => true, as: 'maxOutputTokens' property :note, as: 'note' + property :prompt_api_schema, as: 'promptApiSchema', class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptApiSchema, decorator: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SchemaPromptApiSchema::Representation + property :prompt_type, as: 'promptType' property :seed_enabled, as: 'seedEnabled' property :seed_value, :numeric_string => true, as: 'seedValue' diff --git a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/service.rb b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/service.rb index 36692b4889a..c604805aa3e 100644 --- a/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/service.rb +++ b/generated/google-apis-aiplatform_v1/lib/google/apis/aiplatform_v1/service.rb @@ -4850,6 +4850,42 @@ def patch_project_location_feature_group(name, google_cloud_aiplatform_v1_featur execute_or_queue_command(command, &block) end + # Creates a batch of Features in a given FeatureGroup. + # @param [String] parent + # Required. The resource name of the EntityType/FeatureGroup to create the batch + # of Features under. Format: `projects/`project`/locations/`location`/ + # featurestores/`featurestore`/entityTypes/`entity_type`` `projects/`project`/ + # locations/`location`/featureGroups/`feature_group`` + # @param [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchCreateFeaturesRequest] google_cloud_aiplatform_v1_batch_create_features_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AiplatformV1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AiplatformV1::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def batch_project_location_feature_group_feature_create(parent, google_cloud_aiplatform_v1_batch_create_features_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/features:batchCreate', options) + command.request_representation = Google::Apis::AiplatformV1::GoogleCloudAiplatformV1BatchCreateFeaturesRequest::Representation + command.request_object = google_cloud_aiplatform_v1_batch_create_features_request_object + command.response_representation = Google::Apis::AiplatformV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::AiplatformV1::GoogleLongrunningOperation + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a new Feature in a given FeatureGroup. # @param [String] parent # Required. The resource name of the EntityType or FeatureGroup to create a