Skip to main content

Interface: Snippet

Defined in: packages/agentos/src/cognition/library/tokens.ts:42

Where a query's words first begin a word of a text, and the text around that place, for a search hit.

Properties​

at​

at: number

Defined in: packages/agentos/src/cognition/library/tokens.ts:44

Where in the text the first word that begins with a query word starts, or -1 when none does.


text​

text: string

Defined in: packages/agentos/src/cognition/library/tokens.ts:51

Whole words around that word, white space collapsed: from just after the last white space (a space, a tab or a line break) at or before before characters ahead of it (or from the text's start) to the first white space at or after after characters past its start (or to the text's end). A text with no white space, as Chinese and Japanese are written, comes back whole.