Construct Dingo wrapper from raw documents.
This is a user friendly interface that:
1. Embeds documents.
2. Adds the documents to a provided Dingo index
This is intended to be a quick way to get started.
Example:
.. code-block:: python
from langchain_community.vectorstores import Dingo
from langchain_community.embeddings import OpenAIEmbeddings
import dingodb
sss embeddings = OpenAIEmbeddings() dingo = Dingo.from_texts( texts, embeddings, index_name="langchain-demo" )
from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
ids: Optional[List[str]] = None,
text_key: str = 'text',
index_name: Optional[str] = None,
dimension: int = 1024,
client: Any = None,
host: List[str] = ['172.20.31.10:13000'],
user: str = 'root',
password: str = '123123',
batch_size: int = 500,
**kwargs: Any = {}
) -> Dingo