Liking cljdoc? Tell your friends :D

wkok.openai-clojure.api


cancel-fine-tuning-jobclj

(cancel-fine-tuning-job params)
(cancel-fine-tuning-job params options)

Immediately cancel a fine-tuning job.

Example:

(cancel-fine-tuning-job {:fine_tuning_job_id "ft-1wefweub"})

Also see the OpenAI documentation

Immediately cancel a fine-tuning job.

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

cancel-runclj

(cancel-run params)
(cancel-run params options)

Returns a list of run steps belonging to a run.

Example:

(cancel-run {:thread_id    "----id----"
             :run_id       "----id----"})

Also see the OpenAI documentation

Returns a list of run steps belonging to a run.

Example:

```
(cancel-run {:thread_id    "----id----"
             :run_id       "----id----"})
```

Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/cancelRun)
sourceraw docstring

create-assistantclj

(create-assistant params)
(create-assistant params options)

Create an assistant with a model and instructions.

Example:

(create-assistant {:name "My PDF Assistant"
                   :model "gpt-4-1106-preview"
                   :instructions "You are my personal PDF assistant. You modify
                                   and extract pages from the file."
                   :tools [{:type "code_interpreter"}]}

Also see the OpenAI documentation

Create an assistant with a model and instructions.

Example:
```
(create-assistant {:name "My PDF Assistant"
                   :model "gpt-4-1106-preview"
                   :instructions "You are my personal PDF assistant. You modify
                                   and extract pages from the file."
                   :tools [{:type "code_interpreter"}]}
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
sourceraw docstring

create-assistant-fileclj

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

Create an assistant file by attaching a File to an assistant.

Example:

(create-assistant-file {:assistant_id "----id----"
                        :file_id "----id----"})

Also see the OpenAI documentation

Create an assistant file by attaching a File to an assistant.

Example:
```
(create-assistant-file {:assistant_id "----id----"
                        :file_id "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/createAssistantFile)
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-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-tuning-jobclj

(create-fine-tuning-job params)
(create-fine-tuning-job 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-tuning-job {:training_file "file-xuhfiwuefb"
                         :model "gpt-3.5-turbo"})

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-tuning-job {:training_file "file-xuhfiwuefb"
                           :model "gpt-3.5-turbo"})
  ```
  Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/fine-tuning/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-messageclj

(create-message params)
(create-message params options)

Create a message.

Example:

(create-message {:thread_id "----id----"
                 :role      "user"
                 :content   "How does AI work"})

Also see the OpenAI documentation

Create a message.

Example:
```
(create-message {:thread_id "----id----"
                 :role      "user"
                 :content   "How does AI work"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/messages/createMessage)
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-runclj

(create-run params)
(create-run params options)

Create a run.

Example:

(create-run {:thread_id   "----id----"
             :assistant_id   "----id----"})

Also see the OpenAI documentation

Create a run.

Example:
```
(create-run {:thread_id   "----id----"
             :assistant_id   "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/createRun)
sourceraw docstring

create-speechclj

(create-speech params)
(create-speech params options)

Creates audio from text.

Example:

(create-speech {:model "tts-1"
                :input "Hello! Nice to meet you!."
                :voice "alloy"
                :response_format "mp3"})

Also see the OpenAI documentation

Creates audio from text.

Example:
```
(create-speech {:model "tts-1"
                :input "Hello! Nice to meet you!."
                :voice "alloy"
                :response_format "mp3"})
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/audio/createSpeech)
sourceraw docstring

create-threadclj

(create-thread)
(create-thread params)
(create-thread params options)

Create a thread.

Example:

(create-thread) or
(create-thread {:messages [{:role    "user"
                            :content "Hello, what is AI?"}
                           {:role    "user"
                            :content "How does AI work? Explain it in simple terms."}]})

Also see the OpenAI documentation

Create a thread.

Example:
```
(create-thread) or
(create-thread {:messages [{:role    "user"
                            :content "Hello, what is AI?"}
                           {:role    "user"
                            :content "How does AI work? Explain it in simple terms."}]})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/threads/createThread)
sourceraw docstring

create-thread-and-runclj

(create-thread-and-run params)
(create-thread-and-run params options)

Create a thread and run it in one request.

Example:

(create-thread-and-run {:assistant_id    "----id----"})

Also see the OpenAI documentation

Create a thread and run it in one request.

Example:

```
(create-thread-and-run {:assistant_id    "----id----"})
```

Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/createThreadAndRun)
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-assistantclj

(delete-assistant params)
(delete-assistant params options)

Delete an assistant.

Example:

(delete-assistant {:assistant_id "----id----"})

Also see the OpenAI documentation

Delete an assistant.

Example:
```
(delete-assistant {:assistant_id "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/deleteAssistant)
sourceraw docstring

delete-assistant-fileclj

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

Delete an assistant file.

Example:

(delete-assistant-file {:assistant_id "----id----"
                        :file_id "----id----"})

Also see the OpenAI documentation

Delete an assistant file.

Example:
```
(delete-assistant-file {:assistant_id "----id----"
                        :file_id "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/deleteAssistantFile)
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

delete-threadclj

(delete-thread params)
(delete-thread params options)

Delete a thread.

Example:

(delete-thread {:thread_id "----id----"})

Also see the OpenAI documentation

Delete a thread.

Example:
```
(delete-thread {:thread_id "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/threads/deleteThread)
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-assistant-filesclj

(list-assistant-files params)
(list-assistant-files params options)

Returns a list of assistant files.

Example:

(list-assistant-files {:assistant_id "----id----"
                       :limit 5})

:assistant_id param required

Also see the OpenAI documentation

Returns a list of assistant files.

Example:
```
(list-assistant-files {:assistant_id "----id----"
                       :limit 5})
```
:assistant_id param required

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/listAssistantFiles)
sourceraw docstring

list-assistantsclj

(list-assistants)
(list-assistants params)
(list-assistants params options)

Returns a list of assistants.

Example:

(list-assistants {:limit 3})

Also see the OpenAI documentation

Returns a list of assistants.

Example:
```
(list-assistants {:limit 3})
```
 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/listAssistants)
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-tuning-eventsclj

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

Get status updates for a fine-tuning job.

Example:

(list-fine-tuning-events {:fine_tuning_job_id "ft-1wefweub"})

Also see the OpenAI documentation

Get status updates for a fine-tuning job.

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

list-fine-tuning-jobsclj

(list-fine-tuning-jobs)
(list-fine-tuning-jobs options)

List your organization's fine-tuning jobs

Example:

(list-fine-tuning-jobs)

Also see the OpenAI documentation

List your organization's fine-tuning jobs

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

list-message-filesclj

(list-message-files params)
(list-message-files params options)

Returns a list of message files.

Example:

(list-message-files {:thread_id   "----id----"
                     :message_id  "----id----"})

Also see the OpenAI documentation

Returns a list of message files.

Example:
```
(list-message-files {:thread_id   "----id----"
                     :message_id  "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/messages/listMessageFiles)
sourceraw docstring

list-messagesclj

(list-messages params)
(list-messages params options)

Returns a list of messages for a given thread.

Example:

(list-messages {:thread_id ",,,"
                :limit      20})

Also see the OpenAI documentation

Returns a list of messages for a given thread.

Example:
```
(list-messages {:thread_id ",,,"
                :limit      20})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/messages/listMessages)
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

list-run-stepsclj

(list-run-steps params)
(list-run-steps params options)

Returns a list of run steps belonging to a run.

Example:

(list-run-steps {:thread_id    "----id----"
                 :run_id       "----id----"})

Also see the OpenAI documentation

Returns a list of run steps belonging to a run.

Example:

```
(list-run-steps {:thread_id    "----id----"
                 :run_id       "----id----"})
 ```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/listRunSteps)
 
sourceraw docstring

list-runsclj

(list-runs params)
(list-runs params options)

Returns a list of runs belonging to a thread.

Example:

(list-runs {:thread_id   "----id----"})

Also see the OpenAI documentation

Returns a list of runs belonging to a thread.

Example:
```
(list-runs {:thread_id   "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/listRuns)
sourceraw docstring

modify-assistantclj

(modify-assistant params)
(modify-assistant params options)

Modifies an assistant.

Example:

(modify-assistant {:assistant_id "id"
                   :name "assistant-name"
                   :model "gpt4.. "
                   :description " update the assistant "})

Also see the OpenAI documentation

Modifies an assistant.

Example:
```
(modify-assistant {:assistant_id "id"
                   :name "assistant-name"
                   :model "gpt4.. "
                   :description " update the assistant "})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/modifyAssistant)
sourceraw docstring

modify-messageclj

(modify-message params)
(modify-message params options)

Modify a message.

Example:

(modify-message {:thread_id   "----id----"
                 :message_id  "----id----"})

Also see the OpenAI documentation

Modify a message.

Example:
```
(modify-message {:thread_id   "----id----"
                 :message_id  "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/messages/getMessage)
sourceraw docstring

modify-runclj

(modify-run params)
(modify-run params options)

Modifies a run.

Example:

(modify-run {:thread_id   "----id----"
             :run_id      "----id----"})

Also see the OpenAI documentation

Modifies a run.

Example:
```
(modify-run {:thread_id   "----id----"
             :run_id      "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/modifyRun)
sourceraw docstring

modify-threadclj

(modify-thread params)
(modify-thread params options)

Modifies a thread.

Example:

(modify-thread {:thread_id "----id----"
                :metadata {}})

Also see the OpenAI documentation

Modifies a thread.

Example:
```
(modify-thread {:thread_id "----id----"
                :metadata {}})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/threads/modifyThread)
sourceraw docstring

retrieve-assistantclj

(retrieve-assistant params)
(retrieve-assistant params options)

Retrieves an assistant.

Example:

(retrieve-assistant {:assistant_id "----id----"})

:assistant_id param required :model too (but not in spec)

Also see the OpenAI documentation

Retrieves an assistant.

Example:
```
(retrieve-assistant {:assistant_id "----id----"})
```
:assistant_id param required
:model too (but not in spec)

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/getAssistant)
sourceraw docstring

retrieve-assistant-fileclj

(retrieve-assistant-file params)
(retrieve-assistant-file params options)

Retrieves an AssistantFile.

Example:

(retrieve-assistant-file {:assistant_id "----id----"
                          :file_id "----id----"})

Also see the OpenAI documentation

Retrieves an AssistantFile.

Example:
```
(retrieve-assistant-file {:assistant_id "----id----"
                          :file_id "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/assistants/getAssistantFile)
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-tuning-jobclj

(retrieve-fine-tuning-job params)
(retrieve-fine-tuning-job params options)

Gets info about a fine-tuning job.

Example:

(retrieve-fine-tuning-job {:fine_tuning_job_id "ft-1wefweub"})

Also see the OpenAI documentation

Gets info about a fine-tuning job.

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

retrieve-messageclj

(retrieve-message params)
(retrieve-message params options)

Retrieve a message.

Example:

(retrieve-message {:thread_id   "----id----"
                   :message_id  "----id----"})

Also see the OpenAI documentation

Retrieve a message.

Example:
```
(retrieve-message {:thread_id   "----id----"
                   :message_id  "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/messages/getMessage)
sourceraw docstring

retrieve-message-fileclj

(retrieve-message-file params)
(retrieve-message-file params options)

Retrieves a message file.

Example:

(retrieve-message-file {:thread_id   "----id----"
                        :message_id  "----id----"
                        :file_id  "----id----"})

Also see the OpenAI documentation

Retrieves a message file.

Example:
```
(retrieve-message-file {:thread_id   "----id----"
                        :message_id  "----id----"
                        :file_id  "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/messages/getMessageFile)
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

retrieve-runclj

(retrieve-run params)
(retrieve-run params options)

Retrieves a run.

Example:

(retrieve-run {:thread_id   "----id----"
               :run_id      "----id----"})

Also see the OpenAI documentation

Retrieves a run.

Example:
```
(retrieve-run {:thread_id   "----id----"
               :run_id      "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/getRun)
sourceraw docstring

retrieve-run-stepclj

(retrieve-run-step params)
(retrieve-run-step params options)

Retrieves a run step.

Example:

(retrieve-run-step {:thread_id    "----id----"
                    :run_id       "----id----"
                    :step_id      "----id----"})

Also see the OpenAI documentation

Retrieves a run step.

Example:

```
(retrieve-run-step {:thread_id    "----id----"
                    :run_id       "----id----"
                    :step_id      "----id----"})
 ```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/getRun)
 
sourceraw docstring

retrieve-threadclj

(retrieve-thread params)
(retrieve-thread params options)

Retrieves a thread.

Example:

(retrieve-thread {:thread_id "----id----"})

Also see the OpenAI documentation

Retrieves a thread.

Example:
```
(retrieve-thread {:thread_id "----id----"})
```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/threads/getThread)
sourceraw docstring

submit-tool-outputs-to-runclj

(submit-tool-outputs-to-run params)
(submit-tool-outputs-to-run params options)

When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.

Example:

(submit-tool-outputs-to-run {:thread_id    "----id----"
                             :run_id       "----id----"
                             :tool_outputs  [{:tool_call_id  "call_wwg3TXXXF0SCT7UTTvqxjZc"
                                              :output        "Budapest, Hungary"}]})

Also see the OpenAI documentation

When a run has the `status: "requires_action"` and `required_action.type` is
`submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool
calls once they're all completed. All outputs must be submitted in a single request.

Example:

```
(submit-tool-outputs-to-run {:thread_id    "----id----"
                             :run_id       "----id----"
                             :tool_outputs  [{:tool_call_id  "call_wwg3TXXXF0SCT7UTTvqxjZc"
                                              :output        "Budapest, Hungary"}]})
 ```

 Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)
 
sourceraw docstring

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

× close