Skip to content

Commit 22932cd

Browse files
committed
readme for bulk enqueue
1 parent 00d5fd5 commit 22932cd

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,39 @@ or manually:
4242
dpr --mode=client --args='{"prompt":"Why is the sky blue?"}' --metadata='{"type":"manpage","category":"science"}'
4343
```
4444

45+
### Bulk Enqueue Jobs
46+
47+
To enqueue multiple jobs at once from a JSON file:
48+
49+
```sh
50+
dpr --mode=client --bulk-from-file=queue_items.json
51+
```
52+
53+
The JSON file should be an array of job objects:
54+
55+
```json
56+
[
57+
{
58+
"args": {
59+
"prompt": "Why is the sky blue?"
60+
},
61+
"metadata": {
62+
"type": "test",
63+
"category": "science"
64+
}
65+
},
66+
{
67+
"args": {
68+
"prompt": "What is the capital of France?"
69+
},
70+
"metadata": {
71+
"type": "test",
72+
"category": "geography"
73+
}
74+
}
75+
]
76+
```
77+
4578
## Useful Ollama Commands
4679

4780
- **Run Ollama server:**

bulk_jobs_sample.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
{
3+
"args": {
4+
"prompt": "Why is the sky blue?"
5+
},
6+
"metadata": {
7+
"type": "test",
8+
"category": "",
9+
"filename": ""
10+
}
11+
},
12+
{
13+
"args": {
14+
"prompt": "What is the capital of France?"
15+
},
16+
"metadata": {
17+
"type": "test",
18+
"category": "",
19+
"filename": ""
20+
}
21+
}
22+
]

0 commit comments

Comments
 (0)