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_v1.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

        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_v1.client.feedback.integrations.sentencetransformers import SentenceTransformersExtractor
        >>> records = [rg.FeedbackRecord(fields={"text": "This is a test."})]
        >>> tde = SentenceTransformersExtractor()
        >>> updated_records = tde.update_records(records)
        
argilla-v1/src/argilla_v1/client/feedback/integrations/sentencetransformers.py