Parameters
Parameter | Type | Description |
---|---|---|
texts | Union[str, List[str]] | Single text string or list of text strings to embed |
Returns
np.ndarray
: NumPy array of embeddings
- If single text: 1-D array of shape
(dimension,)
- If list of texts: 2-D array of shape
(num_texts, dimension)
Exceptions
RuntimeError
RuntimeError
- Throws if no embedding model is available
TypeError
TypeError
- Throws if embedding model type is not supported