| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Batches
Contents
Description
/v1/batches
Synopsis
- newtype BatchID = BatchID {}
- data CreateBatch = CreateBatch {}
- _CreateBatch :: CreateBatch
- data BatchObject = BatchObject {
- id :: BatchID
- object :: Text
- endpoint :: Text
- errors :: Maybe (ListOf Error)
- input_file_id :: FileID
- completion_window :: Text
- status :: Status
- output_file_id :: Maybe FileID
- error_file_id :: Maybe FileID
- created_at :: POSIXTime
- in_progress_at :: Maybe POSIXTime
- expires_at :: Maybe POSIXTime
- finalizing_at :: Maybe POSIXTime
- completed_at :: Maybe POSIXTime
- failed_at :: Maybe POSIXTime
- expired_at :: Maybe POSIXTime
- cancelling_at :: Maybe POSIXTime
- cancelled_at :: Maybe POSIXTime
- request_counts :: Maybe Counts
- metadata :: Maybe (Map Text Text)
- data Status
- data Counts = Counts {}
- type API = "batches" :> ((ReqBody '[JSON] CreateBatch :> Post '[JSON] BatchObject) :<|> ((Capture "batch_id" BatchID :> Get '[JSON] BatchObject) :<|> ((Capture "batch_id" BatchID :> ("cancel" :> Post '[JSON] BatchObject)) :<|> (QueryParam "after" Text :> (QueryParam "limit" Natural :> Get '[JSON] (ListOf BatchObject))))))
Main types
Batch ID
Instances
| FromJSON BatchID Source # | |
Defined in OpenAI.V1.Batches | |
| ToJSON BatchID Source # | |
| IsString BatchID Source # | |
Defined in OpenAI.V1.Batches Methods fromString :: String -> BatchID # | |
| Show BatchID Source # | |
| ToHttpApiData BatchID Source # | |
Defined in OpenAI.V1.Batches Methods toUrlPiece :: BatchID -> Text # toEncodedUrlPiece :: BatchID -> Builder # toHeader :: BatchID -> ByteString # toQueryParam :: BatchID -> Text # toEncodedQueryParam :: BatchID -> Builder # | |
data CreateBatch Source #
Request body for /v1/batches
Constructors
| CreateBatch | |
Instances
_CreateBatch :: CreateBatch Source #
Default CreateBatch
data BatchObject Source #
The batch object
Constructors
| BatchObject | |
Fields
| |
Instances
| FromJSON BatchObject Source # | |||||
Defined in OpenAI.V1.Batches | |||||
| ToJSON BatchObject Source # | |||||
Defined in OpenAI.V1.Batches Methods toJSON :: BatchObject -> Value # toEncoding :: BatchObject -> Encoding # toJSONList :: [BatchObject] -> Value # toEncodingList :: [BatchObject] -> Encoding # omitField :: BatchObject -> Bool # | |||||
| Generic BatchObject Source # | |||||
Defined in OpenAI.V1.Batches Associated Types
| |||||
| Show BatchObject Source # | |||||
Defined in OpenAI.V1.Batches Methods showsPrec :: Int -> BatchObject -> ShowS # show :: BatchObject -> String # showList :: [BatchObject] -> ShowS # | |||||
| type Rep BatchObject Source # | |||||
Defined in OpenAI.V1.Batches type Rep BatchObject = D1 ('MetaData "BatchObject" "OpenAI.V1.Batches" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "BatchObject" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BatchID) :*: S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "endpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "errors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (ListOf Error))) :*: S1 ('MetaSel ('Just "input_file_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileID)))) :*: ((S1 ('MetaSel ('Just "completion_window") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status)) :*: (S1 ('MetaSel ('Just "output_file_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FileID)) :*: (S1 ('MetaSel ('Just "error_file_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FileID)) :*: S1 ('MetaSel ('Just "created_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))))) :*: (((S1 ('MetaSel ('Just "in_progress_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)) :*: S1 ('MetaSel ('Just "expires_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime))) :*: (S1 ('MetaSel ('Just "finalizing_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)) :*: (S1 ('MetaSel ('Just "completed_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)) :*: S1 ('MetaSel ('Just "failed_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime))))) :*: ((S1 ('MetaSel ('Just "expired_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)) :*: S1 ('MetaSel ('Just "cancelling_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime))) :*: (S1 ('MetaSel ('Just "cancelled_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)) :*: (S1 ('MetaSel ('Just "request_counts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Counts)) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Text))))))))) | |||||
Other types
The current status of the batch.
Constructors
| Validating | |
| Failed | |
| In_Progress | |
| Finalizing | |
| Completed | |
| Expired | |
| Cancelling | |
| Cancelled |
Instances
| FromJSON Status Source # | |||||
Defined in OpenAI.V1.Batches | |||||
| ToJSON Status Source # | |||||
| Generic Status Source # | |||||
Defined in OpenAI.V1.Batches Associated Types
| |||||
| Show Status Source # | |||||
| type Rep Status Source # | |||||
Defined in OpenAI.V1.Batches type Rep Status = D1 ('MetaData "Status" "OpenAI.V1.Batches" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (((C1 ('MetaCons "Validating" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Failed" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "In_Progress" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Finalizing" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Completed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Expired" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Cancelling" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cancelled" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
The request counts for different statuses within the batch.
Instances
| FromJSON Counts Source # | |||||
Defined in OpenAI.V1.Batches | |||||
| ToJSON Counts Source # | |||||
| Generic Counts Source # | |||||
Defined in OpenAI.V1.Batches Associated Types
| |||||
| Show Counts Source # | |||||
| type Rep Counts Source # | |||||
Defined in OpenAI.V1.Batches type Rep Counts = D1 ('MetaData "Counts" "OpenAI.V1.Batches" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Counts" 'PrefixI 'True) (S1 ('MetaSel ('Just "total") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "completed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "failed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))) | |||||
Servant
type API = "batches" :> ((ReqBody '[JSON] CreateBatch :> Post '[JSON] BatchObject) :<|> ((Capture "batch_id" BatchID :> Get '[JSON] BatchObject) :<|> ((Capture "batch_id" BatchID :> ("cancel" :> Post '[JSON] BatchObject)) :<|> (QueryParam "after" Text :> (QueryParam "limit" Natural :> Get '[JSON] (ListOf BatchObject)))))) Source #
Servant API