Optional
apiThe Prem API key to use for requests.
Optional
encoding_The model to generate the embeddings.
The ID of the project to use.
Method to generate embeddings for an array of documents. Splits the documents into batches and makes requests to the Prem API to generate embeddings.
Array of documents to generate embeddings for.
Promise that resolves to a 2D array of embeddings for each document.
Method to generate an embedding for a single document. Calls the embedDocuments method with the document as the input.
Document to generate an embedding for.
Promise that resolves to an embedding for the document.
Class for generating embeddings using the Prem AI's API. Extends the Embeddings class and implements PremEmbeddingsParams and