Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/embedder-transformersjs / FeatureExtractor
Type Alias: FeatureExtractor
ts
type FeatureExtractor = (texts, options?) => Promise<{
data: Float32Array;
dims: readonly number[];
tolist?: unknown;
}>;Defined in: packages/embedder-transformersjs/src/index.ts:74
Internal
Tiny structural shape of @huggingface/transformers' feature- extraction pipeline used by this package. Declared inline so the embedder does not import the heavy peer at build time.
Parameters
| Parameter | Type |
|---|---|
texts | string | readonly string[] |
options? | { normalize?: boolean; pooling?: Pooling; signal?: AbortSignal; } |
options.normalize? | boolean |
options.pooling? | Pooling |
options.signal? | AbortSignal |
Returns
Promise<{ data: Float32Array; dims: readonly number[]; tolist?: unknown; }>