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: [google-cloud-documentai] Add API fields for the descriptions of entity type and property in the document schema #13067

Merged
merged 5 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ class EntityType(proto.Message):
type. For example ``line_item/amount``. This convention
is deprecated, but will still be honored for backward
compatibility.
description (str):
The description of the entity type. Could be
used to provide more information about the
entity type for model calls.
base_types (MutableSequence[str]):
The entity type that this type is derived
from. For now, one and only one should be set.
Expand Down Expand Up @@ -220,6 +224,10 @@ class Property(proto.Message):
name (str):
The name of the property. Follows the same
guidelines as the EntityType name.
description (str):
The description of the property. Could be
used to provide more information about the
property for model calls.
display_name (str):
User defined name for the property.
value_type (str):
Expand Down Expand Up @@ -274,6 +282,10 @@ class OccurrenceType(proto.Enum):
proto.STRING,
number=1,
)
description: str = proto.Field(
proto.STRING,
number=7,
)
display_name: str = proto.Field(
proto.STRING,
number=6,
Expand Down Expand Up @@ -309,6 +321,10 @@ class OccurrenceType(proto.Enum):
proto.STRING,
number=1,
)
description: str = proto.Field(
proto.STRING,
number=15,
)
base_types: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,8 @@ class ListDocumentsRequest(proto.Message):
https://google.aip.dev/160.
Currently support query strings are:
------------------------------------
``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
- ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
- ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``
- ``DisplayName=\"file_name.pdf\"``
- ``EntityType=abc/def``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6117,10 +6117,12 @@ def test_update_dataset_schema_rest(request_type):
"enum_values": {"values": ["values_value1", "values_value2"]},
"display_name": "display_name_value",
"name": "name_value",
"description": "description_value",
"base_types": ["base_types_value1", "base_types_value2"],
"properties": [
{
"name": "name_value",
"description": "description_value",
"display_name": "display_name_value",
"value_type": "value_type_value",
"occurrence_type": 1,
Expand Down
15 changes: 13 additions & 2 deletions scripts/client-post-processing/doc-formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,20 @@ replacements:
after: " 'ingestionTime': DOUBLE; (UNIX timestamp)\n 'application': STRING;\n"
count: 2
- paths: [
packages/google-cloud-visionai/google/cloud/visionai_v1/types/platform.py,
packages/google-cloud-visionai/google/cloud/visionai_v1/types/platform.py,
]
before: "'processor': STRING;\n }\n dynamic_config_input_topic "
after: "'processor': STRING;\n\n }\n\n dynamic_config_input_topic "
count: 1

- paths: [
packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/document_service.py,
]
before: |
\n Currently support query strings are:
\ ------------------------------------
\
\ ``SplitType=DATASET_SPLIT_TEST\|DATASET_SPLIT_TRAIN\|DATASET_SPLIT_UNASSIGNED``
\
\ - ``LabelingState=DOCUMENT_LABELED\|DOCUMENT_UNLABELED\|DOCUMENT_AUTO_LABELED``
after: "\n Currently support query strings are:\n\n - ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``\n - ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``\n"
count: 1
Loading