def update_dataset(
        self,
        dataset: Union[FeedbackDataset, RemoteFeedbackDataset],
        fields: Optional[List[str]] = None,
        update_records: Optional[bool] = True,
        overwrite: Optional[bool] = False,
        **kwargs,
    ) -> Union[FeedbackDataset, RemoteFeedbackDataset]:
        """
        Update the dataset by encoding fields with vectors.

        Args:
            dataset (Union[FeedbackDataset, RemoteFeedbackDataset]): The dataset to update.
            fields (Optional[List[str]]): The fields to update. If None, use all available fields.
            update_records (bool): Whether to update the records with vectors. Defaults to True.
            overwrite (bool): Whether to overwrite existing vectors. Defaults to False.
            **kwargs: Additional keyword arguments for encoding with sentence-transformers.

        Returns:
            Union[FeedbackDataset, RemoteFeedbackDataset]: The updated dataset.

        Examples:
        >>> import argilla_v1 as rg
        >>> from argilla_v1.client.feedback.integrations.sentencetransformers import SentenceTransformersExtractor
        >>> dataset = rg.FeedbackDataset(...)
        >>> tde = SentenceTransformersExtractor()
        >>> updated_dataset = tde.update_dataset(dataset)
        """
        # If fields is None, use all fields
        if fields is None:
            fields = [field.name for field in dataset.fields]
        available_fields = [field.name for field in dataset.fields]
        if not all([field in available_fields for field in fields]):
            raise ValueError(f"Fields {fields} are not present in the dataset.")

        dataset = self._create_vector_settings(dataset=dataset, fields=fields, overwrite=overwrite)

        if update_records:
            records = self.update_records(records=dataset.records, fields=fields, overwrite=overwrite, **kwargs)
            if isinstance(dataset, RemoteFeedbackDataset):
                dataset.update_records(records)
        return dataset

        Update the dataset by encoding fields with vectors.

        Args:
            dataset (Union[FeedbackDataset, RemoteFeedbackDataset]): The dataset to update.
            fields (Optional[List[str]]): The fields to update. If None, use all available fields.
            update_records (bool): Whether to update the records with vectors. Defaults to True.
            overwrite (bool): Whether to overwrite existing vectors. Defaults to False.
            **kwargs: Additional keyword arguments for encoding with sentence-transformers.

        Returns:
            Union[FeedbackDataset, RemoteFeedbackDataset]: The updated dataset.

        Examples:
        >>> import argilla_v1 as rg
        >>> from argilla_v1.client.feedback.integrations.sentencetransformers import SentenceTransformersExtractor
        >>> dataset = rg.FeedbackDataset(...)
        >>> tde = SentenceTransformersExtractor()
        >>> updated_dataset = tde.update_dataset(dataset)
        
argilla-v1/src/argilla_v1/client/feedback/integrations/sentencetransformers.py