Skip to Content

encodeChunkVector

encodeChunkVector(vector: ArrayLike<number>): string

Defined in: src/lib/memoryEngine/vectorEncoding.ts:14 

Encode an embedding as base64 float32 for storage.

Not yet called by the write path — see the rollout note above. Values are narrowed to float32 first, which is lossless for anything generateEmbeddings produced and is what makes the decode byte-exact.

Parameters

ParameterType

vector

ArrayLike<number>

Returns

string

Last updated on