Compute embeddings for a list of input strings in batches synchronously.
Arguments: - model (str): The embedding model to use. - input (list[str]): List of input strings to embed. - batch_size (int): Number of inputs per batch. - verbose (bool): If True, display a progress bar. - **kwargs: Additional keyword arguments passed to embedding.
Returns:list: List of embedding vectors for each input string.
embeddings, responses = batch_embeddings( model="text-embedding-3-small",input=["First string to embed","Second string to embed","Third string to embed","Fourth string to embed", ], batch_size=2, verbose=False,)
Compute embeddings for a list of input strings in batches asynchronously.
Arguments: - model (str): The embedding model to use. - input (list[str]): List of input strings to embed. - batch_size (int): Number of inputs per batch. - verbose (bool): If True, display a progress bar. - **kwargs: Additional keyword arguments passed to async_embedding.
Returns:list: List of embedding vectors for each input string.
embeddings, responses =await async_batch_embeddings( model="text-embedding-3-small",input=["First string to embed","Second string to embed","Third string to embed","Fourth string to embed", ], batch_size=2, verbose=False,)