Pedro Matiello

Announcement: me.pmatiello/openai-api

25 Apr 2023 clojure openai api

me.pmatiello/openai-api is a pure-Clojure wrapper around the OpenAI API, offering various functions for interacting with the API’s capabilities. These include text generation, image generation and editing, embeddings, audio transcription and translation, file management, fine-tuning, and content moderation.

(require '[me.pmatiello.openai-api.api :as openai])

(def credentials
  (openai/credentials api-key))

(openai/chat {:model    "gpt-3.5-turbo"
              :messages [{:role    "user"
                          :content "Fix: (println \"hello"}]}
             credentials)

Notice: This is not an official OpenAI project nor is it affiliated with OpenAI in any way.

Refer to the project page and documentation for more.