wkok.openai-clojure.api
(source)For more info about this library see:
https://cljdoc.org/d/net.clojars.wkok/openai-clojure/0.15.0/api/wkok.openai-clojure.apiPublic Variable | Short Description |
---|---|
cancel-fine-tune (clj) | (Deprecated) Immediately cancel a fine-tune job. |
cancel-fine-tuning-job (clj) | Immediately cancel a fine-tuning job. |
cancel-run (clj) | Returns a list of run steps belonging to a run. |
create-assistant (clj) | Create an assistant with a model and instructions. |
create-assistant-file (clj) | Create an assistant file by attaching a File to an assistant. |
create-chat-completion (clj) | 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. |
create-completion (clj) | 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. |
create-edit (clj) | 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). |
create-embedding (clj) | Creates an embedding vector representing the input text. |
create-file (clj) | Upload a file that contains document(s) to be used across various endpoints/features. |
create-fine-tune (clj) | (Deprecated) Creates a job that fine-tunes a specified model from a given dataset. |
create-fine-tuning-job (clj) | Creates a job that fine-tunes a specified model from a given dataset. |
create-image (clj) | Creates an image given a prompt. |
create-image-edit (clj) | Creates an edited or extended image given an original image and a prompt. |
create-image-variation (clj) | Creates a variation of a given image. |
create-message (clj) | Create a message. |
create-moderation (clj) | 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). |
create-run (clj) | Create a run. |
create-speech (clj) | Creates audio from text. |
create-thread (clj) | Create a thread. |
create-thread-and-run (clj) | Create a thread and run it in one request. |
create-transcription (clj) | Transcribes audio into the input language. |
create-translation (clj) | Translates audio into English. |
delete-assistant (clj) | Delete an assistant. |
delete-assistant-file (clj) | Delete an assistant file. |
delete-file (clj) | Delete a file. |
delete-model (clj) | Delete a fine-tuned model. |
delete-thread (clj) | Delete a thread. |
download-file (clj) | 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). |
list-assistant-files (clj) | Returns a list of assistant files. |
list-assistants (clj) | Returns a list of assistants. |
list-files (clj) | Returns a list of files that belong to the user's organization. |
list-fine-tune-events (clj) | (Deprecated) Get fine-grained status updates for a fine-tune job. |
list-fine-tunes (clj) | (Deprecated) 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). |
list-fine-tuning-events (clj) | Get status updates for a fine-tuning job. |
list-fine-tuning-jobs (clj) | 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). |
list-message-files (clj) | Returns a list of message files. |
list-messages (clj) | Returns a list of messages for a given thread. |
list-models (clj) | Lists the currently available models, and provides basic information about each one such as the owner and availability. |
list-run-steps (clj) | Returns a list of run steps belonging to a run. |
list-runs (clj) | Returns a list of runs belonging to a thread. |
modify-assistant (clj) | Modifies an assistant. |
modify-message (clj) | Modify a message. |
modify-run (clj) | Modifies a run. |
modify-thread (clj) | Modifies a thread. |
retrieve-assistant (clj) | Retrieves an assistant. |
retrieve-assistant-file (clj) | Retrieves an AssistantFile. |
retrieve-file (clj) | Returns information about a specific file. |
retrieve-fine-tune (clj) | (Deprecated) Gets info about the fine-tune job. |
retrieve-fine-tuning-job (clj) | Gets info about a fine-tuning job. |
retrieve-message (clj) | Retrieve a message. |
retrieve-message-file (clj) | Retrieves a message file. |
retrieve-model (clj) | Retrieves a model instance, providing basic information about the model such as the owner and permissioning. |
retrieve-run (clj) | Retrieves a run. |
retrieve-run-step (clj) | Retrieves a run step. |
retrieve-thread (clj) | Retrieves a thread. |
submit-tool-outputs-to-run (clj) | 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. |