Liking cljdoc? Tell your friends :D

openai-clj.files


create-fileclj

(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)
sourceraw docstring

delete-fileclj

(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)
sourceraw docstring

download-fileclj

(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)
sourceraw docstring

list-filesclj

(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)
sourceraw docstring

retrieve-fileclj

(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)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close