Skip to content

Commit bcf71f1

Browse files
Add samples for realtime completion and OCR. Organize samples.
1 parent 443725b commit bcf71f1

File tree

6 files changed

+78
-0
lines changed

6 files changed

+78
-0
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"model": "mistral",
3+
"messages": [
4+
{
5+
"role": "user",
6+
"content": "Who is the best French painter? Answer in one short sentence."
7+
}
8+
]
9+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"id": "123",
3+
"object": "chat.completion",
4+
"created": 123,
5+
"model": "mistral",
6+
"choices": [
7+
{
8+
"index": 0,
9+
"message": {
10+
"role": "assistant",
11+
"content": "Claude Monet is often considered the best French painter.",
12+
"tool_calls": null
13+
},
14+
"finish_reason": "stop",
15+
"logprobs": null
16+
}
17+
],
18+
"usage": {
19+
"prompt_tokens": 15,
20+
"total_tokens": 17,
21+
"completion_tokens": 2
22+
}
23+
}

samples/ocr/realtime/input.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"model": "mistral",
3+
"document": {
4+
"type": "document_url",
5+
"document_url": "https://arxiv.org/pdf/2201.04234"
6+
},
7+
"include_image_base64": true
8+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"pages": [
3+
{
4+
"index": 1,
5+
"markdown": "# LEVERAGING UNLABELED DATthat threshold. ATC outperforms previous...",
6+
"images": [],
7+
"dimensions": {
8+
"dpi": 200,
9+
"height": 2200,
10+
"width": 1700
11+
}
12+
},
13+
{
14+
"index": 2,
15+
"markdown": "![img-0.jpeg](img-0.jpeg)\n\nFigure 1: Illustration of our proposed method...",
16+
"images": [
17+
{
18+
"id": "img-0.jpeg",
19+
"top_left_x": 292,
20+
"top_left_y": 217,
21+
"bottom_right_x": 1405,
22+
"bottom_right_y": 649,
23+
"image_base64": "..."
24+
}
25+
],
26+
"dimensions": {
27+
"dpi": 200,
28+
"height": 2200,
29+
"width": 1700
30+
}
31+
}
32+
],
33+
"model": "mistral",
34+
"usage_info": {
35+
"pages_processed": 29,
36+
"doc_size_bytes": null
37+
}
38+
}

0 commit comments

Comments
 (0)