Skip to main content

Interface: Document<DocumentMetadata>

batteries/docs.Document

A text document that can be used to ground responses.

Type parameters

NameType
DocumentMetadataextends Jsonifiable = Jsonifiable

Properties

pageContent

Readonly pageContent: string[]

The content of the document. While this may often be a singleton, including separate meaningful pieces of text can aid in chunking/embedding.

Defined in

packages/ai-jsx/src/batteries/docs.tsx:52


metadata

Optional Readonly metadata: DocumentMetadata

Other metadata about the document, such as when it was created.

Defined in

packages/ai-jsx/src/batteries/docs.tsx:61


name

Optional Readonly name: string

A human-readable name for this document. This identifies the document to users and should be unique within a corpus. If the document is hosted on the web, its URL is a good choice.

Defined in

packages/ai-jsx/src/batteries/docs.tsx:57