| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Threads.Messages
Contents
Description
/v1/threads:thread_idmessages
Synopsis
- newtype MessageID = MessageID {}
- data Message
- data ModifyMessage = ModifyMessage {}
- _ModifyMessage :: ModifyMessage
- data MessageObject = MessageObject {
- id :: MessageID
- object :: Text
- created_at :: POSIXTime
- thread_id :: ThreadID
- status :: Maybe Status
- incomplete_details :: Maybe IncompleteDetails
- completed_at :: Maybe POSIXTime
- incomplete_at :: Maybe POSIXTime
- role :: Text
- content :: Vector (Content TextObject)
- assistant_id :: Maybe AssistantID
- run_id :: Maybe RunID
- attachments :: Maybe (Vector Attachment)
- metadata :: Map Text Text
- data Status
- data IncompleteDetails = IncompleteDetails {}
- data File = File {}
- data Annotation
- = File_Citation {
- text :: Text
- file_citation :: File
- start_index :: Natural
- end_index :: Natural
- | File_Path { }
- = File_Citation {
- data TextObject = TextObject {
- value :: Text
- annotations :: Vector Annotation
- type API = Header' '[Required, Strict] "OpenAI-Beta" Text :> ("threads" :> ((Capture "thread_id" ThreadID :> ("messages" :> (ReqBody '[JSON] Message :> Post '[JSON] MessageObject))) :<|> ((Capture "thread_id" ThreadID :> ("messages" :> Get '[JSON] (ListOf MessageObject))) :<|> ((Capture "thread_id" ThreadID :> ("messages" :> (Capture "message_id" MessageID :> Get '[JSON] MessageObject))) :<|> ((Capture "thread_id" ThreadID :> ("messages" :> (Capture "message_id" MessageID :> (ReqBody '[JSON] ModifyMessage :> Post '[JSON] MessageObject)))) :<|> (Capture "thread_id" ThreadID :> ("messages" :> (Capture "message_id" MessageID :> Delete '[JSON] DeletionStatus))))))))
Main types
Message ID
Instances
| FromJSON MessageID Source # | |
Defined in OpenAI.V1.Threads.Messages | |
| ToJSON MessageID Source # | |
| IsString MessageID Source # | |
Defined in OpenAI.V1.Threads.Messages Methods fromString :: String -> MessageID # | |
| Show MessageID Source # | |
| ToHttpApiData MessageID Source # | |
Defined in OpenAI.V1.Threads.Messages Methods toUrlPiece :: MessageID -> Text # toEncodedUrlPiece :: MessageID -> Builder # toHeader :: MessageID -> ByteString # toQueryParam :: MessageID -> Text # toEncodedQueryParam :: MessageID -> Builder # | |
A message
Instances
data ModifyMessage Source #
Request body for /v1/threads/:thread_id/messages/:message_id
Instances
| FromJSON ModifyMessage Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods parseJSON :: Value -> Parser ModifyMessage # parseJSONList :: Value -> Parser [ModifyMessage] # | |||||
| ToJSON ModifyMessage Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods toJSON :: ModifyMessage -> Value # toEncoding :: ModifyMessage -> Encoding # toJSONList :: [ModifyMessage] -> Value # toEncodingList :: [ModifyMessage] -> Encoding # omitField :: ModifyMessage -> Bool # | |||||
| Generic ModifyMessage Source # | |||||
Defined in OpenAI.V1.Threads.Messages Associated Types
| |||||
| Show ModifyMessage Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods showsPrec :: Int -> ModifyMessage -> ShowS # show :: ModifyMessage -> String # showList :: [ModifyMessage] -> ShowS # | |||||
| type Rep ModifyMessage Source # | |||||
Defined in OpenAI.V1.Threads.Messages type Rep ModifyMessage = D1 ('MetaData "ModifyMessage" "OpenAI.V1.Threads.Messages" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ModifyMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Text))))) | |||||
_ModifyMessage :: ModifyMessage Source #
Default ModifyMessage
data MessageObject Source #
Represents a message within a thread.
Constructors
| MessageObject | |
Fields
| |
Instances
| FromJSON MessageObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods parseJSON :: Value -> Parser MessageObject # parseJSONList :: Value -> Parser [MessageObject] # | |||||
| ToJSON MessageObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods toJSON :: MessageObject -> Value # toEncoding :: MessageObject -> Encoding # toJSONList :: [MessageObject] -> Value # toEncodingList :: [MessageObject] -> Encoding # omitField :: MessageObject -> Bool # | |||||
| Generic MessageObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Associated Types
| |||||
| Show MessageObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods showsPrec :: Int -> MessageObject -> ShowS # show :: MessageObject -> String # showList :: [MessageObject] -> ShowS # | |||||
| type Rep MessageObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages type Rep MessageObject = D1 ('MetaData "MessageObject" "OpenAI.V1.Threads.Messages" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "MessageObject" 'PrefixI 'True) (((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MessageID) :*: (S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "created_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))) :*: ((S1 ('MetaSel ('Just "thread_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ThreadID) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Status))) :*: (S1 ('MetaSel ('Just "incomplete_details") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IncompleteDetails)) :*: S1 ('MetaSel ('Just "completed_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime))))) :*: ((S1 ('MetaSel ('Just "incomplete_at") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe POSIXTime)) :*: (S1 ('MetaSel ('Just "role") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector (Content TextObject))))) :*: ((S1 ('MetaSel ('Just "assistant_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AssistantID)) :*: S1 ('MetaSel ('Just "run_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RunID))) :*: (S1 ('MetaSel ('Just "attachments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Attachment))) :*: S1 ('MetaSel ('Just "metadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Text))))))) | |||||
Other types
The status of the message
Constructors
| In_Progress | |
| Incomplete | |
| Completed |
Instances
| FromJSON Status Source # | |||||
Defined in OpenAI.V1.Threads.Messages | |||||
| ToJSON Status Source # | |||||
| Generic Status Source # | |||||
Defined in OpenAI.V1.Threads.Messages Associated Types
| |||||
| Show Status Source # | |||||
| type Rep Status Source # | |||||
Defined in OpenAI.V1.Threads.Messages type Rep Status = D1 ('MetaData "Status" "OpenAI.V1.Threads.Messages" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "In_Progress" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Incomplete" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Completed" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data IncompleteDetails Source #
On an incomplete message, details about why the message is incomplete.
Constructors
| IncompleteDetails | |
Instances
| FromJSON IncompleteDetails Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods parseJSON :: Value -> Parser IncompleteDetails # parseJSONList :: Value -> Parser [IncompleteDetails] # | |||||
| ToJSON IncompleteDetails Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods toJSON :: IncompleteDetails -> Value # toEncoding :: IncompleteDetails -> Encoding # toJSONList :: [IncompleteDetails] -> Value # toEncodingList :: [IncompleteDetails] -> Encoding # omitField :: IncompleteDetails -> Bool # | |||||
| Generic IncompleteDetails Source # | |||||
Defined in OpenAI.V1.Threads.Messages Associated Types
Methods from :: IncompleteDetails -> Rep IncompleteDetails x # to :: Rep IncompleteDetails x -> IncompleteDetails # | |||||
| Show IncompleteDetails Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods showsPrec :: Int -> IncompleteDetails -> ShowS # show :: IncompleteDetails -> String # showList :: [IncompleteDetails] -> ShowS # | |||||
| type Rep IncompleteDetails Source # | |||||
Defined in OpenAI.V1.Threads.Messages type Rep IncompleteDetails = D1 ('MetaData "IncompleteDetails" "OpenAI.V1.Threads.Messages" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "IncompleteDetails" 'PrefixI 'True) (S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
File
Instances
data Annotation Source #
An annotation
Constructors
| File_Citation | |
Fields
| |
| File_Path | |
Instances
| FromJSON Annotation Source # | |||||
Defined in OpenAI.V1.Threads.Messages | |||||
| ToJSON Annotation Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods toJSON :: Annotation -> Value # toEncoding :: Annotation -> Encoding # toJSONList :: [Annotation] -> Value # toEncodingList :: [Annotation] -> Encoding # omitField :: Annotation -> Bool # | |||||
| Generic Annotation Source # | |||||
Defined in OpenAI.V1.Threads.Messages Associated Types
| |||||
| Show Annotation Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods showsPrec :: Int -> Annotation -> ShowS # show :: Annotation -> String # showList :: [Annotation] -> ShowS # | |||||
| type Rep Annotation Source # | |||||
Defined in OpenAI.V1.Threads.Messages type Rep Annotation = D1 ('MetaData "Annotation" "OpenAI.V1.Threads.Messages" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "File_Citation" 'PrefixI 'True) ((S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "file_citation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 File)) :*: (S1 ('MetaSel ('Just "start_index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "end_index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural))) :+: C1 ('MetaCons "File_Path" 'PrefixI 'True) ((S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "file_path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 File)) :*: (S1 ('MetaSel ('Just "start_index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "end_index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))) | |||||
data TextObject Source #
The text content that is part of a message.
Constructors
| TextObject | |
Fields
| |
Instances
| FromJSON TextObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages | |||||
| ToJSON TextObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods toJSON :: TextObject -> Value # toEncoding :: TextObject -> Encoding # toJSONList :: [TextObject] -> Value # toEncodingList :: [TextObject] -> Encoding # omitField :: TextObject -> Bool # | |||||
| IsString TextObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods fromString :: String -> TextObject # | |||||
| Generic TextObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Associated Types
| |||||
| Show TextObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages Methods showsPrec :: Int -> TextObject -> ShowS # show :: TextObject -> String # showList :: [TextObject] -> ShowS # | |||||
| type Rep TextObject Source # | |||||
Defined in OpenAI.V1.Threads.Messages type Rep TextObject = D1 ('MetaData "TextObject" "OpenAI.V1.Threads.Messages" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "TextObject" 'PrefixI 'True) (S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "annotations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Annotation)))) | |||||
Servant
type API = Header' '[Required, Strict] "OpenAI-Beta" Text :> ("threads" :> ((Capture "thread_id" ThreadID :> ("messages" :> (ReqBody '[JSON] Message :> Post '[JSON] MessageObject))) :<|> ((Capture "thread_id" ThreadID :> ("messages" :> Get '[JSON] (ListOf MessageObject))) :<|> ((Capture "thread_id" ThreadID :> ("messages" :> (Capture "message_id" MessageID :> Get '[JSON] MessageObject))) :<|> ((Capture "thread_id" ThreadID :> ("messages" :> (Capture "message_id" MessageID :> (ReqBody '[JSON] ModifyMessage :> Post '[JSON] MessageObject)))) :<|> (Capture "thread_id" ThreadID :> ("messages" :> (Capture "message_id" MessageID :> Delete '[JSON] DeletionStatus)))))))) Source #
Servant API