Provider Adapters
embed()
Convert text into the numeric vector MemoGrafter uses for semantic topic and memory matching.
What it does
Convert text into the numeric vector MemoGrafter uses for semantic topic and memory matching.
Pass the adapter into MemoGrafter configuration so the rest of the memory pipeline remains independent of the provider SDK.
Signature
TypeScript
embed(text: string): Promise<number[]>Parameters
text (string) — Raw text to analyze and convert into memories.Result
The number of records changed by the operation.
Example
example.ts
const vector = await embedder.embed("memory text");