packages feed

openai-1.0.1 / src / OpenAI / V1 / ListOf.hs

-- | The `ListOf` type constructormodule OpenAI.V1.ListOf    ( -- * Types      ListOf(..)    ) whereimport OpenAI.Prelude-- | Whenever OpenAI says that an API endpoint returns a list of items, what-- they actually mean is that it returns that list wrapped inside of the-- following objectdata ListOf a = List{ data_ :: Vector a }    deriving stock (Generic, Show)instance FromJSON a => FromJSON (ListOf a) where    parseJSON = genericParseJSON aesonOptions