Liking cljdoc? Tell your friends :D

trivial-openai.core


-api-audioclj

(-api-audio endpoint
            filename
            {:keys [prompt model response-format temperature language]
             :or {prompt ""
                  model "whisper-1"
                  response-format :json
                  temperature 1.0
                  language "en"}})
source

-api-openaiclj

(-api-openai endpoint
             &
             {:keys [body multipart version method]
              :or {version "v1" method :get}})
source

-filter-nilclj

(-filter-nil m)
source

-image-respclj

(-image-resp format response)
source

API_KEYclj

source

chatclj

(chat messages
      &
      {:keys [model temperature count max-tokens stop presence-penalty
              frequency-penalty]
       :or {model "gpt-3.5-turbo"
            temperature 1.0
            count 1
            presence-penalty 0
            frequency-penalty 0}})
source

completionclj

(completion prompt
            &
            {:keys [model max-tokens temperature count echo stop
                    presence-penalty frequency-penalty logprobs best-of]
             :or {model "text-davinci-003"
                  max-tokens 2048
                  temperature 1.0
                  count 1
                  echo false
                  presence-penalty 0
                  frequency-penalty 0
                  best-of 1}})
source

imageclj

(image prompt
       &
       {:keys [count size response-format]
        :or {count 1 size 1024 response-format :url}})
source

image-editclj

(image-edit filename
            prompt
            &
            {:keys [mask count size response-format]
             :or {size 1024 response-format :url count 1}
             :as opts})
source

image-url->fileclj

(image-url->file url path)
source

image-variationsclj

(image-variations filename
                  &
                  {:keys [count size response-format]
                   :or {size 1024 response-format :url count 1}
                   :as opts})
source

map->multipartclj

(map->multipart m)

General file request utility. Takes a map and returns a multi-part set of parameters suitable for feeding into the API

General file request utility. Takes a map and returns a multi-part set of parameters suitable for feeding into the API
sourceraw docstring

modelsclj

(models)
source

moderationclj

(moderation text-or-array & {:keys [model] :or {model :text-moderation-stable}})
source

transcriptionclj

(transcription filename
               &
               {:keys [prompt response-format temperature language] :as opts})
source

translationclj

(translation filename & {:keys [prompt response-format temperature] :as opts})
source

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

× close