Liking cljdoc? Tell your friends :D

wkok.openai-clojure.api


cancel-fine-tuneclj

(cancel-fine-tune params)
(cancel-fine-tune params options)

Immediately cancel a fine-tune job.

Example:

(cancel-fine-tune {:fine_tune_id "ft-1wefweub"})

Also see the OpenAI documentation

Immediately cancel a fine-tune job.

Example:
```
(cancel-fine-tune {:fine_tune_id "ft-1wefweub"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tunes/cancel)
sourceraw docstring

create-chat-completionclj

(create-chat-completion params)
(create-chat-completion params options)

Creates a completion for the chat message

Example:

(create-chat-completion {:model "gpt-3.5-turbo"
                         :messages [{:role "system" :content "You are a helpful assistant."}
                                    {:role "user" :content "Who won the world series in 2020?"}
                                    {:role "assistant" :content "The Los Angeles Dodgers won the World Series in 2020."}
                                    {:role "user" :content "Where was it played?"}]})

For Azure OpenAI pass {:impl :azure} for the options argument

Streaming of token events is supported via the :stream param, see Streaming Tokens

Also see the OpenAI documentation / Azure OpenAI documentation

Creates a completion for the chat message

Example:
```
(create-chat-completion {:model "gpt-3.5-turbo"
                         :messages [{:role "system" :content "You are a helpful assistant."}
                                    {:role "user" :content "Who won the world series in 2020?"}
                                    {:role "assistant" :content "The Los Angeles Dodgers won the World Series in 2020."}
                                    {:role "user" :content "Where was it played?"}]})
```

For Azure OpenAI pass `{:impl :azure}` for the `options` argument

Streaming of token events is supported via the `:stream` param, see [Streaming Tokens](/doc/03-streaming.md)

Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/chat/create) / [Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#chat-completions) documentation
sourceraw docstring

create-completionclj

(create-completion params)
(create-completion params options)

Creates a completion for the provided prompt and parameters

Example:

(create-completion {:model "text-davinci-003"
                    :prompt "Say this is a test"
                    :max_tokens 7
                    :temperature 0})

For Azure OpenAI pass {:impl :azure} for the options argument

Streaming of token events is supported via the :stream param, see Streaming Tokens

Also see the OpenAI / Azure OpenAI documentation

Creates a completion for the provided prompt and parameters

Example:
```
(create-completion {:model "text-davinci-003"
                    :prompt "Say this is a test"
                    :max_tokens 7
                    :temperature 0})
