Update README.md
Browse files
README.md
CHANGED
|
@@ -1,38 +1,42 @@
|
|
| 1 |
-
---
|
| 2 |
-
language: en
|
| 3 |
-
license: mit
|
| 4 |
-
---
|
| 5 |
-
Based on jokes from [v2.jokeapi.dev](https://v2.jokeapi.dev/). Teach your assistant better jokes.
|
| 6 |
-
|
| 7 |
-
Each instance follows this format:
|
| 8 |
-
```json
|
| 9 |
-
{
|
| 10 |
-
"messages": [
|
| 11 |
-
{
|
| 12 |
-
"role": "system",
|
| 13 |
-
"content": "You are a helpful assistant."
|
| 14 |
-
},
|
| 15 |
-
{
|
| 16 |
-
"role": "user",
|
| 17 |
-
"content": "what's a good joke?"
|
| 18 |
-
},
|
| 19 |
-
{
|
| 20 |
-
"role": "assistant",
|
| 21 |
-
"content": "What do Santa's little helpers learn at school? The elf-abet!"
|
| 22 |
-
}
|
| 23 |
-
],
|
| 24 |
-
"safe": true,
|
| 25 |
-
"category": "Christmas",
|
| 26 |
-
"nsfw": false,
|
| 27 |
-
"religious": false,
|
| 28 |
-
"racist": false,
|
| 29 |
-
"sexist": false,
|
| 30 |
-
"explicit": false
|
| 31 |
-
}
|
| 32 |
-
```
|
| 33 |
-
|
| 34 |
-
Use:
|
| 35 |
-
```json
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
---
|
| 5 |
+
Based on jokes from [v2.jokeapi.dev](https://v2.jokeapi.dev/). Teach your assistant better jokes.
|
| 6 |
+
|
| 7 |
+
Each instance follows this format:
|
| 8 |
+
```json
|
| 9 |
+
{
|
| 10 |
+
"messages": [
|
| 11 |
+
{
|
| 12 |
+
"role": "system",
|
| 13 |
+
"content": "You are a helpful assistant."
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"role": "user",
|
| 17 |
+
"content": "what's a good joke?"
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"role": "assistant",
|
| 21 |
+
"content": "What do Santa's little helpers learn at school? The elf-abet!"
|
| 22 |
+
}
|
| 23 |
+
],
|
| 24 |
+
"safe": true,
|
| 25 |
+
"category": "Christmas",
|
| 26 |
+
"nsfw": false,
|
| 27 |
+
"religious": false,
|
| 28 |
+
"racist": false,
|
| 29 |
+
"sexist": false,
|
| 30 |
+
"explicit": false
|
| 31 |
+
}
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Use:
|
| 35 |
+
```json
|
| 36 |
+
import json
|
| 37 |
+
import random
|
| 38 |
+
from datasets import load_dataset
|
| 39 |
+
dataset = load_dataset("kth8/jokes", split="train")
|
| 40 |
+
print(dataset)
|
| 41 |
+
print(json.dumps(dataset[random.randint(0, dataset.num_rows - 1)], indent=2))
|
| 42 |
```
|