Loading...
Skip to main content

Interface: EmbeddedChunk<ChunkMetadata>

batteries/docs.EmbeddedChunk

A piece of a document that is ready to be added into a vector space.

Type parameters

NameType
ChunkMetadataextends Jsonifiable = Jsonifiable

Properties

content

content: string

The content of this chunk. This is what is provided as context to an LLM when the chunk is selected.

Defined in

ai-jsx/src/batteries/docs.tsx:378


vector

vector: number[]

The vector representing this chunk for semantic nearest neighbors.

Defined in

ai-jsx/src/batteries/docs.tsx:372


documentName

Optional documentName: string

The name of the document from which this chunk was extracted.

Defined in

ai-jsx/src/batteries/docs.tsx:381


id

Optional id: string

The identifier for this chunk. When adding this object to a vector database, this field will be generated if not populated.

Defined in

ai-jsx/src/batteries/docs.tsx:369


metadata

Optional metadata: ChunkMetadata

Optional additional metadata associated with this chunk.

Defined in

ai-jsx/src/batteries/docs.tsx:384