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: Update the records by encoding fields with vectors.
  
  Args:
      records (List[Union[FeedbackRecord, RemoteFeedbackRecord]]): The records to update.
      fields (Optional[List[str]]): The fields to update. If None, use all available fields.
      overwrite (Optional[bool]): Whether to overwrite existing vectors. If None, use the value from
          the parent method. Defaults to None.
      **kwargs: Additional keyword arguments for encoding with sentence-transformers.
  
  Returns:
      List[Union[FeedbackRecord, RemoteFeedbackRecord]]: The updated records.
  
  Examples:
  >>> from argilla.client.feedback.integrations.sentencetransformers import SentenceTransformersExtractor
  >>> records = [rg.FeedbackRecord(fields={"text": "This is a test."})]
  >>> tde = SentenceTransformersExtractor()
  >>> updated_records = tde.update_records(records)
docstr_tok: ["Update","the","records","by","encoding","fields","with","vectors",".","Args",":","records","(","List","[","Union","[","FeedbackRecord",",","RemoteFeedbackRecord","]","]",")",":","The","records","to","update",".","fields","(","Optional","[","List","[","str","]","]",")",":","The","fields","to","update",".","If","None",",","use","all","available","fields",".","overwrite","(","Optional","[","bool","]",")",":","Whether","to","overwrite","existing","vectors",".","If","None",",","use","the","value","from","the","parent","method",".","Defaults","to","None",".","*","*","kwargs",":","Additional","keyword","arguments","for","encoding","with","sentence-transformers",".","Returns",":","List","[","Union","[","FeedbackRecord",",","RemoteFeedbackRecord","]","]",":","The","updated","records",".","Examples",":",">",">",">","from","argilla.client.feedback.integrations.sentencetransformers","import","SentenceTransformersExtractor",">",">",">","records","=","[","rg.FeedbackRecord","(","fields=","{","``","text","''",":","``","This","is","a","test",".","''","}",")","]",">",">",">","tde","=","SentenceTransformersExtractor","(",")",">",">",">","updated_records","=","tde.update_records","(","records",")"]
code: def update_records(
      self,
      records: List[Union[FeedbackRecord, RemoteFeedbackRecord]],
      fields: Optional[List[str]] = None,
      overwrite: Optional[bool] = False,
      **kwargs,
  ) -> List[Union[FeedbackRecord, RemoteFeedbackRecord]]:
      """
      Update the records by encoding fields with vectors.
  
      Args:
          records (List[Union[FeedbackRecord, RemoteFeedbackRecord]]): The records to update.
          fields (Optional[List[str]]): The fields to update. If None, use all available fields.
          overwrite (Optional[bool]): Whether to overwrite existing vectors. If None, use the value from
              the parent method. Defaults to None.
          **kwargs: Additional keyword arguments for encoding with sentence-transformers.
  
      Returns:
          List[Union[FeedbackRecord, RemoteFeedbackRecord]]: The updated records.
  
      Examples:
      >>> from argilla.client.feedback.integrations.sentencetransformers import SentenceTransformersExtractor
      >>> records = [rg.FeedbackRecord(fields={"text": "This is a test."})]
      >>> tde = SentenceTransformersExtractor()
      >>> updated_records = tde.update_records(records)
      """
      available_fields = set()
      # unwrap potential records from RemoteFeedbackDataset
      modified_records = []
      for rec in records:
          modified_records.append(rec)
          for key in rec.fields:
              available_fields.add(key)
      if fields is None:
          fields = list(available_fields)
      # encode fields
      for field in fields:
          modified_records = self._encode_single_field(
              modified_records, field, overwrite, **kwargs
          )
      return modified_records
  
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 4 for calling the SentenceTransformersExtractor obj's underlying member method code with example usage: obj.update_records(records, fields, overwrite) and returns: modified_records