Create a new UpstashVectorStore from a list of texts.
from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
ids: Optional[List[str]] = None,
embedding_chunk_size: int = 1000,
batch_size: int = 32,
text_key: str = 'text',
index: Optional[Index] = None,
async_index: Optional[AsyncIndex] = None,
index_url: Optional[str] = None,
index_token: Optional[str] = None,
*,
namespace: str = '',
**kwargs: Any = {}
) -> UpstashVectorStoreExample:
.. code-block:: python from langchain_community.vectorstores.upstash import UpstashVectorStore from langchain_community.embeddings import OpenAIEmbeddings
embeddings = OpenAIEmbeddings() vector_store = UpstashVectorStore.from_texts( texts, embeddings, )