class_docstr: This class extracts a number of basic text descriptives from FeedbackDataset
  records using the TextDescriptives library and adds them as record metadata.
docstr: 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.
docstr_tok: ["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","."]
code: 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
  
file_path: argilla/src/argilla/client/feedback/integrations/sentencetransformers.py
imports: import warnings
  from typing import List, Optional, Union
  from argilla.client.feedback.dataset.local.dataset import FeedbackDataset
  from argilla.client.feedback.dataset.remote.dataset import RemoteFeedbackDataset
  from argilla.client.feedback.schemas.records import FeedbackRecord
  from argilla.client.feedback.schemas.remote.records import RemoteFeedbackRecord
  from argilla.client.feedback.schemas.vector_settings import VectorSettings
  from argilla.utils.dependency import require_dependencies
label_desc: Use image node_id 2 for calling the SentenceTransformersExtractor obj's underlying member method code with example usage: obj._create_vector_settings(dataset, fields, overwrite) and returns: dataset