Class: Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1/search_service.rb

Overview

Summary of the top N search results specified by the summary spec.

Defined Under Namespace

Modules: SummarySkippedReason Classes: Citation, CitationMetadata, CitationSource, Reference, SafetyAttributes, SummaryWithMetadata

Instance Attribute Summary collapse

Instance Attribute Details

#safety_attributes::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes

Returns A collection of Safety Attribute categories and their associated confidence scores.

Returns:



1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1227

class Summary
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end

#summary_skipped_reasons::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>

Returns Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.

Returns:



1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1227

class Summary
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end

#summary_text::String

Returns The summary content.

Returns:

  • (::String)

    The summary content.



1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1227

class Summary
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end

#summary_with_metadata::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata

Returns Summary with metadata information.



1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1227

class Summary
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Safety Attribute categories and their associated confidence scores.
  # @!attribute [rw] categories
  #   @return [::Array<::String>]
  #     The display names of Safety Attribute categories associated with the
  #     generated content. Order matches the Scores.
  # @!attribute [rw] scores
  #   @return [::Array<::Float>]
  #     The confidence scores of the each category, higher
  #     value means higher confidence. Order matches the Categories.
  class SafetyAttributes
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation metadata.
  # @!attribute [rw] citations
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>]
  #     Citations for segments.
  class CitationMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation info for a segment.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Index indicates the start of the segment, measured in bytes/unicode.
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the attributed segment, exclusive.
  # @!attribute [rw] sources
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>]
  #     Citation sources for the attributed segment.
  class Citation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Citation source.
  # @!attribute [rw] reference_index
  #   @return [::Integer]
  #     Document reference index from SummaryWithMetadata.references.
  #     It is 0-indexed and the value will be zero if the reference_index is
  #     not set explicitly.
  class CitationSource
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Document reference.
  # @!attribute [rw] title
  #   @return [::String]
  #     Title of the document.
  # @!attribute [rw] document
  #   @return [::String]
  #     Required.
  #     {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the
  #     document. Full resource name of the referenced document, in the format
  #     `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
  # @!attribute [rw] uri
  #   @return [::String]
  #     Cloud Storage or HTTP uri for the document.
  # @!attribute [rw] chunk_contents
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>]
  #     List of cited chunk contents derived from document content.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Chunk content.
    # @!attribute [rw] content
    #   @return [::String]
    #     Chunk textual content.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    class ChunkContent
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Summary with metadata information.
  # @!attribute [rw] summary
  #   @return [::String]
  #     Summary text with no citation information.
  # @!attribute [rw] citation_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata]
  #     Citation metadata for given summary.
  # @!attribute [rw] references
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>]
  #     Document References.
  class SummaryWithMetadata
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # An Enum for summary-skipped reasons.
  module SummarySkippedReason
    # Default value. The summary skipped reason is not specified.
    SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0

    # The adversarial query ignored case.
    #
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
    # is set to `true`.
    ADVERSARIAL_QUERY_IGNORED = 1

    # The non-summary seeking query ignored case.
    #
    # Google skips the summary if the query is chit chat.
    # Only used when
    # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED = 2

    # The out-of-domain query ignored case.
    #
    # Google skips the summary if there are no high-relevance search results.
    # For example, the data store contains facts about company A but the
    # user query is asking questions about company B.
    OUT_OF_DOMAIN_QUERY_IGNORED = 3

    # The potential policy violation case.
    #
    # Google skips the summary if there is a potential policy violation
    # detected. This includes content that may be violent or toxic.
    POTENTIAL_POLICY_VIOLATION = 4

    # The LLM addon not enabled case.
    #
    # Google skips the summary if the LLM addon is not enabled.
    LLM_ADDON_NOT_ENABLED = 5

    # The no relevant content case.
    #
    # Google skips the summary if there is no relevant content in the
    # retrieved search results.
    NO_RELEVANT_CONTENT = 6

    # The jail-breaking query ignored case.
    #
    # For example, "Reply in the tone of a competing company's CEO".
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
    # is set to `true`.
    JAIL_BREAKING_QUERY_IGNORED = 7

    # The customer policy violation case.
    #
    # Google skips the summary if there is a customer policy violation
    # detected. The policy is defined by the customer.
    CUSTOMER_POLICY_VIOLATION = 8

    # The non-answer seeking query ignored case.
    #
    # Google skips the summary if the query doesn't have clear intent.
    # Only used when
    # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
    # is set to `true`.
    NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9

    # The time out case.
    #
    # Google skips the summary if the time out.
    TIME_OUT = 10
  end
end