Content-Length: 750698 | pFad | https://github.com/googleapis/google-cloud-python/commit/4c94c24e0678e0867bff063d2268164a5ed9685c

52 feat: Support topic model type V2 (#11457) · googleapis/google-cloud-python@4c94c24 · GitHub
Skip to content

Commit 4c94c24

Browse files
feat: Support topic model type V2 (#11457)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b1a8927 commit 4c94c24

File tree

5 files changed

+65
-4
lines changed

5 files changed

+65
-4
lines changed

packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights/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__ = "1.11.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_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__ = "1.11.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-contact-center-insights/google/cloud/contact_center_insights_v1/types/resources.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,10 @@ class IssueModel(proto.Message):
12241224
training_stats (google.cloud.contact_center_insights_v1.types.IssueModelLabelStats):
12251225
Output only. Immutable. The issue model's
12261226
label statistics on its training data.
1227+
model_type (google.cloud.contact_center_insights_v1.types.IssueModel.ModelType):
1228+
Type of the model.
1229+
language_code (str):
1230+
Language of the model.
12271231
"""
12281232

12291233
class State(proto.Enum):
@@ -1252,6 +1256,21 @@ class State(proto.Enum):
12521256
UNDEPLOYING = 4
12531257
DELETING = 5
12541258

1259+
class ModelType(proto.Enum):
1260+
r"""Type of the model.
1261+
1262+
Values:
1263+
MODEL_TYPE_UNSPECIFIED (0):
1264+
Unspecified model type.
1265+
TYPE_V1 (1):
1266+
Type V1.
1267+
TYPE_V2 (2):
1268+
Type V2.
1269+
"""
1270+
MODEL_TYPE_UNSPECIFIED = 0
1271+
TYPE_V1 = 1
1272+
TYPE_V2 = 2
1273+
12551274
class InputDataConfig(proto.Message):
12561275
r"""Configs for the input data used to create the issue model.
12571276
@@ -1320,6 +1339,15 @@ class InputDataConfig(proto.Message):
13201339
number=7,
13211340
message="IssueModelLabelStats",
13221341
)
1342+
model_type: ModelType = proto.Field(
1343+
proto.ENUM,
1344+
number=9,
1345+
enum=ModelType,
1346+
)
1347+
language_code: str = proto.Field(
1348+
proto.STRING,
1349+
number=10,
1350+
)
13231351

13241352

13251353
class Issue(proto.Message):
@@ -1785,7 +1813,8 @@ class RedactionConfig(proto.Message):
17851813
``projects/{project}/deidentifyTemplates/{template}``
17861814
inspect_template (str):
17871815
The fully-qualified DLP inspect template resource name.
1788-
Format: ``projects/{project}/inspectTemplates/{template}``
1816+
Format:
1817+
``projects/{project}/locations/{location}/inspectTemplates/{template}``
17891818
"""
17901819

17911820
deidentify_template: str = proto.Field(

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

packages/google-cloud-contact-center-insights/tests/unit/gapic/contact_center_insights_v1/test_contact_center_insights.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4572,6 +4572,8 @@ def test_update_issue_model(request_type, transport: str = "grpc"):
45724572
display_name="display_name_value",
45734573
issue_count=1201,
45744574
state=resources.IssueModel.State.UNDEPLOYED,
4575+
model_type=resources.IssueModel.ModelType.TYPE_V1,
4576+
language_code="language_code_value",
45754577
)
45764578
response = client.update_issue_model(request)
45774579

@@ -4586,6 +4588,8 @@ def test_update_issue_model(request_type, transport: str = "grpc"):
45864588
assert response.display_name == "display_name_value"
45874589
assert response.issue_count == 1201
45884590
assert response.state == resources.IssueModel.State.UNDEPLOYED
4591+
assert response.model_type == resources.IssueModel.ModelType.TYPE_V1
4592+
assert response.language_code == "language_code_value"
45894593

45904594

45914595
def test_update_issue_model_empty_call():
@@ -4631,6 +4635,8 @@ async def test_update_issue_model_async(
46314635
display_name="display_name_value",
46324636
issue_count=1201,
46334637
state=resources.IssueModel.State.UNDEPLOYED,
4638+
model_type=resources.IssueModel.ModelType.TYPE_V1,
4639+
language_code="language_code_value",
46344640
)
46354641
)
46364642
response = await client.update_issue_model(request)
@@ -4646,6 +4652,8 @@ async def test_update_issue_model_async(
46464652
assert response.display_name == "display_name_value"
46474653
assert response.issue_count == 1201
46484654
assert response.state == resources.IssueModel.State.UNDEPLOYED
4655+
assert response.model_type == resources.IssueModel.ModelType.TYPE_V1
4656+
assert response.language_code == "language_code_value"
46494657

46504658

46514659
@pytest.mark.asyncio
@@ -4839,6 +4847,8 @@ def test_get_issue_model(request_type, transport: str = "grpc"):
48394847
display_name="display_name_value",
48404848
issue_count=1201,
48414849
state=resources.IssueModel.State.UNDEPLOYED,
4850+
model_type=resources.IssueModel.ModelType.TYPE_V1,
4851+
language_code="language_code_value",
48424852
)
48434853
response = client.get_issue_model(request)
48444854

@@ -4853,6 +4863,8 @@ def test_get_issue_model(request_type, transport: str = "grpc"):
48534863
assert response.display_name == "display_name_value"
48544864
assert response.issue_count == 1201
48554865
assert response.state == resources.IssueModel.State.UNDEPLOYED
4866+
assert response.model_type == resources.IssueModel.ModelType.TYPE_V1
4867+
assert response.language_code == "language_code_value"
48564868

48574869

48584870
def test_get_issue_model_empty_call():
@@ -4894,6 +4906,8 @@ async def test_get_issue_model_async(
48944906
display_name="display_name_value",
48954907
issue_count=1201,
48964908
state=resources.IssueModel.State.UNDEPLOYED,
4909+
model_type=resources.IssueModel.ModelType.TYPE_V1,
4910+
language_code="language_code_value",
48974911
)
48984912
)
48994913
response = await client.get_issue_model(request)
@@ -4909,6 +4923,8 @@ async def test_get_issue_model_async(
49094923
assert response.display_name == "display_name_value"
49104924
assert response.issue_count == 1201
49114925
assert response.state == resources.IssueModel.State.UNDEPLOYED
4926+
assert response.model_type == resources.IssueModel.ModelType.TYPE_V1
4927+
assert response.language_code == "language_code_value"
49124928

49134929

49144930
@pytest.mark.asyncio
@@ -15372,6 +15388,8 @@ def test_create_issue_model_rest(request_type):
1537215388
"unclassified_conversations_count": 3439,
1537315389
"issue_stats": {},
1537415390
},
15391+
"model_type": 1,
15392+
"language_code": "language_code_value",
1537515393
}
1537615394
request = request_type(**request_init)
1537715395

@@ -15573,6 +15591,8 @@ def test_create_issue_model_rest_bad_request(
1557315591
"unclassified_conversations_count": 3439,
1557415592
"issue_stats": {},
1557515593
},
15594+
"model_type": 1,
15595+
"language_code": "language_code_value",
1557615596
}
1557715597
request = request_type(**request_init)
1557815598

@@ -15687,6 +15707,8 @@ def test_update_issue_model_rest(request_type):
1568715707
"unclassified_conversations_count": 3439,
1568815708
"issue_stats": {},
1568915709
},
15710+
"model_type": 1,
15711+
"language_code": "language_code_value",
1569015712
}
1569115713
request = request_type(**request_init)
1569215714

@@ -15698,6 +15720,8 @@ def test_update_issue_model_rest(request_type):
1569815720
display_name="display_name_value",
1569915721
issue_count=1201,
1570015722
state=resources.IssueModel.State.UNDEPLOYED,
15723+
model_type=resources.IssueModel.ModelType.TYPE_V1,
15724+
language_code="language_code_value",
1570115725
)
1570215726

1570315727
# Wrap the value into a proper Response obj
@@ -15716,6 +15740,8 @@ def test_update_issue_model_rest(request_type):
1571615740
assert response.display_name == "display_name_value"
1571715741
assert response.issue_count == 1201
1571815742
assert response.state == resources.IssueModel.State.UNDEPLOYED
15743+
assert response.model_type == resources.IssueModel.ModelType.TYPE_V1
15744+
assert response.language_code == "language_code_value"
1571915745

1572015746

1572115747
def test_update_issue_model_rest_required_fields(
@@ -15889,6 +15915,8 @@ def test_update_issue_model_rest_bad_request(
1588915915
"unclassified_conversations_count": 3439,
1589015916
"issue_stats": {},
1589115917
},
15918+
"model_type": 1,
15919+
"language_code": "language_code_value",
1589215920
}
1589315921
request = request_type(**request_init)
1589415922

@@ -15997,6 +16025,8 @@ def test_get_issue_model_rest(request_type):
1599716025
display_name="display_name_value",
1599816026
issue_count=1201,
1599916027
state=resources.IssueModel.State.UNDEPLOYED,
16028+
model_type=resources.IssueModel.ModelType.TYPE_V1,
16029+
language_code="language_code_value",
1600016030
)
1600116031

1600216032
# Wrap the value into a proper Response obj
@@ -16015,6 +16045,8 @@ def test_get_issue_model_rest(request_type):
1601516045
assert response.display_name == "display_name_value"
1601616046
assert response.issue_count == 1201
1601716047
assert response.state == resources.IssueModel.State.UNDEPLOYED
16048+
assert response.model_type == resources.IssueModel.ModelType.TYPE_V1
16049+
assert response.language_code == "language_code_value"
1601816050

1601916051

1602016052
def test_get_issue_model_rest_required_fields(

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-python/commit/4c94c24e0678e0867bff063d2268164a5ed9685c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy