We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ce69f2 commit d56a5d2Copy full SHA for d56a5d2
README.md
@@ -182,8 +182,19 @@ from llama_api_client import LlamaAPIClient
182
183
client = LlamaAPIClient()
184
185
+num_bytes = Path("/path/to/file").stat().st_size
186
+
187
+# 1. initiate upload session
188
+r = client.uploads.create(
189
+ bytes=num_bytes,
190
+ filename="simpleqa.jsonl",
191
+ mime_type="application/jsonl",
192
+ purpose="messages_finetune",
193
+)
194
195
+# 2. upload part
196
client.uploads.part(
- upload_id="upload_id",
197
+ upload_id=r.id,
198
data=Path("/path/to/file"),
199
)
200
```
0 commit comments