def add(
        self,
        nodes: List[BaseNode],
        **add_kwargs: Any,
    ) -> List[str]:
        """
        Add nodes to index.

        Args:
            nodes: List[BaseNode]: list of nodes with embeddings

        """
        embeddings = np.array([node.get_embedding() for node in nodes])
        self._hnswlib_index.add_items(embeddings, **add_kwargs)
        index_size = self._hnswlib_index.get_current_count()
        return [str(id) for id in range(index_size - len(nodes), index_size)]

        Add nodes to index.

        Args:
            nodes: List[BaseNode]: list of nodes with embeddings

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