def _add_texts(
        self,
        ids: Iterable[str],
        texts: Iterable[str],
        metadatas: Optional[List[dict]] = None,
        embeddings: Optional[List[List[float]]] = None,
        **kwargs: Any,
    ) -> List[str]:
        """
        Returns:
            List of ids from adding the texts into the vectorstore.

        """
        if embeddings is None:
            raise ValueError("embeddings is None")
        self._get_matadata_field(metadatas)
        dbs_list = self._vearch.list_dbs()
        if self.using_db_name not in dbs_list:
            create_db_code = self._vearch.create_db(self.using_db_name)
            if not create_db_code:
                raise ValueError("create db failed!!!")
        space_list = self._vearch.list_spaces(self.using_db_name)
        if self.using_table_name not in space_list:
            create_space_code = self._create_space(len(embeddings[0]))
            if not create_space_code:
                raise ValueError("create space failed!!!")
        docid = []
        if embeddings is not None and metadatas is not None:
            meta_field_list = [i["field"] for i in self.field_list]
            for text, metadata, embed, id_d in zip(texts, metadatas, embeddings, ids):
                profiles: typing.Dict[str, Any] = {}
                profiles["ref_doc_id"] = id_d
                profiles["text"] = text
                for f in meta_field_list:
                    profiles[f] = metadata[f]
                embed_np = np.array(embed)
                profiles["text_embedding"] = {
                    "feature": (embed_np / np.linalg.norm(embed_np)).tolist()
                }
                insert_res = self._vearch.insert_one(
                    self.using_db_name, self.using_table_name, profiles
                )
                if insert_res["status"] == 200:
                    docid.append(insert_res["_id"])
                    continue
                else:
                    retry_insert = self._vearch.insert_one(
                        self.using_db_name, self.using_table_name, profiles
                    )
                    docid.append(retry_insert["_id"])
                    continue
        return docid

        Returns:
            List of ids from adding the texts into the vectorstore.

        
llama-index-integrations/vector_stores/llama-index-vector-stores-vearch/llama_index/vector_stores/vearch/base.py