Chunk class final

A Chunk is a subpart of a Document that is treated as an independent unit for the purposes of vector representation and storage. A Corpus can have a maximum of 1 million Chunks.

Inheritance

Constructors

Chunk({String name = '', required ChunkData? data, List<CustomMetadata> customMetadata = const [], Timestamp? createTime, Timestamp? updateTime, Chunk_State state = Chunk_State.$default})
Chunk.fromJson(Object? j)
factory

Properties

createTime → Timestamp?
Output only. The Timestamp of when the Chunk was created.
final
customMetadata List<CustomMetadata>
Optional. User provided custom metadata stored as key-value pairs. The maximum number of CustomMetadata per chunk is 20.
final
data ChunkData?
Required. The content for the Chunk, such as the text string. The maximum number of tokens per chunk is 2043.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Immutable. Identifier. The Chunk resource name. The ID (name excluding the "corpora//documents//chunks/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a random 12-character unique ID will be generated. Example: corpora/{corpus_id}/documents/{document_id}/chunks/123a456b789c
final
qualifiedName String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Chunk_State
Output only. Current state of the Chunk.
final
updateTime → Timestamp?
Output only. The Timestamp of when the Chunk was last updated.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String