openai-1.0.0: Servant bindings to OpenAI
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAI.V1.Message

Description

The Message type

Synopsis

Main types

data Message Source #

A message

Constructors

User 

Fields

Assistant 

Fields

Instances

Instances details
ToJSON Message Source # 
Instance details

Defined in OpenAI.V1.Message

Generic Message Source # 
Instance details

Defined in OpenAI.V1.Message

Associated Types

type Rep Message :: Type -> Type #

Methods

from :: Message -> Rep Message x #

to :: Rep Message x -> Message #

Show Message Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep Message Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep Message = D1 ('MetaData "Message" "OpenAI.V1.Message" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "User" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (Content Text))) :*: (S1 ('MetaSel ('Just "attachments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Attachment))) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Text))))) :+: C1 ('MetaCons "Assistant" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (Content Text))) :*: (S1 ('MetaSel ('Just "attachments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Attachment))) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Text))))))

Other types

data ImageFile Source #

References an image File in the content of a message

Constructors

ImageFile 

Instances

Instances details
FromJSON ImageFile Source # 
Instance details

Defined in OpenAI.V1.Message

ToJSON ImageFile Source # 
Instance details

Defined in OpenAI.V1.Message

Generic ImageFile Source # 
Instance details

Defined in OpenAI.V1.Message

Associated Types

type Rep ImageFile :: Type -> Type #

Show ImageFile Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep ImageFile Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep ImageFile = D1 ('MetaData "ImageFile" "OpenAI.V1.Message" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "ImageFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "file_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileID) :*: S1 ('MetaSel ('Just "detail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (AutoOr Text)))))

data ImageURL Source #

References an image URL in the content of a message

Constructors

ImageURL 

Instances

Instances details
FromJSON ImageURL Source # 
Instance details

Defined in OpenAI.V1.Message

ToJSON ImageURL Source # 
Instance details

Defined in OpenAI.V1.Message

Generic ImageURL Source # 
Instance details

Defined in OpenAI.V1.Message

Associated Types

type Rep ImageURL :: Type -> Type #

Methods

from :: ImageURL -> Rep ImageURL x #

to :: Rep ImageURL x -> ImageURL #

Show ImageURL Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep ImageURL Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep ImageURL = D1 ('MetaData "ImageURL" "OpenAI.V1.Message" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "ImageURL" 'PrefixI 'True) (S1 ('MetaSel ('Just "image_url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "detail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (AutoOr Text)))))

data Content text Source #

Message content

Constructors

Image_File 
Image_URL 

Fields

Text 

Fields

Instances

Instances details
FromJSON text => FromJSON (Content text) Source # 
Instance details

Defined in OpenAI.V1.Message

ToJSON text => ToJSON (Content text) Source # 
Instance details

Defined in OpenAI.V1.Message

Methods

toJSON :: Content text -> Value #

toEncoding :: Content text -> Encoding #

toJSONList :: [Content text] -> Value #

toEncodingList :: [Content text] -> Encoding #

omitField :: Content text -> Bool #

IsString text => IsString (Content text) Source # 
Instance details

Defined in OpenAI.V1.Message

Methods

fromString :: String -> Content text #

Generic (Content text) Source # 
Instance details

Defined in OpenAI.V1.Message

Associated Types

type Rep (Content text) :: Type -> Type #

Methods

from :: Content text -> Rep (Content text) x #

to :: Rep (Content text) x -> Content text #

Show text => Show (Content text) Source # 
Instance details

Defined in OpenAI.V1.Message

Methods

showsPrec :: Int -> Content text -> ShowS #

show :: Content text -> String #

showList :: [Content text] -> ShowS #

type Rep (Content text) Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep (Content text) = D1 ('MetaData "Content" "OpenAI.V1.Message" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "Image_File" 'PrefixI 'True) (S1 ('MetaSel ('Just "image_file") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImageFile)) :+: (C1 ('MetaCons "Image_URL" 'PrefixI 'True) (S1 ('MetaSel ('Just "image_url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImageURL)) :+: C1 ('MetaCons "Text" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 text))))

data Attachment Source #

A file attached to the message, and the tools it should be added to

Constructors

Attachment 

Fields

Instances

Instances details
FromJSON Attachment Source # 
Instance details

Defined in OpenAI.V1.Message

ToJSON Attachment Source # 
Instance details

Defined in OpenAI.V1.Message

Generic Attachment Source # 
Instance details

Defined in OpenAI.V1.Message

Associated Types

type Rep Attachment :: Type -> Type #

Show Attachment Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep Attachment Source # 
Instance details

Defined in OpenAI.V1.Message

type Rep Attachment = D1 ('MetaData "Attachment" "OpenAI.V1.Message" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "Attachment" 'PrefixI 'True) (S1 ('MetaSel ('Just "file_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FileID) :*: S1 ('MetaSel ('Just "tools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Tool)))))