Create an DocArrayHnswSearch store and insert data.
from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
work_dir: Optional[str] = None,
n_dim: Optional[int] = None,
**kwargs: Any = {}
) -> DocArrayHnswSearch| Name | Type | Description |
|---|---|---|
texts* | List[str] | Text data. |
embedding* | Embeddings | Embedding function. |
metadatas | Optional[List[dict]] | Default: NoneMetadata for each text if it exists. Defaults to None. |
work_dir | str | Default: Nonepath to the location where all the data will be stored. |
n_dim | int | Default: Nonedimension of an embedding. |
**kwargs | Any | Default: {}Other keyword arguments to be passed to the init method. |