Skip to content

Commit 1c0a0fa

Browse files
feat(language): update the api
#### language:v1 The following keys were added: - schemas.ClassificationModelOptions (Total Keys: 4) - schemas.ClassifyTextRequest.properties.classificationModelOptions.$ref (Total Keys: 1) - schemas.Features.properties.classificationModelOptions.$ref (Total Keys: 1) - schemas.V1Model (Total Keys: 2) - schemas.V2Model (Total Keys: 3) #### language:v1beta2 The following keys were added: - schemas.ClassificationModelOptions (Total Keys: 4) - schemas.ClassifyTextRequest.properties.classificationModelOptions.$ref (Total Keys: 1) - schemas.Features.properties.classificationModelOptions.$ref (Total Keys: 1) - schemas.V1Model (Total Keys: 2) - schemas.V2Model (Total Keys: 3)
1 parent 5311cf9 commit 1c0a0fa

File tree

5 files changed

+131
-3
lines changed

5 files changed

+131
-3
lines changed

docs/dyn/language_v1.documents.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@ <h3>Method Details</h3>
346346
},
347347
&quot;encodingType&quot;: &quot;A String&quot;, # The encoding type used by the API to calculate offsets.
348348
&quot;features&quot;: { # All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. # Required. The enabled features.
349+
&quot;classificationModelOptions&quot;: { # Model options available for classification requests. # The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true.
350+
&quot;v1Model&quot;: { # Options for the V1 model. # Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.
351+
},
352+
&quot;v2Model&quot;: { # Options for the V2 model. # Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.
353+
&quot;contentCategoriesVersion&quot;: &quot;A String&quot;, # The content categories used for classification.
354+
},
355+
},
349356
&quot;classifyText&quot;: True or False, # Classify the full document into categories.
350357
&quot;extractDocumentSentiment&quot;: True or False, # Extract document-level sentiment.
351358
&quot;extractEntities&quot;: True or False, # Extract entities.
@@ -452,6 +459,13 @@ <h3>Method Details</h3>
452459
The object takes the form of:
453460

454461
{ # The document classification request message.
462+
&quot;classificationModelOptions&quot;: { # Model options available for classification requests. # Model options to use for classification. Defaults to v1 options if not specified.
463+
&quot;v1Model&quot;: { # Options for the V1 model. # Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.
464+
},
465+
&quot;v2Model&quot;: { # Options for the V2 model. # Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.
466+
&quot;contentCategoriesVersion&quot;: &quot;A String&quot;, # The content categories used for classification.
467+
},
468+
},
455469
&quot;document&quot;: { # ################################################################ # Represents the input to API methods. # Required. Input document.
456470
&quot;content&quot;: &quot;A String&quot;, # The content of the input in string format. Cloud audit logging exempt since it is based on user data.
457471
&quot;gcsContentUri&quot;: &quot;A String&quot;, # The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported.

docs/dyn/language_v1beta2.documents.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,13 @@ <h3>Method Details</h3>
356356
},
357357
&quot;encodingType&quot;: &quot;A String&quot;, # The encoding type used by the API to calculate offsets.
358358
&quot;features&quot;: { # All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 11 # Required. The enabled features.
359+
&quot;classificationModelOptions&quot;: { # Model options available for classification requests. # The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true.
360+
&quot;v1Model&quot;: { # Options for the V1 model. # Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.
361+
},
362+
&quot;v2Model&quot;: { # Options for the V2 model. # Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.
363+
&quot;contentCategoriesVersion&quot;: &quot;A String&quot;, # The content categories used for classification.
364+
},
365+
},
359366
&quot;classifyText&quot;: True or False, # Classify the full document into categories. If this is true, the API will use the default model which classifies into a [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories).
360367
&quot;extractDocumentSentiment&quot;: True or False, # Extract document-level sentiment.
361368
&quot;extractEntities&quot;: True or False, # Extract entities.
@@ -462,6 +469,13 @@ <h3>Method Details</h3>
462469
The object takes the form of:
463470

464471
{ # The document classification request message.
472+
&quot;classificationModelOptions&quot;: { # Model options available for classification requests. # Model options to use for classification. Defaults to v1 options if not specified.
473+
&quot;v1Model&quot;: { # Options for the V1 model. # Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.
474+
},
475+
&quot;v2Model&quot;: { # Options for the V2 model. # Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.
476+
&quot;contentCategoriesVersion&quot;: &quot;A String&quot;, # The content categories used for classification.
477+
},
478+
},
465479
&quot;document&quot;: { # ################################################################ # Represents the input to API methods. # Required. Input document.
466480
&quot;boilerplateHandling&quot;: &quot;A String&quot;, # Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content.
467481
&quot;content&quot;: &quot;A String&quot;, # The content of the input in string format. Cloud audit logging exempt since it is based on user data.

googleapiclient/discovery_cache/documents/language.v1.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
}
228228
}
229229
},
230-
"revision": "20220910",
230+
"revision": "20220916",
231231
"rootUrl": "https://language.googleapis.com/",
232232
"schemas": {
233233
"AnalyzeEntitiesRequest": {
@@ -511,10 +511,29 @@
511511
},
512512
"type": "object"
513513
},
514+
"ClassificationModelOptions": {
515+
"description": "Model options available for classification requests.",
516+
"id": "ClassificationModelOptions",
517+
"properties": {
518+
"v1Model": {
519+
"$ref": "V1Model",
520+
"description": "Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future."
521+
},
522+
"v2Model": {
523+
"$ref": "V2Model",
524+
"description": "Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model."
525+
}
526+
},
527+
"type": "object"
528+
},
514529
"ClassifyTextRequest": {
515530
"description": "The document classification request message.",
516531
"id": "ClassifyTextRequest",
517532
"properties": {
533+
"classificationModelOptions": {
534+
"$ref": "ClassificationModelOptions",
535+
"description": "Model options to use for classification. Defaults to v1 options if not specified."
536+
},
518537
"document": {
519538
"$ref": "Document",
520539
"description": "Required. Input document."
@@ -856,6 +875,10 @@
856875
"description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input.",
857876
"id": "Features",
858877
"properties": {
878+
"classificationModelOptions": {
879+
"$ref": "ClassificationModelOptions",
880+
"description": "The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true."
881+
},
859882
"classifyText": {
860883
"description": "Classify the full document into categories.",
861884
"type": "boolean"
@@ -1243,6 +1266,33 @@
12431266
}
12441267
},
12451268
"type": "object"
1269+
},
1270+
"V1Model": {
1271+
"description": "Options for the V1 model.",
1272+
"id": "V1Model",
1273+
"properties": {},
1274+
"type": "object"
1275+
},
1276+
"V2Model": {
1277+
"description": "Options for the V2 model.",
1278+
"id": "V2Model",
1279+
"properties": {
1280+
"contentCategoriesVersion": {
1281+
"description": "The content categories used for classification.",
1282+
"enum": [
1283+
"CONTENT_CATEGORIES_VERSION_UNSPECIFIED",
1284+
"V1",
1285+
"V2"
1286+
],
1287+
"enumDescriptions": [
1288+
"If `ContentCategoriesVersion` is not specified, this option will default to `V1`.",
1289+
"Legacy content categories of our initial launch in 2017.",
1290+
"Updated content categories in 2022."
1291+
],
1292+
"type": "string"
1293+
}
1294+
},
1295+
"type": "object"
12461296
}
12471297
},
12481298
"servicePath": "",

googleapiclient/discovery_cache/documents/language.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
}
190190
}
191191
},
192-
"revision": "20220910",
192+
"revision": "20220916",
193193
"rootUrl": "https://language.googleapis.com/",
194194
"schemas": {
195195
"AnalyzeEntitiesRequest": {

googleapiclient/discovery_cache/documents/language.v1beta2.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
}
228228
}
229229
},
230-
"revision": "20220910",
230+
"revision": "20220916",
231231
"rootUrl": "https://language.googleapis.com/",
232232
"schemas": {
233233
"AnalyzeEntitiesRequest": {
@@ -511,10 +511,29 @@
511511
},
512512
"type": "object"
513513
},
514+
"ClassificationModelOptions": {
515+
"description": "Model options available for classification requests.",
516+
"id": "ClassificationModelOptions",
517+
"properties": {
518+
"v1Model": {
519+
"$ref": "V1Model",
520+
"description": "Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future."
521+
},
522+
"v2Model": {
523+
"$ref": "V2Model",
524+
"description": "Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model."
525+
}
526+
},
527+
"type": "object"
528+
},
514529
"ClassifyTextRequest": {
515530
"description": "The document classification request message.",
516531
"id": "ClassifyTextRequest",
517532
"properties": {
533+
"classificationModelOptions": {
534+
"$ref": "ClassificationModelOptions",
535+
"description": "Model options to use for classification. Defaults to v1 options if not specified."
536+
},
518537
"document": {
519538
"$ref": "Document",
520539
"description": "Required. Input document."
@@ -874,6 +893,10 @@
874893
"description": "All available features for sentiment, syntax, and semantic analysis. Setting each one to true will enable that specific analysis for the input. Next ID: 11",
875894
"id": "Features",
876895
"properties": {
896+
"classificationModelOptions": {
897+
"$ref": "ClassificationModelOptions",
898+
"description": "The model options to use for classification. Defaults to v1 options if not specified. Only used if `classify_text` is set to true."
899+
},
877900
"classifyText": {
878901
"description": "Classify the full document into categories. If this is true, the API will use the default model which classifies into a [predefined taxonomy](https://cloud.google.com/natural-language/docs/categories).",
879902
"type": "boolean"
@@ -1261,6 +1284,33 @@
12611284
}
12621285
},
12631286
"type": "object"
1287+
},
1288+
"V1Model": {
1289+
"description": "Options for the V1 model.",
1290+
"id": "V1Model",
1291+
"properties": {},
1292+
"type": "object"
1293+
},
1294+
"V2Model": {
1295+
"description": "Options for the V2 model.",
1296+
"id": "V2Model",
1297+
"properties": {
1298+
"contentCategoriesVersion": {
1299+
"description": "The content categories used for classification.",
1300+
"enum": [
1301+
"CONTENT_CATEGORIES_VERSION_UNSPECIFIED",
1302+
"V1",
1303+
"V2"
1304+
],
1305+
"enumDescriptions": [
1306+
"If `ContentCategoriesVersion` is not specified, this option will default to `V1`.",
1307+
"Legacy content categories of our initial launch in 2017.",
1308+
"Updated content categories in 2022."
1309+
],
1310+
"type": "string"
1311+
}
1312+
},
1313+
"type": "object"
12641314
}
12651315
},
12661316
"servicePath": "",

0 commit comments

Comments
 (0)