Interface LibrarySource

One source and its passages.

interface LibrarySource {
    sourceId: string;
    kind: string;
    tenantId: string;
    aclGroups: string[];
    folderId?: null | string;
    tags?: string[];
    title?: string;
    metadata?: Record<string, MetadataValue>;
    passages: {
        text: string;
        metadata?: Record<string, MetadataValue>;
    }[];
}

Properties

sourceId: string

Unique in the collection, for example session:<id>.

kind: string

The caller's kind of source, for example session or document.

tenantId: string
aclGroups: string[]

The groups that may see it; a principal sees it when in at least one.

folderId?: null | string
tags?: string[]
title?: string
metadata?: Record<string, MetadataValue>

Copied onto every passage. The keys the index writes come from the fields above alone: a folderId or title here, or in a passage's own metadata, is dropped.

passages: {
    text: string;
    metadata?: Record<string, MetadataValue>;
}[]

Type declaration