| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Files
Contents
Description
/v1/files
Synopsis
- newtype FileID = FileID {}
- data UploadFile = UploadFile {}
- _UploadFile :: UploadFile
- data FileObject = FileObject {}
- data Order
- data Purpose
- data DeletionStatus = DeletionStatus {}
- type API = "files" :> ((MultipartForm Tmp UploadFile :> Post '[JSON] FileObject) :<|> ((QueryParam "purpose" Purpose :> (QueryParam "limit" Natural :> (QueryParam "order" Order :> (QueryParam "after" Text :> Get '[JSON] (ListOf FileObject))))) :<|> ((Capture "file_id" FileID :> Get '[JSON] FileObject) :<|> ((Capture "file_id" FileID :> Delete '[JSON] DeletionStatus) :<|> (Capture "file_id" FileID :> ("content" :> Get '[OctetStream] ByteString))))))
Main types
File ID
Instances
| FromJSON FileID Source # | |
Defined in OpenAI.V1.Files | |
| ToJSON FileID Source # | |
| IsString FileID Source # | |
Defined in OpenAI.V1.Files Methods fromString :: String -> FileID # | |
| Show FileID Source # | |
| ToHttpApiData FileID Source # | |
Defined in OpenAI.V1.Files Methods toUrlPiece :: FileID -> Text # toEncodedUrlPiece :: FileID -> Builder # toHeader :: FileID -> ByteString # toQueryParam :: FileID -> Text # toEncodedQueryParam :: FileID -> Builder # | |
data UploadFile Source #
UploadFile body
Constructors
| UploadFile | |
Instances
_UploadFile :: UploadFile Source #
Default UploadFile
data FileObject Source #
The File object represents a document that has been uploaded to OpenAI
Constructors
| FileObject | |
Instances
| FromJSON FileObject Source # | |||||
Defined in OpenAI.V1.Files | |||||
| ToJSON FileObject Source # | |||||
Defined in OpenAI.V1.Files Methods toJSON :: FileObject -> Value # toEncoding :: FileObject -> Encoding # toJSONList :: [FileObject] -> Value # toEncodingList :: [FileObject] -> Encoding # omitField :: FileObject -> Bool # | |||||
| Generic FileObject Source # | |||||
Defined in OpenAI.V1.Files Associated Types
| |||||
| Show FileObject Source # | |||||
Defined in OpenAI.V1.Files Methods showsPrec :: Int -> FileObject -> ShowS # show :: FileObject -> String # showList :: [FileObject] -> ShowS # | |||||
| FromJSON (UploadObject FileObject) Source # | |||||
Defined in OpenAI.V1.Uploads Methods parseJSON :: Value -> Parser (UploadObject FileObject) # parseJSONList :: Value -> Parser [UploadObject FileObject] # | |||||
| ToJSON (UploadObject FileObject) Source # | |||||
Defined in OpenAI.V1.Uploads Methods toJSON :: UploadObject FileObject -> Value # toEncoding :: UploadObject FileObject -> Encoding # toJSONList :: [UploadObject FileObject] -> Value # toEncodingList :: [UploadObject FileObject] -> Encoding # omitField :: UploadObject FileObject -> Bool # | |||||
| type Rep FileObject Source # | |||||
Defined in OpenAI.V1.Files type Rep FileObject = D1 ('MetaData "FileObject" "OpenAI.V1.Files" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "FileObject" 'PrefixI 'True) ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileID) :*: (S1 ('MetaSel ('Just "bytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "created_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))) :*: (S1 ('MetaSel ('Just "filename") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "purpose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Purpose))))) | |||||
Other types
Sort order by the created_at timestamp of the objects
Instances
| FromJSON Order Source # | |
Defined in OpenAI.V1.Order | |
| ToJSON Order Source # | |
| Generic Order Source # | |
Defined in OpenAI.V1.Order | |
| Show Order Source # | |
| ToHttpApiData Order Source # | |
Defined in OpenAI.V1.Order Methods toUrlPiece :: Order -> Text # toEncodedUrlPiece :: Order -> Builder # toHeader :: Order -> ByteString # toQueryParam :: Order -> Text # toEncodedQueryParam :: Order -> Builder # | |
| type Rep Order Source # | |
The intended purpose of the uploaded file.
Instances
| FromJSON Purpose Source # | |||||
Defined in OpenAI.V1.Files | |||||
| ToJSON Purpose Source # | |||||
| Generic Purpose Source # | |||||
Defined in OpenAI.V1.Files Associated Types
| |||||
| Show Purpose Source # | |||||
| ToHttpApiData Purpose Source # | |||||
Defined in OpenAI.V1.Files Methods toUrlPiece :: Purpose -> Text # toEncodedUrlPiece :: Purpose -> Builder # toHeader :: Purpose -> ByteString # toQueryParam :: Purpose -> Text # toEncodedQueryParam :: Purpose -> Builder # | |||||
| type Rep Purpose Source # | |||||
Defined in OpenAI.V1.Files type Rep Purpose = D1 ('MetaData "Purpose" "OpenAI.V1.Files" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "Assistants" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Assistants_Output" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Batch" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Batch_Output" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Fine_Tune" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Fine_Tune_Results" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Vision" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data DeletionStatus Source #
Deletion status
Instances
| FromJSON DeletionStatus Source # | |||||
Defined in OpenAI.V1.DeletionStatus Methods parseJSON :: Value -> Parser DeletionStatus # parseJSONList :: Value -> Parser [DeletionStatus] # | |||||
| ToJSON DeletionStatus Source # | |||||
Defined in OpenAI.V1.DeletionStatus Methods toJSON :: DeletionStatus -> Value # toEncoding :: DeletionStatus -> Encoding # toJSONList :: [DeletionStatus] -> Value # toEncodingList :: [DeletionStatus] -> Encoding # omitField :: DeletionStatus -> Bool # | |||||
| Generic DeletionStatus Source # | |||||
Defined in OpenAI.V1.DeletionStatus Associated Types
Methods from :: DeletionStatus -> Rep DeletionStatus x # to :: Rep DeletionStatus x -> DeletionStatus # | |||||
| Show DeletionStatus Source # | |||||
Defined in OpenAI.V1.DeletionStatus Methods showsPrec :: Int -> DeletionStatus -> ShowS # show :: DeletionStatus -> String # showList :: [DeletionStatus] -> ShowS # | |||||
| type Rep DeletionStatus Source # | |||||
Defined in OpenAI.V1.DeletionStatus type Rep DeletionStatus = D1 ('MetaData "DeletionStatus" "OpenAI.V1.DeletionStatus" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "DeletionStatus" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "deleted") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) | |||||
Servant
type API = "files" :> ((MultipartForm Tmp UploadFile :> Post '[JSON] FileObject) :<|> ((QueryParam "purpose" Purpose :> (QueryParam "limit" Natural :> (QueryParam "order" Order :> (QueryParam "after" Text :> Get '[JSON] (ListOf FileObject))))) :<|> ((Capture "file_id" FileID :> Get '[JSON] FileObject) :<|> ((Capture "file_id" FileID :> Delete '[JSON] DeletionStatus) :<|> (Capture "file_id" FileID :> ("content" :> Get '[OctetStream] ByteString)))))) Source #
Servant API