from clarifai.client.input import Inputs
            from google.protobuf.struct_pb2 import Struct
        except ImportError as e:
            raise ImportError(
                "Could not import clarifai python package. "
                "Please install it with `pip install clarifai`."
            ) from e
        ltexts = list(texts)
        length = len(ltexts)
        assert length > 0, "No texts provided to add to the vectorstore."
        if metadatas is not None:
            assert length == len(
                metadatas
            ), "Number of texts and metadatas should be the same."
        if ids is not None:
            assert len(ltexts) == len(
                ids
            ), "Number of text inputs and input ids should be the same."
        input_obj = Inputs(app_id=self._app_id, user_id=self._user_id)
        batch_size = 32
        input_job_ids = []
        for idx in range(0, length, batch_size):
            try:
                batch_texts = ltexts[idx : idx + batch_size]
                batch_metadatas = (
                    metadatas[idx : idx + batch_size] if metadatas else None
                )
                if batch_metadatas is not None:
                    meta_list = []
                    for meta in batch_metadatas:
                        meta_struct = Struct()
                        meta_struct.update(meta)
                        meta_list.append(meta_struct)
                if ids is None:
                    ids = [uuid.uuid4().hex for _ in range(len(batch_texts))]
                input_batch = [
                    input_obj.get_text_input(
                        input_id=ids[id],
                        raw_text=inp,
                        metadata=meta_list[id] if batch_metadatas else None,
                    )