Class Chunk
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
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.
public class Chunk
- Inheritance
-
Chunk
- Inherited Members
- Extension Methods
Properties
CreateTime
Output only. The Timestamp of when the Chunk was created.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted.
Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[JsonPropertyName("createTime")]
public Timestamp? CreateTime { get; set; }
Property Value
CustomMetadata
User provided custom metadata stored as key-value pairs. The maximum number of CustomMetadata per chunk is 20.
[JsonPropertyName("customMetadata")]
public List<CustomMetadata>? CustomMetadata { get; set; }
Property Value
Data
The content for the Chunk, such as the text string. The maximum number of tokens per chunk is 2043.
[JsonPropertyName("data")]
public ChunkData? Data { get; set; }
Property Value
Name
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
[JsonPropertyName("name")]
public string? Name { get; set; }
Property Value
State
Output only. Current state of the Chunk.
[JsonPropertyName("state")]
public ChunkState? State { get; set; }
Property Value
UpdateTime
Output only. The Timestamp of when the Chunk was last updated.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted.
Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[JsonPropertyName("updateTime")]
public Timestamp? UpdateTime { get; set; }