diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb index cadeb35c0e53..a8dc513582be 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb @@ -206,7 +206,7 @@ def initialize # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload count_tokens(endpoint: nil, model: nil, instances: nil, contents: nil, system_instruction: nil, tools: nil) + # @overload count_tokens(endpoint: nil, model: nil, instances: nil, contents: nil, system_instruction: nil, tools: nil, generation_config: nil) # Pass arguments to `count_tokens` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -235,6 +235,9 @@ def initialize # 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. + # @param generation_config [::Google::Cloud::AIPlatform::V1::GenerationConfig, ::Hash] + # Optional. Generation config that the model will use to generate the + # response. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::AIPlatform::V1::CountTokensResponse] diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb index 58cc39171f21..6ca3684045bf 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb @@ -201,7 +201,7 @@ def initialize # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload count_tokens(endpoint: nil, model: nil, instances: nil, contents: nil, system_instruction: nil, tools: nil) + # @overload count_tokens(endpoint: nil, model: nil, instances: nil, contents: nil, system_instruction: nil, tools: nil, generation_config: nil) # Pass arguments to `count_tokens` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -230,6 +230,9 @@ def initialize # 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. + # @param generation_config [::Google::Cloud::AIPlatform::V1::GenerationConfig, ::Hash] + # Optional. Generation config that the model will use to generate the + # response. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::AIPlatform::V1::CountTokensResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb index 269643e86c0c..1cda94ff17ac 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/client.rb @@ -1251,7 +1251,7 @@ def explain request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, safety_settings: nil, generation_config: nil) + # @overload generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) # Pass arguments to `generate_content` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -1285,6 +1285,14 @@ def explain request, options = nil # @param tool_config [::Google::Cloud::AIPlatform::V1::ToolConfig, ::Hash] # Optional. Tool config. This config is shared for all tools provided in the # request. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. It is used + # for billing and reporting only. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints) and can only contain lowercase letters, numeric + # characters, underscores, and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. @@ -1369,7 +1377,7 @@ def generate_content request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, safety_settings: nil, generation_config: nil) + # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) # Pass arguments to `stream_generate_content` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -1403,6 +1411,14 @@ def generate_content request, options = nil # @param tool_config [::Google::Cloud::AIPlatform::V1::ToolConfig, ::Hash] # Optional. Tool config. This config is shared for all tools provided in the # request. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. It is used + # for billing and reporting only. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints) and can only contain lowercase letters, numeric + # characters, underscores, and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb index d94b24c08d53..4bbf256f8c4f 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb @@ -880,7 +880,7 @@ def explain request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, safety_settings: nil, generation_config: nil) + # @overload generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) # Pass arguments to `generate_content` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -914,6 +914,14 @@ def explain request, options = nil # @param tool_config [::Google::Cloud::AIPlatform::V1::ToolConfig, ::Hash] # Optional. Tool config. This config is shared for all tools provided in the # request. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. It is used + # for billing and reporting only. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints) and can only contain lowercase letters, numeric + # characters, underscores, and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. @@ -991,7 +999,7 @@ def generate_content request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, safety_settings: nil, generation_config: nil) + # @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil) # Pass arguments to `stream_generate_content` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -1025,6 +1033,14 @@ def generate_content request, options = nil # @param tool_config [::Google::Cloud::AIPlatform::V1::ToolConfig, ::Hash] # Optional. Tool config. This config is shared for all tools provided in the # request. + # @param labels [::Hash{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. It is used + # for billing and reporting only. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints) and can only contain lowercase letters, numeric + # characters, underscores, and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. # @param safety_settings [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting, ::Hash>] # Optional. Per request settings for blocking unsafe content. # Enforced on GenerateContentResponse.candidates. diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb index 16d73bac88f2..35d6a5bdb6b9 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/content_pb.rb @@ -11,7 +11,7 @@ require 'google/type/date_pb' -descriptor_data = "\n(google/cloud/aiplatform/v1/content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/date.proto\"R\n\x07\x43ontent\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x05parts\x18\x02 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PartB\x03\xe0\x41\x02\"\x8f\x03\n\x04Part\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12<\n\x0binline_data\x18\x02 \x01(\x0b\x32 .google.cloud.aiplatform.v1.BlobB\x03\xe0\x41\x01H\x00\x12>\n\tfile_data\x18\x03 \x01(\x0b\x32$.google.cloud.aiplatform.v1.FileDataB\x03\xe0\x41\x01H\x00\x12\x46\n\rfunction_call\x18\x05 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FunctionCallB\x03\xe0\x41\x01H\x00\x12N\n\x11\x66unction_response\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.FunctionResponseB\x03\xe0\x41\x01H\x00\x12H\n\x0evideo_metadata\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.VideoMetadataB\x03\xe0\x41\x01H\x01\x42\x06\n\x04\x64\x61taB\n\n\x08metadata\"1\n\x04\x42lob\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\"9\n\x08\x46ileData\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\"y\n\rVideoMetadata\x12\x34\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x32\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xdd\t\n\x10GenerationConfig\x12\x1d\n\x0btemperature\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05top_p\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12!\n\x0f\x63\x61ndidate_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12#\n\x11max_output_tokens\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\x0estop_sequences\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\"\n\x10presence_penalty\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12#\n\x11\x66requency_penalty\x18\t \x01(\x02\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04seed\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1f\n\x12response_mime_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fresponse_schema\x18\x10 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\\\n\x0erouting_config\x18\x11 \x01(\x0b\x32:.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfigB\x03\xe0\x41\x01H\t\x88\x01\x01\x1a\xc2\x04\n\rRoutingConfig\x12_\n\tauto_mode\x18\x01 \x01(\x0b\x32J.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingModeH\x00\x12\x63\n\x0bmanual_mode\x18\x02 \x01(\x0b\x32L.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\x00\x1a\x9b\x02\n\x0f\x41utoRoutingMode\x12\x88\x01\n\x18model_routing_preference\x18\x01 \x01(\x0e\x32\x61.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\x00\x88\x01\x01\"`\n\x16ModelRoutingPreference\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x16\n\x12PRIORITIZE_QUALITY\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\x12\x13\n\x0fPRIORITIZE_COST\x10\x03\x42\x1b\n\x19_model_routing_preference\x1a;\n\x11ManualRoutingMode\x12\x17\n\nmodel_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0erouting_configB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x12\n\x10_candidate_countB\x14\n\x12_max_output_tokensB\x13\n\x11_presence_penaltyB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x12\n\x10_response_schemaB\x11\n\x0f_routing_config\"\xeb\x03\n\rSafetySetting\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x02\x12T\n\tthreshold\x18\x02 \x01(\x0e\x32<.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\x12N\n\x06method\x18\x04 \x01(\x0e\x32\x39.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02\"\xbf\x04\n\x0cSafetyRating\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x03\x12R\n\x0bprobability\x18\x02 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.SafetyRating.HarmProbabilityB\x03\xe0\x41\x03\x12\x1e\n\x11probability_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\x12L\n\x08severity\x18\x06 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.SafetyRating.HarmSeverityB\x03\xe0\x41\x03\x12\x1b\n\x0eseverity_score\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03\x12\x14\n\x07\x62locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x0fHarmProbability\x12 \n\x1cHARM_PROBABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nNEGLIGIBLE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x94\x01\n\x0cHarmSeverity\x12\x1d\n\x19HARM_SEVERITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18HARM_SEVERITY_NEGLIGIBLE\x10\x01\x12\x15\n\x11HARM_SEVERITY_LOW\x10\x02\x12\x18\n\x14HARM_SEVERITY_MEDIUM\x10\x03\x12\x16\n\x12HARM_SEVERITY_HIGH\x10\x04\"P\n\x10\x43itationMetadata\x12<\n\tcitations\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.CitationB\x03\xe0\x41\x03\"\xaa\x01\n\x08\x43itation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07license\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x30\n\x10publication_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\"\xb2\x05\n\tCandidate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12\x12\n\x05score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61vg_logprobs\x18\t \x01(\x01\x42\x03\xe0\x41\x03\x12N\n\rfinish_reason\x18\x03 \x01(\x0e\x32\x32.google.cloud.aiplatform.v1.Candidate.FinishReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12 \n\x0e\x66inish_message\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12L\n\x11\x63itation_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.CitationMetadataB\x03\xe0\x41\x03\x12N\n\x12grounding_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GroundingMetadataB\x03\xe0\x41\x03\"\xbc\x01\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x0e\n\nMAX_TOKENS\x10\x02\x12\n\n\x06SAFETY\x10\x03\x12\x0e\n\nRECITATION\x10\x04\x12\t\n\x05OTHER\x10\x05\x12\r\n\tBLOCKLIST\x10\x06\x12\x16\n\x12PROHIBITED_CONTENT\x10\x07\x12\x08\n\x04SPII\x10\x08\x12\x1b\n\x17MALFORMED_FUNCTION_CALL\x10\tB\x11\n\x0f_finish_message\"g\n\x07Segment\x12\x17\n\npart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xc2\x02\n\x0eGroundingChunk\x12=\n\x03web\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.GroundingChunk.WebH\x00\x12X\n\x11retrieved_context\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContextH\x00\x1a=\n\x03Web\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_title\x1aJ\n\x10RetrievedContext\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_titleB\x0c\n\nchunk_type\"\x95\x01\n\x10GroundingSupport\x12\x39\n\x07segment\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.SegmentH\x00\x88\x01\x01\x12\x1f\n\x17grounding_chunk_indices\x18\x02 \x03(\x05\x12\x19\n\x11\x63onfidence_scores\x18\x03 \x03(\x02\x42\n\n\x08_segment\"\xb4\x02\n\x11GroundingMetadata\x12\x1f\n\x12web_search_queries\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12R\n\x12search_entry_point\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.SearchEntryPointB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x10grounding_chunks\x18\x05 \x03(\x0b\x32*.google.cloud.aiplatform.v1.GroundingChunk\x12M\n\x12grounding_supports\x18\x06 \x03(\x0b\x32,.google.cloud.aiplatform.v1.GroundingSupportB\x03\xe0\x41\x01\x42\x15\n\x13_search_entry_point\"H\n\x10SearchEntryPoint\x12\x1d\n\x10rendered_content\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08sdk_blob\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01*\xb4\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0c\x43ontentProtoP\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" +descriptor_data = "\n(google/cloud/aiplatform/v1/content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a(google/cloud/aiplatform/v1/openapi.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/date.proto\"R\n\x07\x43ontent\x12\x11\n\x04role\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x05parts\x18\x02 \x03(\x0b\x32 .google.cloud.aiplatform.v1.PartB\x03\xe0\x41\x02\"\x8f\x03\n\x04Part\x12\x13\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12<\n\x0binline_data\x18\x02 \x01(\x0b\x32 .google.cloud.aiplatform.v1.BlobB\x03\xe0\x41\x01H\x00\x12>\n\tfile_data\x18\x03 \x01(\x0b\x32$.google.cloud.aiplatform.v1.FileDataB\x03\xe0\x41\x01H\x00\x12\x46\n\rfunction_call\x18\x05 \x01(\x0b\x32(.google.cloud.aiplatform.v1.FunctionCallB\x03\xe0\x41\x01H\x00\x12N\n\x11\x66unction_response\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.FunctionResponseB\x03\xe0\x41\x01H\x00\x12H\n\x0evideo_metadata\x18\x04 \x01(\x0b\x32).google.cloud.aiplatform.v1.VideoMetadataB\x03\xe0\x41\x01H\x01\x42\x06\n\x04\x64\x61taB\n\n\x08metadata\"1\n\x04\x42lob\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\"9\n\x08\x46ileData\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\"y\n\rVideoMetadata\x12\x34\n\x0cstart_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x32\n\nend_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\"\xdd\t\n\x10GenerationConfig\x12\x1d\n\x0btemperature\x18\x01 \x01(\x02\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x17\n\x05top_p\x18\x02 \x01(\x02\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x02\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12!\n\x0f\x63\x61ndidate_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x12#\n\x11max_output_tokens\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1b\n\x0estop_sequences\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\"\n\x10presence_penalty\x18\x08 \x01(\x02\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12#\n\x11\x66requency_penalty\x18\t \x01(\x02\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x16\n\x04seed\x18\x0c \x01(\x05\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x1f\n\x12response_mime_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fresponse_schema\x18\x10 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01H\x08\x88\x01\x01\x12\\\n\x0erouting_config\x18\x11 \x01(\x0b\x32:.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfigB\x03\xe0\x41\x01H\t\x88\x01\x01\x1a\xc2\x04\n\rRoutingConfig\x12_\n\tauto_mode\x18\x01 \x01(\x0b\x32J.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingModeH\x00\x12\x63\n\x0bmanual_mode\x18\x02 \x01(\x0b\x32L.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.ManualRoutingModeH\x00\x1a\x9b\x02\n\x0f\x41utoRoutingMode\x12\x88\x01\n\x18model_routing_preference\x18\x01 \x01(\x0e\x32\x61.google.cloud.aiplatform.v1.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreferenceH\x00\x88\x01\x01\"`\n\x16ModelRoutingPreference\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x16\n\x12PRIORITIZE_QUALITY\x10\x01\x12\x0c\n\x08\x42\x41LANCED\x10\x02\x12\x13\n\x0fPRIORITIZE_COST\x10\x03\x42\x1b\n\x19_model_routing_preference\x1a;\n\x11ManualRoutingMode\x12\x17\n\nmodel_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_model_nameB\x10\n\x0erouting_configB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x08\n\x06_top_kB\x12\n\x10_candidate_countB\x14\n\x12_max_output_tokensB\x13\n\x11_presence_penaltyB\x14\n\x12_frequency_penaltyB\x07\n\x05_seedB\x12\n\x10_response_schemaB\x11\n\x0f_routing_config\"\xeb\x03\n\rSafetySetting\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x02\x12T\n\tthreshold\x18\x02 \x01(\x0e\x32<.google.cloud.aiplatform.v1.SafetySetting.HarmBlockThresholdB\x03\xe0\x41\x02\x12N\n\x06method\x18\x04 \x01(\x0e\x32\x39.google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethodB\x03\xe0\x41\x01\"\x9d\x01\n\x12HarmBlockThreshold\x12$\n HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42LOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n\x16\x42LOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n\x0f\x42LOCK_ONLY_HIGH\x10\x03\x12\x0e\n\nBLOCK_NONE\x10\x04\x12\x07\n\x03OFF\x10\x05\"S\n\x0fHarmBlockMethod\x12!\n\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08SEVERITY\x10\x01\x12\x0f\n\x0bPROBABILITY\x10\x02\"\xbf\x04\n\x0cSafetyRating\x12?\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32(.google.cloud.aiplatform.v1.HarmCategoryB\x03\xe0\x41\x03\x12R\n\x0bprobability\x18\x02 \x01(\x0e\x32\x38.google.cloud.aiplatform.v1.SafetyRating.HarmProbabilityB\x03\xe0\x41\x03\x12\x1e\n\x11probability_score\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\x12L\n\x08severity\x18\x06 \x01(\x0e\x32\x35.google.cloud.aiplatform.v1.SafetyRating.HarmSeverityB\x03\xe0\x41\x03\x12\x1b\n\x0eseverity_score\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03\x12\x14\n\x07\x62locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\"b\n\x0fHarmProbability\x12 \n\x1cHARM_PROBABILITY_UNSPECIFIED\x10\x00\x12\x0e\n\nNEGLIGIBLE\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\"\x94\x01\n\x0cHarmSeverity\x12\x1d\n\x19HARM_SEVERITY_UNSPECIFIED\x10\x00\x12\x1c\n\x18HARM_SEVERITY_NEGLIGIBLE\x10\x01\x12\x15\n\x11HARM_SEVERITY_LOW\x10\x02\x12\x18\n\x14HARM_SEVERITY_MEDIUM\x10\x03\x12\x16\n\x12HARM_SEVERITY_HIGH\x10\x04\"P\n\x10\x43itationMetadata\x12<\n\tcitations\x18\x01 \x03(\x0b\x32$.google.cloud.aiplatform.v1.CitationB\x03\xe0\x41\x03\"\xaa\x01\n\x08\x43itation\x12\x18\n\x0bstart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05title\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07license\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x30\n\x10publication_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\"\xb2\x05\n\tCandidate\x12\x12\n\x05index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x39\n\x07\x63ontent\x18\x02 \x01(\x0b\x32#.google.cloud.aiplatform.v1.ContentB\x03\xe0\x41\x03\x12\x12\n\x05score\x18\x08 \x01(\x01\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x61vg_logprobs\x18\t \x01(\x01\x42\x03\xe0\x41\x03\x12N\n\rfinish_reason\x18\x03 \x01(\x0e\x32\x32.google.cloud.aiplatform.v1.Candidate.FinishReasonB\x03\xe0\x41\x03\x12\x45\n\x0esafety_ratings\x18\x04 \x03(\x0b\x32(.google.cloud.aiplatform.v1.SafetyRatingB\x03\xe0\x41\x03\x12 \n\x0e\x66inish_message\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12L\n\x11\x63itation_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.aiplatform.v1.CitationMetadataB\x03\xe0\x41\x03\x12N\n\x12grounding_metadata\x18\x07 \x01(\x0b\x32-.google.cloud.aiplatform.v1.GroundingMetadataB\x03\xe0\x41\x03\"\xbc\x01\n\x0c\x46inishReason\x12\x1d\n\x19\x46INISH_REASON_UNSPECIFIED\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x0e\n\nMAX_TOKENS\x10\x02\x12\n\n\x06SAFETY\x10\x03\x12\x0e\n\nRECITATION\x10\x04\x12\t\n\x05OTHER\x10\x05\x12\r\n\tBLOCKLIST\x10\x06\x12\x16\n\x12PROHIBITED_CONTENT\x10\x07\x12\x08\n\x04SPII\x10\x08\x12\x1b\n\x17MALFORMED_FUNCTION_CALL\x10\tB\x11\n\x0f_finish_message\"g\n\x07Segment\x12\x17\n\npart_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tend_index\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xc2\x02\n\x0eGroundingChunk\x12=\n\x03web\x18\x01 \x01(\x0b\x32..google.cloud.aiplatform.v1.GroundingChunk.WebH\x00\x12X\n\x11retrieved_context\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContextH\x00\x1a=\n\x03Web\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_title\x1aJ\n\x10RetrievedContext\x12\x10\n\x03uri\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05title\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_uriB\x08\n\x06_titleB\x0c\n\nchunk_type\"\x95\x01\n\x10GroundingSupport\x12\x39\n\x07segment\x18\x01 \x01(\x0b\x32#.google.cloud.aiplatform.v1.SegmentH\x00\x88\x01\x01\x12\x1f\n\x17grounding_chunk_indices\x18\x02 \x03(\x05\x12\x19\n\x11\x63onfidence_scores\x18\x03 \x03(\x02\x42\n\n\x08_segment\"\xb4\x02\n\x11GroundingMetadata\x12\x1f\n\x12web_search_queries\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12R\n\x12search_entry_point\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.SearchEntryPointB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x44\n\x10grounding_chunks\x18\x05 \x03(\x0b\x32*.google.cloud.aiplatform.v1.GroundingChunk\x12M\n\x12grounding_supports\x18\x06 \x03(\x0b\x32,.google.cloud.aiplatform.v1.GroundingSupportB\x03\xe0\x41\x01\x42\x15\n\x13_search_entry_point\"H\n\x10SearchEntryPoint\x12\x1d\n\x10rendered_content\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08sdk_blob\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x01*\xd7\x01\n\x0cHarmCategory\x12\x1d\n\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12!\n\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0c\x43ontentProtoP\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" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/openapi_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/openapi_pb.rb index 0af2c1500453..1baf69d6e90e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/openapi_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/openapi_pb.rb @@ -8,7 +8,7 @@ require 'google/protobuf/struct_pb' -descriptor_data = "\n(google/cloud/aiplatform/v1/openapi.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xd7\x05\n\x06Schema\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32 .google.cloud.aiplatform.v1.TypeB\x03\xe0\x41\x01\x12\x13\n\x06\x66ormat\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05title\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08nullable\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x07\x64\x65\x66\x61ult\x18\x17 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x36\n\x05items\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x16\n\tmin_items\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tmax_items\x18\x16 \x01(\x03\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65num\x18\t \x03(\tB\x03\xe0\x41\x01\x12K\n\nproperties\x18\x03 \x03(\x0b\x32\x32.google.cloud.aiplatform.v1.Schema.PropertiesEntryB\x03\xe0\x41\x01\x12\x15\n\x08required\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x1b\n\x0emin_properties\x18\x0e \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_properties\x18\x0f \x01(\x03\x42\x03\xe0\x41\x01\x12\x14\n\x07minimum\x18\x10 \x01(\x01\x42\x03\xe0\x41\x01\x12\x14\n\x07maximum\x18\x11 \x01(\x01\x42\x03\xe0\x41\x01\x12\x17\n\nmin_length\x18\x12 \x01(\x03\x42\x03\xe0\x41\x01\x12\x17\n\nmax_length\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12\x14\n\x07pattern\x18\x14 \x01(\tB\x03\xe0\x41\x01\x12,\n\x07\x65xample\x18\x04 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x1aU\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Schema:\x02\x38\x01*e\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\n\n\x06NUMBER\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\t\n\x05\x41RRAY\x10\x05\x12\n\n\x06OBJECT\x10\x06\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0cOpenApiProtoP\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" +descriptor_data = "\n(google/cloud/aiplatform/v1/openapi.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf7\x05\n\x06Schema\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32 .google.cloud.aiplatform.v1.TypeB\x03\xe0\x41\x01\x12\x13\n\x06\x66ormat\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05title\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08nullable\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x07\x64\x65\x66\x61ult\x18\x17 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x12\x36\n\x05items\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.SchemaB\x03\xe0\x41\x01\x12\x16\n\tmin_items\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tmax_items\x18\x16 \x01(\x03\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65num\x18\t \x03(\tB\x03\xe0\x41\x01\x12K\n\nproperties\x18\x03 \x03(\x0b\x32\x32.google.cloud.aiplatform.v1.Schema.PropertiesEntryB\x03\xe0\x41\x01\x12\x1e\n\x11property_ordering\x18\x19 \x03(\tB\x03\xe0\x41\x01\x12\x15\n\x08required\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12\x1b\n\x0emin_properties\x18\x0e \x01(\x03\x42\x03\xe0\x41\x01\x12\x1b\n\x0emax_properties\x18\x0f \x01(\x03\x42\x03\xe0\x41\x01\x12\x14\n\x07minimum\x18\x10 \x01(\x01\x42\x03\xe0\x41\x01\x12\x14\n\x07maximum\x18\x11 \x01(\x01\x42\x03\xe0\x41\x01\x12\x17\n\nmin_length\x18\x12 \x01(\x03\x42\x03\xe0\x41\x01\x12\x17\n\nmax_length\x18\x13 \x01(\x03\x42\x03\xe0\x41\x01\x12\x14\n\x07pattern\x18\x14 \x01(\tB\x03\xe0\x41\x01\x12,\n\x07\x65xample\x18\x04 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x01\x1aU\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Schema:\x02\x38\x01*e\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\n\n\x06NUMBER\x10\x02\x12\x0b\n\x07INTEGER\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\t\n\x05\x41RRAY\x10\x05\x12\n\n\x06OBJECT\x10\x06\x42\xca\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x0cOpenApiProtoP\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" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb index 4b9c6fc24ebf..c8097fc589e7 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb @@ -16,7 +16,7 @@ require 'google/protobuf/struct_pb' -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\"\xaa\x01\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\"\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\"\xea\x02\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\x42\x15\n\x13_system_instruction\"N\n\x13\x43ountTokensResponse\x12\x14\n\x0ctotal_tokens\x18\x01 \x01(\x05\x12!\n\x19total_billable_characters\x18\x02 \x01(\x05\"\xd9\x03\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\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\x12G\n\x0fsafety_settings\x18\x03 \x03(\x0b\x32).google.cloud.aiplatform.v1.SafetySettingB\x03\xe0\x41\x01\x12L\n\x11generation_config\x18\x04 \x01(\x0b\x32,.google.cloud.aiplatform.v1.GenerationConfigB\x03\xe0\x41\x01\x42\x15\n\x13_system_instruction\"\xd7\x05\n\x17GenerateContentResponse\x12>\n\ncandidates\x18\x02 \x03(\x0b\x32%.google.cloud.aiplatform.v1.CandidateB\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\xd6\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\"m\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\x1a\x66\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\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\"\"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" +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\"\xaa\x01\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\"\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\"N\n\x13\x43ountTokensResponse\x12\x14\n\x0ctotal_tokens\x18\x01 \x01(\x05\x12!\n\x19total_billable_characters\x18\x02 \x01(\x05\"\xdd\x04\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\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\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\"\xd7\x05\n\x17GenerateContentResponse\x12>\n\ncandidates\x18\x02 \x03(\x0b\x32%.google.cloud.aiplatform.v1.CandidateB\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\xd6\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\"m\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\x1a\x66\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\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\"\"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" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb index 72a6e59fc77d..2637ed4a34ec 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/content.rb @@ -562,6 +562,9 @@ module HarmCategory # The harm category is sexually explicit content. HARM_CATEGORY_SEXUALLY_EXPLICIT = 4 + + # The harm category is civic integrity. + HARM_CATEGORY_CIVIC_INTEGRITY = 5 end end end diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/openapi.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/openapi.rb index 270ecedbc79c..da4b63d4bf9f 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/openapi.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/openapi.rb @@ -23,8 +23,8 @@ module AIPlatform module V1 # Schema is used to define the format of input/output data. Represents a select # subset of an [OpenAPI 3.0 schema - # object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be - # added in the future as needed. + # object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may + # be added in the future as needed. # @!attribute [rw] type # @return [::Google::Cloud::AIPlatform::V1::Type] # Optional. The type of the data. @@ -66,6 +66,11 @@ module V1 # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AIPlatform::V1::Schema}] # Optional. SCHEMA FIELDS FOR TYPE OBJECT # Properties of Type.OBJECT. + # @!attribute [rw] property_ordering + # @return [::Array<::String>] + # Optional. The order of the properties. + # Not a standard field in open api spec. Only used to support the order of + # the properties. # @!attribute [rw] required # @return [::Array<::String>] # Optional. Required properties of Type.OBJECT. diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb index e3398320be8c..2f89d418eb8b 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb @@ -454,6 +454,10 @@ class ExplainResponse # 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. + # @!attribute [rw] generation_config + # @return [::Google::Cloud::AIPlatform::V1::GenerationConfig] + # Optional. Generation config that the model will use to generate the + # response. class CountTokensRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -507,6 +511,15 @@ class CountTokensResponse # @return [::Google::Cloud::AIPlatform::V1::ToolConfig] # Optional. Tool config. This config is shared for all tools provided in the # request. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels with user-defined metadata for the request. It is used + # for billing and reporting only. + # + # Label keys and values can be no longer than 63 characters + # (Unicode codepoints) and can only contain lowercase letters, numeric + # characters, underscores, and dashes. International characters are allowed. + # Label values are optional. Label keys must start with a letter. # @!attribute [rw] safety_settings # @return [::Array<::Google::Cloud::AIPlatform::V1::SafetySetting>] # Optional. Per request settings for blocking unsafe content. @@ -517,6 +530,15 @@ class CountTokensResponse class GenerateContentRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # Response message for [PredictionService.GenerateContent]. @@ -580,6 +602,7 @@ module BlockedReason # Number of tokens in the response(s). # @!attribute [rw] total_token_count # @return [::Integer] + # Total token count for prompt and response candidates. class UsageMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_rest_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_rest_test.rb index 6fa0b7c06be0..4e7f9b250fa7 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_rest_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_rest_test.rb @@ -84,6 +84,7 @@ def test_count_tokens contents = [{}] system_instruction = {} tools = [{}] + generation_config = {} count_tokens_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:| assert options.metadata.key? :"x-goog-api-client" @@ -99,27 +100,27 @@ def test_count_tokens end # Use hash object - client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools }) do |_result, response| + client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.count_tokens endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools do |_result, response| + client.count_tokens endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.count_tokens ::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools) do |_result, response| + client.count_tokens ::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools }, call_options) do |_result, response| + client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.count_tokens(::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools), call_options) do |_result, response| + client.count_tokens(::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb index 1bb3ec0ed36c..3bed1b97d663 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/llm_utility_service_test.rb @@ -69,6 +69,7 @@ def test_count_tokens contents = [{}] system_instruction = {} tools = [{}] + generation_config = {} count_tokens_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :count_tokens, name @@ -80,6 +81,8 @@ def test_count_tokens assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::Content), request["system_instruction"] assert request.has_system_instruction? assert_kind_of ::Google::Cloud::AIPlatform::V1::Tool, request["tools"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::GenerationConfig), request["generation_config"] + assert request.has_generation_config? refute_nil options end @@ -90,31 +93,31 @@ def test_count_tokens end # Use hash object - client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools }) do |response, operation| + client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.count_tokens endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools do |response, operation| + client.count_tokens endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.count_tokens ::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools) do |response, operation| + client.count_tokens ::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools }, grpc_options) do |response, operation| + client.count_tokens({ endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.count_tokens(::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools), grpc_options) do |response, operation| + client.count_tokens(::Google::Cloud::AIPlatform::V1::CountTokensRequest.new(endpoint: endpoint, model: model, instances: instances, contents: contents, system_instruction: system_instruction, tools: tools, generation_config: generation_config), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb index 25100b4f4b48..68a02b5e818f 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_rest_test.rb @@ -475,6 +475,7 @@ def test_generate_content system_instruction = {} tools = [{}] tool_config = {} + labels = {} safety_settings = [{}] generation_config = {} @@ -492,27 +493,27 @@ def test_generate_content end # Use hash object - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }) do |_result, response| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config do |_result, response| + client.generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config) do |_result, response| + client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }, call_options) do |_result, response| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config), call_options) do |_result, response| + client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -535,6 +536,7 @@ def test_stream_generate_content system_instruction = {} tools = [{}] tool_config = {} + labels = {} safety_settings = [{}] generation_config = {} @@ -552,27 +554,27 @@ def test_stream_generate_content end # Use hash object - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }) do |_result, response| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |_result, response| assert_equal http_response, response.underlying_op end.first # Use named arguments - client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config do |_result, response| + client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |_result, response| assert_equal http_response, response.underlying_op end.first # Use protobuf object - client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config) do |_result, response| + client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |_result, response| assert_equal http_response, response.underlying_op end.first # Use hash object with options - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }, call_options) do |_result, response| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end.first # Use protobuf object with options - client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config), call_options) do |_result, response| + client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), call_options) do |_result, response| assert_equal http_response, response.underlying_op end.first diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb index 14a7c0c3848f..d4a8471c2be7 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/prediction_service_test.rb @@ -900,6 +900,7 @@ def test_generate_content system_instruction = {} tools = [{}] tool_config = {} + labels = {} safety_settings = [{}] generation_config = {} @@ -912,6 +913,7 @@ def test_generate_content assert request.has_system_instruction? assert_kind_of ::Google::Cloud::AIPlatform::V1::Tool, request["tools"].first assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::ToolConfig), request["tool_config"] + assert_equal({}, request["labels"].to_h) assert_kind_of ::Google::Cloud::AIPlatform::V1::SafetySetting, request["safety_settings"].first assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::GenerationConfig), request["generation_config"] refute_nil options @@ -924,31 +926,31 @@ def test_generate_content end # Use hash object - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }) do |response, operation| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config do |response, operation| + client.generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config) do |response, operation| + client.generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }, grpc_options) do |response, operation| + client.generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config), grpc_options) do |response, operation| + client.generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -971,6 +973,7 @@ def test_stream_generate_content system_instruction = {} tools = [{}] tool_config = {} + labels = {} safety_settings = [{}] generation_config = {} @@ -983,6 +986,7 @@ def test_stream_generate_content assert request.has_system_instruction? assert_kind_of ::Google::Cloud::AIPlatform::V1::Tool, request["tools"].first assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::ToolConfig), request["tool_config"] + assert_equal({}, request["labels"].to_h) assert_kind_of ::Google::Cloud::AIPlatform::V1::SafetySetting, request["safety_settings"].first assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::GenerationConfig), request["generation_config"] refute_nil options @@ -995,7 +999,7 @@ def test_stream_generate_content end # Use hash object - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }) do |response, operation| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1004,7 +1008,7 @@ def test_stream_generate_content end # Use named arguments - client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config do |response, operation| + client.stream_generate_content model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1013,7 +1017,7 @@ def test_stream_generate_content end # Use protobuf object - client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config) do |response, operation| + client.stream_generate_content ::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1022,7 +1026,7 @@ def test_stream_generate_content end # Use hash object with options - client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config }, grpc_options) do |response, operation| + client.stream_generate_content({ model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config }, grpc_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r @@ -1031,7 +1035,7 @@ def test_stream_generate_content end # Use protobuf object with options - client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, safety_settings: safety_settings, generation_config: generation_config), grpc_options) do |response, operation| + client.stream_generate_content(::Google::Cloud::AIPlatform::V1::GenerateContentRequest.new(model: model, contents: contents, system_instruction: system_instruction, tools: tools, tool_config: tool_config, labels: labels, safety_settings: safety_settings, generation_config: generation_config), grpc_options) do |response, operation| assert_kind_of Enumerable, response response.to_a.each do |r| assert_kind_of ::Google::Cloud::AIPlatform::V1::GenerateContentResponse, r