Skip to content

Commit f16067b

Browse files
feat: [google-cloud-documentai] A new field imageless_mode is added to message .google.cloud.documentai.v1.ProcessRequest (#12975)
BEGIN_COMMIT_OVERRIDE feat: A new field `imageless_mode` is added to message `.google.cloud.documentai.v1.ProcessRequest` feat: A new field `gen_ai_model_info` is added to message `.google.cloud.documentai.v1.ProcessorVersion` END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. feat: A new field `gen_ai_model_info` is added to message `.google.cloud.documentai.v1.ProcessorVersion` PiperOrigin-RevId: 658521163 Source-Link: googleapis/googleapis@f7bcaab Source-Link: googleapis/googleapis-gen@799a34c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6Ijc5OWEzNGNhMzFmOWExZWUyMWE0N2UwOTVmZjJhOWZhMDliZDc5ZDgifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent 9cda0c1 commit f16067b

11 files changed

Lines changed: 122 additions & 9 deletions

File tree

packages/google-cloud-documentai/google/cloud/documentai/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.30.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.30.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1/types/document_processor_service.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ class ProcessRequest(proto.Message):
268268
underscores, and dashes. International
269269
characters are allowed. Label values are
270270
optional. Label keys must start with a letter.
271+
imageless_mode (bool):
272+
Optional. Option to remove images from the
273+
document.
271274
"""
272275

273276
inline_document: gcd_document.Document = proto.Field(
@@ -311,6 +314,10 @@ class ProcessRequest(proto.Message):
311314
proto.STRING,
312315
number=10,
313316
)
317+
imageless_mode: bool = proto.Field(
318+
proto.BOOL,
319+
number=11,
320+
)
314321

315322

316323
class HumanReviewStatus(proto.Message):

packages/google-cloud-documentai/google/cloud/documentai_v1/types/processor.py

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class ProcessorVersion(proto.Message):
7676
Output only. Reserved for future use.
7777
satisfies_pzi (bool):
7878
Output only. Reserved for future use.
79+
gen_ai_model_info (google.cloud.documentai_v1.types.ProcessorVersion.GenAiModelInfo):
80+
Output only. Information about Generative AI
81+
model-based processor versions.
7982
"""
8083

8184
class State(proto.Enum):
@@ -155,6 +158,102 @@ class DeprecationInfo(proto.Message):
155158
number=2,
156159
)
157160

161+
class GenAiModelInfo(proto.Message):
162+
r"""Information about Generative AI model-based processor
163+
versions.
164+
165+
This message has `oneof`_ fields (mutually exclusive fields).
166+
For each oneof, at most one member field can be set at the same time.
167+
Setting any member of the oneof automatically clears all other
168+
members.
169+
170+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
171+
172+
Attributes:
173+
foundation_gen_ai_model_info (google.cloud.documentai_v1.types.ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo):
174+
Information for a pretrained Google-managed
175+
foundation model.
176+
177+
This field is a member of `oneof`_ ``model_info``.
178+
custom_gen_ai_model_info (google.cloud.documentai_v1.types.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo):
179+
Information for a custom Generative AI model
180+
created by the user.
181+
182+
This field is a member of `oneof`_ ``model_info``.
183+
"""
184+
185+
class FoundationGenAiModelInfo(proto.Message):
186+
r"""Information for a pretrained Google-managed foundation model.
187+
188+
Attributes:
189+
finetuning_allowed (bool):
190+
Whether finetuning is allowed for this base
191+
processor version.
192+
min_train_labeled_documents (int):
193+
The minimum number of labeled documents in
194+
the training dataset required for finetuning.
195+
"""
196+
197+
finetuning_allowed: bool = proto.Field(
198+
proto.BOOL,
199+
number=1,
200+
)
201+
min_train_labeled_documents: int = proto.Field(
202+
proto.INT32,
203+
number=2,
204+
)
205+
206+
class CustomGenAiModelInfo(proto.Message):
207+
r"""Information for a custom Generative AI model created by the user.
208+
These are created with ``Create New Version`` in either the
209+
``Call foundation model`` or ``Fine tuning`` tabs.
210+
211+
Attributes:
212+
custom_model_type (google.cloud.documentai_v1.types.ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType):
213+
The type of custom model created by the user.
214+
base_processor_version_id (str):
215+
The base processor version ID for the custom
216+
model.
217+
"""
218+
219+
class CustomModelType(proto.Enum):
220+
r"""The type of custom model created by the user.
221+
222+
Values:
223+
CUSTOM_MODEL_TYPE_UNSPECIFIED (0):
224+
The model type is unspecified.
225+
VERSIONED_FOUNDATION (1):
226+
The model is a versioned foundation model.
227+
FINE_TUNED (2):
228+
The model is a finetuned foundation model.
229+
"""
230+
CUSTOM_MODEL_TYPE_UNSPECIFIED = 0
231+
VERSIONED_FOUNDATION = 1
232+
FINE_TUNED = 2
233+
234+
custom_model_type: "ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType" = proto.Field(
235+
proto.ENUM,
236+
number=1,
237+
enum="ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo.CustomModelType",
238+
)
239+
base_processor_version_id: str = proto.Field(
240+
proto.STRING,
241+
number=2,
242+
)
243+
244+
foundation_gen_ai_model_info: "ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo" = proto.Field(
245+
proto.MESSAGE,
246+
number=1,
247+
oneof="model_info",
248+
message="ProcessorVersion.GenAiModelInfo.FoundationGenAiModelInfo",
249+
)
250+
custom_gen_ai_model_info: "ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo" = proto.Field(
251+
proto.MESSAGE,
252+
number=2,
253+
oneof="model_info",
254+
message="ProcessorVersion.GenAiModelInfo.CustomGenAiModelInfo",
255+
)
256+
158257
name: str = proto.Field(
159258
proto.STRING,
160259
number=1,
@@ -213,6 +312,11 @@ class DeprecationInfo(proto.Message):
213312
proto.BOOL,
214313
number=17,
215314
)
315+
gen_ai_model_info: GenAiModelInfo = proto.Field(
316+
proto.MESSAGE,
317+
number=18,
318+
message=GenAiModelInfo,
319+
)
216320

217321

218322
class ProcessorVersionAlias(proto.Message):

packages/google-cloud-documentai/google/cloud/documentai_v1beta2/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.30.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1beta3/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.30.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/document_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,10 @@ class ListDocumentsRequest(proto.Message):
396396
https://google.aip.dev/160.
397397
398398
Currently support query strings are:
399+
------------------------------------
400+
401+
``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
399402
400-
- ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
401403
- ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``
402404
- ``DisplayName=\"file_name.pdf\"``
403405
- ``EntityType=abc/def``

packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.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-cloud-documentai",
11-
"version": "2.30.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.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-cloud-documentai",
11-
"version": "2.30.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.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-cloud-documentai",
11-
"version": "2.30.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)