Class DocumentChunk (0.1.2)

DocumentChunk(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A DocumentChunk represents a piece of content from a Document][google.developers.knowledge.v1.Document] in the DeveloperKnowledge corpus. To fetch the entire document content, pass the parent to DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
parent str
Output only. Contains the resource name of the document this chunk is from. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets
id str
Output only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time.
content str
Output only. Contains the content of the document chunk.
document google.developer_knowledge_v1.types.Document
Output only. Represents metadata about the Document][google.developers.knowledge.v1.Document] this chunk is from. The DocumentView][google.developers.knowledge.v1.DocumentView] of this Document][google.developers.knowledge.v1.Document] message will be set to DOCUMENT_VIEW_BASIC. It is included here for convenience so that clients do not need to call DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] if they only need the metadata fields. Otherwise, clients should use DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] to fetch the full document content.
relevance_score float
Output only. Represents the relevance score of the chunk to the search query. Higher score indicates higher chunk relevance. The score is in range [0.0, 1.0]. This field is a member of oneof_ _relevance_score.