choonkeat / elm-openai / OpenAI.Common

Common types used in the OpenAI API.


type alias BinaryBlob =
{ contentType : String
, bytes : Bytes 
}

https://beta.openai.com/docs/api-reference/images/create-edit


type alias DeleteOutput =
{ id : String
, object : String
, deleted : Basics.Bool 
}

https://beta.openai.com/docs/api-reference/files/delete


type alias File =
{ id : String
, object : String
, bytes : Basics.Int
, created_at : Time.Posix
, filename : String
, purpose : String 
}

https://beta.openai.com/docs/api-reference/files


type alias Usage =
{ prompt_tokens : Basics.Int
, completion_tokens : Basics.Int
, total_tokens : Basics.Int 
}

https://beta.openai.com/docs/api-reference/making-requests