ReferenceAsk
Remy Reference/agent/dataSources.passages
?

dataSources.passages

Returns one page of every passage matching a filter, unranked, with a cursor for the next page.
DataSource.passages(options?) → DataSourcePassagePage

Lists the passages that match a filter, without ranking them. search stops at its top results and count returns a number. passages returns everything: every passage that mentions an entity, every passage holding a phrase, every chunk of a set of documents. Passages come document by document, in order within each document. Pass nextCursor back to get the next page; it is null after the last. limit defaults to 50, at most 200.

Parameters
filter
SearchFilter
Which passages to list. Omit to list the whole corpus.
cursor
string | null
The previous page's nextCursor; omit for the first page.
limit
number
Passages per page. Defaults to 50, at most 200.
Every passage about an asset
let cursor: string | null = null;
do {
  const page = await Manuals.passages({ filter: { entities: ['P-1004A'] }, cursor });
  mentions.push(...page.passages.map((p) => p.citation));
  cursor = page.nextCursor;
} while (cursor);