Optional
fields: GooglePaLMEmbeddingsParamsOptional
apiGoogle Palm API key to use
The async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.
Model Name to use
Note: The format must follow the pattern - models/{model}
Model Name to use
Alias for model
Note: The format must follow the pattern - models/{model}
Method that takes an array of documents as input and returns a promise that resolves to a 2D array of embeddings for each document. It calls the _embedText method for each document in the array.
Array of documents for which to generate embeddings.
Promise that resolves to a 2D array of embeddings for each input document.
Method that takes a document as input and returns a promise that resolves to an embedding for the document. It calls the _embedText method with the document as the input.
Document for which to generate an embedding.
Promise that resolves to an embedding for the input document.
Deprecated
Class that extends the Embeddings class and provides methods for generating embeddings using the Google Palm API.
Example