from datasets import load_dataset # 1) Dataset yükle ds = load_dataset("AlicanKiraz0/Cybersecurity-Dataset-Fenrir-v2.0", split="train") # 2) Prompt-response formatına dönüştür def format_example(example): system = example.get("system", "") user = example.get("user", "") assistant = example.get("assistant", "") text = f"<|system|>\n{system}\n<|user|>\n{user}\n<|assistant|>\n{assistant}" return {"text": text} ds = ds.map(format_example, remove_columns=ds.column_names) print(ds[0])