choonkeat/elm-openai/1.0.0

NOTE: the latest version is 3.0.0

OpenAI

This package is NOT intended to be run on the browser since apiKey will be exposed. Call it from a server like elm-webapp or lamdera.com instead.

OpenAI.Edits.createEdits input
    |> OpenAI.withConfig cfg
    |> Http.task

See https://beta.openai.com/docs/api-reference/introduction

withConfig : Config -> TaskInput x a -> TaskInput x a

Add necessary headers to authorize a http request to OpenAI.

type alias Config =
{ organizationId : String
, apiKey : String
, baseUrl : Maybe String
}