Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/tools / / ToolSearchEmbedder

Interface: ToolSearchEmbedder ​

Defined in: packages/tools/src/registry/types.ts:119

Stable

Pluggable embedder hook used by the semantic stage of ToolRegistry.searchDeferred. The agent runtime supplies an implementation backed by the configured embedder (default per the memory subsystem); the registry falls through to the BM25 stage if the hook is undefined OR returns null for a given query.

Methods ​

dim() ​

ts
dim(): number;

Defined in: packages/tools/src/registry/types.ts:123

Output dimensionality.

Returns ​

number


embed() ​

ts
embed(texts, signal?): Promise<readonly Float32Array<ArrayBufferLike>[]>;

Defined in: packages/tools/src/registry/types.ts:125

Embed a batch of strings.

Parameters ​

ParameterType
textsreadonly string[]
signal?AbortSignal

Returns ​

Promise<readonly Float32Array&lt;ArrayBufferLike&gt;[]>


id() ​

ts
id(): string;

Defined in: packages/tools/src/registry/types.ts:121

Stable identifier surfaced through the cache key.

Returns ​

string