| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Moderations
Contents
Description
/v1/moderations
Synopsis
- data CreateModeration = CreateModeration {}
- _CreateModeration :: CreateModeration
- data Moderation = Moderation {}
- data InputType
- data Result = Result {}
- type API = "moderations" :> (ReqBody '[JSON] CreateModeration :> Post '[JSON] Moderation)
Main types
data CreateModeration Source #
Request body for /v1/moderations
Instances
_CreateModeration :: CreateModeration Source #
Default CreateModeration
data Moderation Source #
Represents if a given text input is potentially harmful.
Instances
| FromJSON Moderation Source # | |||||
Defined in OpenAI.V1.Moderations | |||||
| ToJSON Moderation Source # | |||||
Defined in OpenAI.V1.Moderations Methods toJSON :: Moderation -> Value # toEncoding :: Moderation -> Encoding # toJSONList :: [Moderation] -> Value # toEncodingList :: [Moderation] -> Encoding # omitField :: Moderation -> Bool # | |||||
| Generic Moderation Source # | |||||
Defined in OpenAI.V1.Moderations Associated Types
| |||||
| Show Moderation Source # | |||||
Defined in OpenAI.V1.Moderations Methods showsPrec :: Int -> Moderation -> ShowS # show :: Moderation -> String # showList :: [Moderation] -> ShowS # | |||||
| type Rep Moderation Source # | |||||
Defined in OpenAI.V1.Moderations type Rep Moderation = D1 ('MetaData "Moderation" "OpenAI.V1.Moderations" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Moderation" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "model") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Model) :*: S1 ('MetaSel ('Just "results") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Result))))) | |||||
Other types
The input type that the score applies to
A moderation result
Constructors
| Result | |
Fields
| |
Instances
| FromJSON Result Source # | |||||
Defined in OpenAI.V1.Moderations | |||||
| ToJSON Result Source # | |||||
| Generic Result Source # | |||||
Defined in OpenAI.V1.Moderations Associated Types
| |||||
| Show Result Source # | |||||
| type Rep Result Source # | |||||
Defined in OpenAI.V1.Moderations type Rep Result = D1 ('MetaData "Result" "OpenAI.V1.Moderations" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Result" 'PrefixI 'True) ((S1 ('MetaSel ('Just "flagged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "categories") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Bool))) :*: (S1 ('MetaSel ('Just "category_scores") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Double)) :*: S1 ('MetaSel ('Just "category_applied_input_types") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text [InputType])))))) | |||||