(examples)
| 23 | ) |
| 24 | |
| 25 | def apply_template(examples): |
| 26 | messages = examples["messages"] |
| 27 | text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=False) |
| 28 | return {"text": text} |
| 29 | |
| 30 | dataset = load_dataset("json", data_files="data/data_instruct_nav.json", split="train") |
| 31 | dataset = dataset.map(apply_template) |
nothing calls this directly
no outgoing calls
no test coverage detected