Optional
params: SyntheticEmbeddingsParamsThe async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.
Generates a synthetic embedding for a document. The document is converted into chunks, a numerical value is calculated for each chunk, and an array of these values is returned as the embedding.
The document to generate an embedding for.
A promise that resolves with a synthetic embedding for the document.
A class that provides synthetic embeddings by overriding the embedDocuments and embedQuery methods to generate embeddings based on the input documents. The embeddings are generated by converting each document into chunks, calculating a numerical value for each chunk, and returning an array of these values as the embedding.