def _create_vector_settings(
        self,
        dataset: Union[FeedbackDataset, RemoteFeedbackDataset],
        fields: List[str],
        overwrite: bool = False,
    ) -> Union[FeedbackDataset, RemoteFeedbackDataset]:
        """
        Create or update vector settings for the given dataset.

        Args:
            dataset (Union[FeedbackDataset, RemoteFeedbackDataset]): The dataset to create or update vector settings for.
            fields (List[str]): The list of fields to create or update vector settings for.
            overwrite (bool, optional): Whether to overwrite existing vector settings if they have different dimensions. Defaults to False.

        Returns:
            Union[FeedbackDataset, RemoteFeedbackDataset]: The dataset with updated vector settings.
        """
        available_vector_settings = [setting.name for setting in dataset.vectors_settings]
        for field in fields:
            if field in available_vector_settings:
                setting = dataset.vector_settings_by_name(field)
                if overwrite:
                    if setting.dimensions != self.embedding_dim:
                        dataset.delete_vectors_settings(field)
                        dataset.add_vector_settings(
                            VectorSettings(
                                name=field,
                                dimensions=self.embedding_dim,
                            )
                        )
                else:
                    if setting.dimensions != self.embedding_dim:
                        raise ValueError(
                            f"Field {field} has a different embedding dimension ({dataset.vectors_settings[field].dimensions}) than the provided model ({self.embedding_dim})."
                        )
            else:
                dataset.add_vector_settings(
                    VectorSettings(
                        name=field,
                        dimensions=self.embedding_dim,
                    )
                )
        return dataset

        Create or update vector settings for the given dataset.

        Args:
            dataset (Union[FeedbackDataset, RemoteFeedbackDataset]): The dataset to create or update vector settings for.
            fields (List[str]): The list of fields to create or update vector settings for.
            overwrite (bool, optional): Whether to overwrite existing vector settings if they have different dimensions. Defaults to False.

        Returns:
            Union[FeedbackDataset, RemoteFeedbackDataset]: The dataset with updated vector settings.
        
argilla-v1/src/argilla_v1/client/feedback/integrations/sentencetransformers.py