| --- |
| language: en |
| license: apache-2.0 |
| --- |
| Based on jokes from [v2.jokeapi.dev](https://v2.jokeapi.dev/). Teach your assistant better jokes. |
|
|
| Each instance follows this format: |
| ```json |
| { |
| "messages": [ |
| { |
| "role": "system", |
| "content": "You are a helpful assistant." |
| }, |
| { |
| "role": "user", |
| "content": "what's a good joke?" |
| }, |
| { |
| "role": "assistant", |
| "content": "What do Santa's little helpers learn at school? The elf-abet!" |
| } |
| ], |
| "safe": true, |
| "category": "Christmas", |
| "nsfw": false, |
| "religious": false, |
| "racist": false, |
| "sexist": false, |
| "explicit": false |
| } |
| ``` |
|
|
| Use: |
| ```json |
| import json |
| import random |
| from datasets import load_dataset |
| dataset = load_dataset("kth8/jokes", split="train") |
| print(dataset) |
| print(json.dumps(dataset[random.randint(0, dataset.num_rows - 1)], indent=2)) |
| ``` |