OpenAI.Files (openai_client v0.5.3)

Files are used to upload documents that can be used with features like Fine-tuning.

https://platform.openai.com/docs/api-reference/files

Link to this section Summary

Functions

Returns a list of files that belong to the user's organization.

Returns information about a specific file.

Returns the content of the specified file.

Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.

Link to this section Types

Link to this type

upload_params()

@type upload_params() :: %{file: String.t(), purpose: String.t()}

Link to this section Functions

Link to this function

delete(client, id, opts \\ [])

Delete a file.

Link to this function

list(client, opts \\ [])

Returns a list of files that belong to the user's organization.

Link to this function

retrieve(client, id, opts \\ [])

Returns information about a specific file.

Link to this function

retrieve_content(client, id, opts \\ [])

@spec retrieve_content(OpenAI.Client.t(), String.t(), Keyword.t()) ::
  OpenAI.Client.result()

Returns the content of the specified file.

Link to this function

upload(client, params, opts \\ [])

Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.