Return VectorStore initialized from documents. Note that Marqo does not
need embeddings, we retain the parameter to adhere to the Liskov substitution
principle.
Parameters
documents (List[Document]) – Input documents
embedding (Any, optional) – Embeddings (not required). Defaults to None.
Returns
A Marqo vectorstore
Return type
VectorStore
classmethod from_texts(texts: List[str], embedding: Any = None, metadatas: Optional[List[dict]] = None, index_name: str = '', url: str = 'http://localhost:8882', api_key: str = '', add_documents_settings: Optional[Dict[str, Any]] = None, searchable_attributes: Optional[List[str]] = None, page_content_builder: Optional[Callable[[Dict[str, str]], str]] = None, index_settings: Optional[Dict[str, Any]] = None, verbose: bool = True, **kwargs: Any) → Marqo[source]¶
Return Marqo initialized from texts. Note that Marqo does not need
embeddings, we retain the parameter to adhere to the Liskov
substitution principle.
This is a quick way to get started with marqo - simply provide your texts and
metadatas and this will create an instance of the data store and index the
provided data.
To know the ids of your documents with this approach you will need to include
them in under the key “_id” in your metadatas for each text
Example:
.. code-block:: python
from langchain.vectorstores import Marqo
datastore = Marqo(texts=[‘text’], index_name=’my-first-index’,
url=’http://localhost:8882’)
Parameters
texts (List[str]) – A list of texts to index into marqo upon creation.