Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
/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 fromString :: String -> FileID # | |
Show FileID Source # | |
ToHttpApiData FileID Source # | |
Defined in OpenAI.V1.Files toUrlPiece :: FileID -> Text # toEncodedUrlPiece :: FileID -> Builder # toHeader :: FileID -> ByteString # toQueryParam :: FileID -> Text # toEncodedQueryParam :: FileID -> Builder # |
data UploadFile Source #
UploadFile body
Instances
Generic UploadFile Source # | |
Defined in OpenAI.V1.Files type Rep UploadFile :: Type -> Type # from :: UploadFile -> Rep UploadFile x # to :: Rep UploadFile x -> UploadFile # | |
Show UploadFile Source # | |
Defined in OpenAI.V1.Files showsPrec :: Int -> UploadFile -> ShowS # show :: UploadFile -> String # showList :: [UploadFile] -> ShowS # | |
ToMultipart Tmp UploadFile Source # | |
Defined in OpenAI.V1.Files toMultipart :: UploadFile -> MultipartData Tmp # | |
type Rep UploadFile Source # | |
Defined in OpenAI.V1.Files type Rep UploadFile = D1 ('MetaData "UploadFile" "OpenAI.V1.Files" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "UploadFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "file") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "purpose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Purpose))) |
_UploadFile :: UploadFile Source #
Default UploadFile
data FileObject Source #
The File object represents a document that has been uploaded to OpenAI
Instances
Other types
Sort order by the created_at
timestamp of the objects
Instances
ToHttpApiData Order Source # | |
Defined in OpenAI.V1.Order toUrlPiece :: Order -> Text # toEncodedUrlPiece :: Order -> Builder # toHeader :: Order -> ByteString # toQueryParam :: Order -> Text # toEncodedQueryParam :: Order -> Builder # |
The intended purpose of the uploaded file.
Instances
data DeletionStatus Source #
Deletion status
Instances
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