Class: Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata

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

Overview

Grounding details for text sources.

Defined Under Namespace

Classes: Reference, Segment, VisualSegment

Instance Attribute Summary collapse

Instance Attribute Details

#references::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference>

Returns References for the grounded text.



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 301

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

  # Grounding information for a segment of the text.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Zero-based index indicating the start of the segment, measured in bytes
  #     of a UTF-8 string (i.e. characters encoded on multiple bytes have a
  #     length of more than one).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the segment, exclusive.
  # @!attribute [rw] reference_indices
  #   @return [::Array<::Integer>]
  #     References for the segment.
  # @!attribute [rw] grounding_score
  #   @return [::Float]
  #     Score for the segment.
  # @!attribute [rw] text
  #   @return [::String]
  #     The text segment itself.
  class Segment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Grounding information for a visual segment.
  # @!attribute [rw] reference_indices
  #   @return [::Array<::Integer>]
  #     References for the visual segment.
  # @!attribute [rw] content_id
  #   @return [::String]
  #     The content id of the visual segment. In order to display the citation
  #     of the visual element, this content_id needs to match with the
  #     `grounded_content.content_metadata.content_id` field.
  class VisualSegment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Referenced content and related document metadata.
  # @!attribute [rw] content
  #   @return [::String]
  #     Referenced text content.
  # @!attribute [rw] code_snippet
  #   @return [::String]
  #     Chunk of code snippet from the referenced document.
  # @!attribute [rw] document_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata]
  #     Document metadata.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Document metadata.
    # @!attribute [rw] language
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata::Language]
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document. It may contain a URL that redirects to the
    #     actual website.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    # @!attribute [rw] domain
    #   @return [::String]
    #     Domain name from the document URI. Note that the `uri` field may
    #     contain a URL that redirects to the actual website, in which case
    #     this will contain the domain name of the target site.
    # @!attribute [rw] mime_type
    #   @return [::String]
    #     The mime type of the document.
    #     https://www.iana.org/assignments/media-types/media-types.xhtml.
    class DocumentMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Language of the referenced content. For now, it is only used for
      # code.
      module Language
        LANGUAGE_UNSPECIFIED = 0

        PYTHON = 1

        SQL = 2
      end
    end
  end
end

#segments::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Segment>

Returns Grounding information for parts of the text.

Returns:



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 301

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

  # Grounding information for a segment of the text.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Zero-based index indicating the start of the segment, measured in bytes
  #     of a UTF-8 string (i.e. characters encoded on multiple bytes have a
  #     length of more than one).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the segment, exclusive.
  # @!attribute [rw] reference_indices
  #   @return [::Array<::Integer>]
  #     References for the segment.
  # @!attribute [rw] grounding_score
  #   @return [::Float]
  #     Score for the segment.
  # @!attribute [rw] text
  #   @return [::String]
  #     The text segment itself.
  class Segment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Grounding information for a visual segment.
  # @!attribute [rw] reference_indices
  #   @return [::Array<::Integer>]
  #     References for the visual segment.
  # @!attribute [rw] content_id
  #   @return [::String]
  #     The content id of the visual segment. In order to display the citation
  #     of the visual element, this content_id needs to match with the
  #     `grounded_content.content_metadata.content_id` field.
  class VisualSegment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Referenced content and related document metadata.
  # @!attribute [rw] content
  #   @return [::String]
  #     Referenced text content.
  # @!attribute [rw] code_snippet
  #   @return [::String]
  #     Chunk of code snippet from the referenced document.
  # @!attribute [rw] document_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata]
  #     Document metadata.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Document metadata.
    # @!attribute [rw] language
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata::Language]
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document. It may contain a URL that redirects to the
    #     actual website.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    # @!attribute [rw] domain
    #   @return [::String]
    #     Domain name from the document URI. Note that the `uri` field may
    #     contain a URL that redirects to the actual website, in which case
    #     this will contain the domain name of the target site.
    # @!attribute [rw] mime_type
    #   @return [::String]
    #     The mime type of the document.
    #     https://www.iana.org/assignments/media-types/media-types.xhtml.
    class DocumentMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Language of the referenced content. For now, it is only used for
      # code.
      module Language
        LANGUAGE_UNSPECIFIED = 0

        PYTHON = 1

        SQL = 2
      end
    end
  end
end

#visual_segments::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::VisualSegment>

Returns Grounding information for parts of the visual content.

Returns:



301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 301

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

  # Grounding information for a segment of the text.
  # @!attribute [rw] start_index
  #   @return [::Integer]
  #     Zero-based index indicating the start of the segment, measured in bytes
  #     of a UTF-8 string (i.e. characters encoded on multiple bytes have a
  #     length of more than one).
  # @!attribute [rw] end_index
  #   @return [::Integer]
  #     End of the segment, exclusive.
  # @!attribute [rw] reference_indices
  #   @return [::Array<::Integer>]
  #     References for the segment.
  # @!attribute [rw] grounding_score
  #   @return [::Float]
  #     Score for the segment.
  # @!attribute [rw] text
  #   @return [::String]
  #     The text segment itself.
  class Segment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Grounding information for a visual segment.
  # @!attribute [rw] reference_indices
  #   @return [::Array<::Integer>]
  #     References for the visual segment.
  # @!attribute [rw] content_id
  #   @return [::String]
  #     The content id of the visual segment. In order to display the citation
  #     of the visual element, this content_id needs to match with the
  #     `grounded_content.content_metadata.content_id` field.
  class VisualSegment
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Referenced content and related document metadata.
  # @!attribute [rw] content
  #   @return [::String]
  #     Referenced text content.
  # @!attribute [rw] code_snippet
  #   @return [::String]
  #     Chunk of code snippet from the referenced document.
  # @!attribute [rw] document_metadata
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata]
  #     Document metadata.
  class Reference
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Document metadata.
    # @!attribute [rw] language
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistantGroundedContent::TextGroundingMetadata::Reference::DocumentMetadata::Language]
    # @!attribute [rw] document
    #   @return [::String]
    #     Document resource name.
    # @!attribute [rw] uri
    #   @return [::String]
    #     URI for the document. It may contain a URL that redirects to the
    #     actual website.
    # @!attribute [rw] title
    #   @return [::String]
    #     Title.
    # @!attribute [rw] page_identifier
    #   @return [::String]
    #     Page identifier.
    # @!attribute [rw] domain
    #   @return [::String]
    #     Domain name from the document URI. Note that the `uri` field may
    #     contain a URL that redirects to the actual website, in which case
    #     this will contain the domain name of the target site.
    # @!attribute [rw] mime_type
    #   @return [::String]
    #     The mime type of the document.
    #     https://www.iana.org/assignments/media-types/media-types.xhtml.
    class DocumentMetadata
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Language of the referenced content. For now, it is only used for
      # code.
      module Language
        LANGUAGE_UNSPECIFIED = 0

        PYTHON = 1

        SQL = 2
      end
    end
  end
end