Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/reranker-transformersjs / PassageExtractor

Type Alias: PassageExtractor<TRecord>

ts
type PassageExtractor<TRecord> = (record) => string;

Defined in: packages/reranker-transformersjs/src/text-extraction.ts:47

Caller-supplied passage extractor. Receives the record + the surrounding metadata (kind, sensitivity, tags) and returns the passage to feed into the cross-encoder.

Type Parameters

Type ParameterDefault type
TRecord extends MemoryRecordMemoryRecord

Parameters

ParameterType
recordTRecord

Returns

string

Stable