```

For Azure OpenAI pass `{:impl :azure}` for the `options` argument

Streaming of token events is supported via the `:stream` param, see [Streaming Tokens](/doc/03-streaming.md)

Also see the [OpenAI](https://platform.openai.com/docs/api-reference/completions/create) / [Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions) documentation
sourceraw docstring

create-editclj

(create-edit params)
(create-edit params options)

Creates a new edit for the provided input, instruction, and parameters

Example:

(create-edit {:model "text-davinci-edit-001"
              :input "What day of the wek is it?"
              :instruction "Fix the spelling mistakes"})

Also see the OpenAI documentation

Creates a new edit for the provided input, instruction, and parameters

Example:
```
(create-edit {:model "text-davinci-edit-001"
              :input "What day of the wek is it?"
              :instruction "Fix the spelling mistakes"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/edits/create)
sourceraw docstring

create-embeddingclj

(create-embedding params)
(create-embedding params options)

Creates an embedding vector representing the input text.

Example:

(create-embedding {:model "text-embedding-ada-002"
                   :input "The food was delicious and the waiter..."})

For Azure OpenAI pass {:impl :azure} for the options argument

Also see the OpenAI / Azure OpenAI documentation

Creates an embedding vector representing the input text.

Example:
```
(create-embedding {:model "text-embedding-ada-002"
                   :input "The food was delicious and the waiter..."})
```

For Azure OpenAI pass `{:impl :azure}` for the `options` argument

Also see the [OpenAI](https://platform.openai.com/docs/api-reference/embeddings/create) / [Azure OpenAI](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#embeddings) documentation
sourceraw docstring

create-fileclj

(create-file params)
(create-file params options)

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.

Example:

(create-file {:purpose "fine-tune"
              :file (clojure.java.io/file "path/to/fine-tune.jsonl")})

Also see the OpenAI documentation

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.

Example:
```
(create-file {:purpose "fine-tune"
              :file (clojure.java.io/file "path/to/fine-tune.jsonl")})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/upload)
sourceraw docstring

create-fine-tuneclj

(create-fine-tune params)
(create-fine-tune params options)

Creates a job that fine-tunes a specified model from a given dataset.

Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

Example:

(create-fine-tune {:training_file "file-xuhfiwuefb"})

Also see the OpenAI documentation

Creates a job that fine-tunes a specified model from a given dataset.

Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete.

  Example:
  ```
  (create-fine-tune {:training_file "file-xuhfiwuefb"})
  ```
  Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tunes/create)
  
sourceraw docstring

create-imageclj

(create-image params)
(create-image params options)

Creates an image given a prompt.

Example:

(create-image {:prompt "A cute baby sea otter"
               :n 2
               :size "1024x1024"})

Also see the OpenAI documentation

Creates an image given a prompt.

Example:
```
(create-image {:prompt "A cute baby sea otter"
               :n 2
               :size "1024x1024"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/images/create)
sourceraw docstring

create-image-editclj

(create-image-edit params)
(create-image-edit params options)

Creates an edited or extended image given an original image and a prompt.

Example:

(create-image-edit {:image (clojure.java.io/file "path/to/otter.png")
                    :mask (clojure.java.io/file "path/to/mask.png")
                    :prompt "A cute baby sea otter wearing a beret"
                    :n 2
                    :size "1024x1024"})

Also see the OpenAI documentation

Creates an edited or extended image given an original image and a prompt.

Example:
```
(create-image-edit {:image (clojure.java.io/file "path/to/otter.png")
                    :mask (clojure.java.io/file "path/to/mask.png")
                    :prompt "A cute baby sea otter wearing a beret"
                    :n 2
                    :size "1024x1024"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/images/create-edit)
sourceraw docstring

create-image-variationclj

(create-image-variation params)
(create-image-variation params options)

Creates a variation of a given image.

Example:

(create-image-variation {:image (clojure.java.io/file "path/to/otter.png")
                         :n 2
                         :size "1024x1024"})

Also see the OpenAI documentation

Creates a variation of a given image.

Example:
```
(create-image-variation {:image (clojure.java.io/file "path/to/otter.png")
                         :n 2
                         :size "1024x1024"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/images/create-variation)
sourceraw docstring

create-moderationclj

(create-moderation params)
(create-moderation params options)

Classifies if text violates OpenAI's Content Policy

Example:

(create-moderation {:input "I want to kill them"})

Also see the OpenAI documentation

Classifies if text violates OpenAI's Content Policy

Example:
```
(create-moderation {:input "I want to kill them"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/moderations/create)
sourceraw docstring

create-transcriptionclj

(create-transcription params)
(create-transcription params options)

Transcribes audio into the input language.

Example:

(create-transcription {:file (clojure.java.io/file "path/to/audio.mp3")
                       :model "whisper-1"})

Also see the OpenAI documentation

Transcribes audio into the input language.

Example:
```
(create-transcription {:file (clojure.java.io/file "path/to/audio.mp3")
                       :model "whisper-1"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/audio/create)
sourceraw docstring

create-translationclj

(create-translation params)
(create-translation params options)

Translates audio into English.

Example:

(create-translation {:file (clojure.java.io/file "path/to/file/german.m4a")
                     :model "whisper-1"})

Also see the OpenAI documentation

Translates audio into English.

Example:
```
(create-translation {:file (clojure.java.io/file "path/to/file/german.m4a")
                     :model "whisper-1"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/audio/create)
sourceraw docstring

delete-fileclj

(delete-file params)
(delete-file params options)

Delete a file.

Example:

(delete-file {:file-id "file-wefuhweof"})

Also see the OpenAI documentation

Delete a file.

Example:
```
(delete-file {:file-id "file-wefuhweof"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/delete)
sourceraw docstring

delete-modelclj

(delete-model params)
(delete-model params options)

Delete a fine-tuned model. You must have the Owner role in your organization.

Example:

(delete-model {:model "fine-tune"})

Also see the OpenAI documentation

Delete a fine-tuned model. You must have the Owner role in your organization.

Example:
```
(delete-model {:model "fine-tune"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tunes/delete-model)
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-content)
sourceraw docstring

list-filesclj

(list-files)
(list-files options)

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

Example:

(list-files)

Also see the OpenAI documentation

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

Example:
```
(list-files)
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/list)
sourceraw docstring

list-fine-tune-eventsclj

(list-fine-tune-events params)
(list-fine-tune-events params options)

Get fine-grained status updates for a fine-tune job.

Example:

(list-fine-tune-events {:fine_tune_id "ft-1wefweub"})

Also see the OpenAI documentation

Get fine-grained status updates for a fine-tune job.

Example:
```
(list-fine-tune-events {:fine_tune_id "ft-1wefweub"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tunes/events)
sourceraw docstring

list-fine-tunesclj

(list-fine-tunes)
(list-fine-tunes options)

List your organization's fine-tuning jobs

Example:

(list-fine-tunes)

Also see the OpenAI documentation

List your organization's fine-tuning jobs

Example:
```
(list-fine-tunes)
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tunes/list)
sourceraw docstring

list-modelsclj

(list-models)
(list-models options)

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Example:

(list-models)

Also see the OpenAI documentation

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Example:
```
(list-models)
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/models/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"})

Also see the OpenAI documentation

Returns information about a specific file.

Example:
```
(retrieve-file {:file-id "file-wefuhweof"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/files/retrieve)
sourceraw docstring

retrieve-fine-tuneclj

(retrieve-fine-tune params)
(retrieve-fine-tune params options)

Gets info about the fine-tune job.

Example:

(retrieve-fine-tune {:fine_tune_id "ft-1wefweub"})

Also see the OpenAI documentation

Gets info about the fine-tune job.

Example:
```
(retrieve-fine-tune {:fine_tune_id "ft-1wefweub"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tunes/retrieve)
sourceraw docstring

retrieve-modelclj

(retrieve-model params)
(retrieve-model params options)

Retrieves a model instance, providing basic information about the model such as the owner and permissioning.

Example:

(retrieve-model {:model "text-davinci-003"})

Also see the OpenAI documentation

Retrieves a model instance, providing basic information about the model such as the owner and permissioning.

Example:
```
(retrieve-model {:model "text-davinci-003"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/models/retrieve)
sourceraw docstring

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

× close