Skip to content

Commit 9d46f7f

Browse files
fix: remove BLOCK_NONE from HarmBlockThreshold (googleapis#11439)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent d8d46a6 commit 9d46f7f

8 files changed

Lines changed: 11 additions & 34 deletions

File tree

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python-mono-repo:latest
16-
digest: sha256:2429ab9ff5a11e75f63d1f440523f79b6d246815759f3c3185fbb36b6291b357
16+
digest: sha256:6090b1049e2dc245fb9e7e95df094d15ab212b938e107d76f9d215bd1a8621bf

packages/google-ai-generativelanguage/CONTRIBUTING.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,18 +239,6 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
239239
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/noxfile.py
240240

241241

242-
We also explicitly decided to support Python 3 beginning with version 3.7.
243-
Reasons for this include:
244-
245-
- Encouraging use of newest versions of Python 3
246-
- Taking the lead of `prominent`_ open-source `projects`_
247-
- `Unicode literal support`_ which allows for a cleaner codebase that
248-
works in both Python 2 and Python 3
249-
250-
.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
251-
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
252-
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
253-
254242
**********
255243
Versioning
256244
**********

packages/google-ai-generativelanguage/google/ai/generativelanguage/gapic_version.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2023 Google LLC
2+
# Copyright 2022 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,5 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
17-
__version__ = "0.2.1" # {x-release-please-version}
16+
__version__ = "0.1.0" # {x-release-please-version}

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/gapic_version.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2023 Google LLC
2+
# Copyright 2022 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,5 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
17-
__version__ = "0.2.1" # {x-release-please-version}
16+
__version__ = "0.1.0" # {x-release-please-version}

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/types/discuss_service.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,7 @@ class GenerateMessageResponse(proto.Message):
139139
This indicates which ``SafetyCategory``\ (s) blocked a
140140
candidate from this response, the lowest ``HarmProbability``
141141
that triggered a block, and the HarmThreshold setting for
142-
that category. This indicates the smallest change to the
143-
``SafetySettings`` that would be necessary to unblock at
144-
least 1 response.
145-
146-
The blocking is configured by the ``SafetySettings`` in the
147-
request (or the default ``SafetySettings`` of the API).
142+
that category.
148143
"""
149144

150145
candidates: MutableSequence["Message"] = proto.RepeatedField(
@@ -286,10 +281,10 @@ class Example(proto.Message):
286281
287282
Attributes:
288283
input (google.ai.generativelanguage_v1beta2.types.Message):
289-
An example of an input ``Message`` from the user.
284+
Required. An example of an input ``Message`` from the user.
290285
output (google.ai.generativelanguage_v1beta2.types.Message):
291-
An example of what the model should output
292-
given the input.
286+
Required. An example of what the model should
287+
output given the input.
293288
"""
294289

295290
input: "Message" = proto.Field(

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1beta2/types/safety.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,11 @@ class HarmBlockThreshold(proto.Enum):
223223
BLOCK_ONLY_HIGH (3):
224224
Content with NEGLIGIBLE, LOW, and MEDIUM will
225225
be allowed.
226-
BLOCK_NONE (4):
227-
All content will be allowed.
228226
"""
229227
HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0
230228
BLOCK_LOW_AND_ABOVE = 1
231229
BLOCK_MEDIUM_AND_ABOVE = 2
232230
BLOCK_ONLY_HIGH = 3
233-
BLOCK_NONE = 4
234231

235232
category: "HarmCategory" = proto.Field(
236233
proto.ENUM,

packages/google-ai-generativelanguage/noxfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,9 @@ def docfx(session):
305305

306306
session.install("-e", ".")
307307
session.install(
308-
"sphinx==4.0.1",
308+
"gcp-sphinx-docfx-yaml",
309309
"alabaster",
310310
"recommonmark",
311-
"gcp-sphinx-docfx-yaml",
312311
)
313312

314313
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)

packages/google-ai-generativelanguage/samples/generated_samples/snippet_metadata_google.ai.generativelanguage.v1beta2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-ai-generativelanguage",
11-
"version": "0.2.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)