Optional
fields: GoogleVertexAIEmbeddingsParamsThe async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.
Model to use
Takes an array of documents as input and returns a promise that resolves to a 2D array of embeddings for each document. It splits the documents into chunks and makes requests to the Google Vertex AI API to generate embeddings.
An array of documents to be embedded.
A promise that resolves to a 2D array of embeddings for each document.
Takes a document as input and returns a promise that resolves to an embedding for the document. It calls the embedDocuments method with the document as the input.
A document to be embedded.
A promise that resolves to an embedding for the document.
Generated using TypeDoc
Enables calls to the Google Cloud's Vertex AI API to access the embeddings generated by Large Language Models.
To use, you will need to have one of the following authentication methods in place:
GOOGLE_APPLICATION_CREDENTIALS
environment variable is set to the path of a credentials file for a service account permitted to the Google Cloud project using Vertex AI.Example