Interface: MemoryByteCodec
Defined in: packages/kernl/src/memory/types.ts:77
Encoder that converts MemoryByte to IndexableByte with embeddings.
Extends
AsyncCodec<MemoryByte,IndexableByte>
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
decode | (val: IndexableByte) => Promise<MemoryByte> | Transform from output format to input format. | AsyncCodec.decode | packages/shared/dist/lib/codec.d.ts:36 |
encode | (val: MemoryByte) => Promise<IndexableByte> | Transform from input format to output format. | AsyncCodec.encode | packages/shared/dist/lib/codec.d.ts:32 |
Methods
embed()
embed(text: string): Promise<number[] | null>;Defined in: packages/kernl/src/memory/types.ts:83
Embed a text string.
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
Promise<number[] | null>
Embedding vector, or null if no embedder configured.