def _encode_single_field(
        self, records: List[Union[RemoteFeedbackRecord, FeedbackRecord]], field: str, overwrite: bool, **kwargs
    ) -> List[Union[FeedbackRecord, RemoteFeedbackRecord]]:
        """
        Encode a single field in the records with vectors.

        Args:
            records (List[Union[RemoteFeedbackRecord, FeedbackRecord]]): The list of records to encode.
            field (str): The field to encode.
            overwrite (bool): Whether to overwrite existing vectors for the field.
            **kwargs: Additional keyword arguments.

        Returns:
            List[Union[FeedbackRecord, RemoteFeedbackRecord]]: The updated list of records.
        """
        texts = []
        idxs = []
        # only
        for idx, record in enumerate(records):
            text = record.fields.get(field)
            if text:
                if field in record.vectors:
                    if overwrite:
                        texts.append(text)
                        idxs.append(idx)
                    else:
                        continue
                else:
                    texts.append(text)
                    idxs.append(idx)
        vectors = self.model.encode(texts, show_progress_bar=self.show_progress, **kwargs)
        for idx, vector in zip(idxs, vectors):
            records[idx].vectors[field] = vector.tolist()
        return records

        Encode a single field in the records with vectors.

        Args:
            records (List[Union[RemoteFeedbackRecord, FeedbackRecord]]): The list of records to encode.
            field (str): The field to encode.
            overwrite (bool): Whether to overwrite existing vectors for the field.
            **kwargs: Additional keyword arguments.

        Returns:
            List[Union[FeedbackRecord, RemoteFeedbackRecord]]: The updated list of records.
        
argilla-v1/src/argilla_v1/client/feedback/integrations/sentencetransformers.py