Langchain (Python)
get_embeddings(texts: Union[str, List[str]]) -> np.ndarray
texts
Union[str, List[str]]
np.ndarray
(dimension,)
(num_texts, dimension)
RuntimeError
TypeError
# Single text embedding embedding = store.get_embeddings("Hello, world!") print(f"Embedding shape: {embedding.shape}") # (384,) # Multiple text embeddings texts = ["First document", "Second document", "Third document"] embeddings = store.get_embeddings(texts) print(f"Embeddings shape: {embeddings.shape}") # (3, 384)
Was this page helpful?