def for_chat_completion(
        cls,
        formatting_func: Callable[
            [Dict[str, Any]], Union[None, Tuple[str, str, str, str], Iterator[Tuple[str, str, str, str]]]
        ],
    ) -> "TrainingTaskForChatCompletion":
        """Training data for chat completion
        Args:
            formatting_func: A formatting function converting a dictionary of records into zero,
                one or more chat-turn-role-content text tuples.

        Examples:
            >>> from argilla_v1 import TrainingTaskForChatCompletion
            >>> dataset = rg.FeedbackDataset.from_argilla(name="...")
            >>> def formatting_func(sample: Dict[str, Any]):
            ...     from uuid import uuid4
            ...     chat_id = str(uuid4())
            ...     if sample["response"]:
            ...         chat = str(uuid4())
            ...         user_message = sample["prompt"][0]["value"]
            ...         system_message = sample["response"][0]["value"]
            ...         yield [(chat, "0", "user", user_message), (chat, "1", "assistant", system_message)]
            >>> task = TrainingTaskForChatCompletion(formatting_func=formatting_func)
            >>> dataset.prepare_for_training(framework="...", task=task)
        """
        return TrainingTaskForChatCompletion(formatting_func=formatting_func)
Training data for chat completion
        Args:
            formatting_func: A formatting function converting a dictionary of records into zero,
                one or more chat-turn-role-content text tuples.

        Examples:
            >>> from argilla_v1 import TrainingTaskForChatCompletion
            >>> dataset = rg.FeedbackDataset.from_argilla(name="...")
            >>> def formatting_func(sample: Dict[str, Any]):
            ...     from uuid import uuid4
            ...     chat_id = str(uuid4())
            ...     if sample["response"]:
            ...         chat = str(uuid4())
            ...         user_message = sample["prompt"][0]["value"]
            ...         system_message = sample["response"][0]["value"]
            ...         yield [(chat, "0", "user", user_message), (chat, "1", "assistant", system_message)]
            >>> task = TrainingTaskForChatCompletion(formatting_func=formatting_func)
            >>> dataset.prepare_for_training(framework="...", task=task)
        
argilla-v1/src/argilla_v1/client/feedback/training/schemas/base.py