Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add CIVIC_INTEGRITY category to SafetySettings for prediction service #27331

Merged
merged 6 commits into from
Sep 18, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
Loading