(create-file params)(create-file params options)Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB.
Example:
(create-file {:purpose "fine-tune"
:file (clojure.java.io/file "path/to/fine-tune.jsonl")})
Response:
{
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "mydata.jsonl",
"purpose": "fine-tune",
}
Also see the OpenAI documentation
Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB.
Example:
```
(create-file {:purpose "fine-tune"
:file (clojure.java.io/file "path/to/fine-tune.jsonl")})
```
Response:
```
{
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "mydata.jsonl",
"purpose": "fine-tune",
}
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/create)(delete-file params)(delete-file params options)Delete a file.
Example:
(delete-file {:file-id "file-wefuhweof"})
Response:
{
"id": "file-abc123",
"object": "file",
"deleted": true
}
Also see the OpenAI documentation
Delete a file.
Example:
```
(delete-file {:file-id "file-wefuhweof"})
```
Response:
```
{
"id": "file-abc123",
"object": "file",
"deleted": true
}
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/delete)(download-file params)(download-file params options)Returns the contents of the specified file
Example:
(download-file {:file-id "file-wefuhweof"})
Also see the OpenAI documentation
Returns the contents of the specified file
Example:
```
(download-file {:file-id "file-wefuhweof"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/retrieve-contents)(list-files)(list-files options)Returns a list of files that belong to the user's organization.
Example:
(list-files)
Response:
{
"data": [
{
"id": "file-abc123",
"object": "file",
"bytes": 175,
"created_at": 1613677385,
"filename": "salesOverview.pdf",
"purpose": "assistants",
},
{
"id": "file-abc123",
"object": "file",
"bytes": 140,
"created_at": 1613779121,
"filename": "puppy.jsonl",
"purpose": "fine-tune",
}
],
"object": "list"
}
Also see the OpenAI documentation
Returns a list of files that belong to the user's organization.
Example:
```
(list-files)
```
Response:
```
{
"data": [
{
"id": "file-abc123",
"object": "file",
"bytes": 175,
"created_at": 1613677385,
"filename": "salesOverview.pdf",
"purpose": "assistants",
},
{
"id": "file-abc123",
"object": "file",
"bytes": 140,
"created_at": 1613779121,
"filename": "puppy.jsonl",
"purpose": "fine-tune",
}
],
"object": "list"
}
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/list)(retrieve-file params)(retrieve-file params options)Returns information about a specific file.
Example:
(retrieve-file {:file-id "file-wefuhweof"})
Response:
{
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "mydata.jsonl",
"purpose": "fine-tune",
}
Also see the OpenAI documentation
Returns information about a specific file.
Example:
```
(retrieve-file {:file-id "file-wefuhweof"})
```
Response:
```
{
"id": "file-abc123",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "mydata.jsonl",
"purpose": "fine-tune",
}
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/retrieve)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |