3 ms·
``` def embed_documents(self, texts: List[str]) -> List[List[float]]: texts = list(map(lambda x: x.replace("\n", " "), texts)) embeddings = self.clien
by hcks 3y ago
```
def embed_documents(self, texts: List[str]) -> List[List[float]]:
texts = list(map(lambda x: x.replace("\n", " "), texts))
embeddings = self.client.encode(texts, \*self.encode_kwargs)
return embeddings.tolist()
```