Safe Haskell | Safe-Inferred |
---|---|
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
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 type Rep ModifyMessage :: Type -> Type # | |
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-1.0.0-DWUl3td9tpcnv1wfBaSVp" '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
Other types
The status of the message
Constructors
In_Progress | |
Incomplete | |
Completed |
Instances
FromJSON Status Source # | |
Defined in OpenAI.V1.Threads.Messages | |
Generic Status Source # | |
Show Status Source # | |
type Rep Status Source # | |
Defined in OpenAI.V1.Threads.Messages type Rep Status = D1 ('MetaData "Status" "OpenAI.V1.Threads.Messages" "openai-1.0.0-DWUl3td9tpcnv1wfBaSVp" '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] # | |
Generic IncompleteDetails Source # | |
Defined in OpenAI.V1.Threads.Messages Associated Types type Rep IncompleteDetails :: Type -> Type # 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-1.0.0-DWUl3td9tpcnv1wfBaSVp" 'False) (C1 ('MetaCons "IncompleteDetails" 'PrefixI 'True) (S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
File
data Annotation Source #
An annotation
Constructors
File_Citation | |
Fields
| |
File_Path | |
Instances
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 | |
IsString TextObject Source # | |
Defined in OpenAI.V1.Threads.Messages Methods fromString :: String -> TextObject # | |
Generic TextObject Source # | |
Defined in OpenAI.V1.Threads.Messages Associated Types type Rep TextObject :: Type -> Type # | |
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-1.0.0-DWUl3td9tpcnv1wfBaSVp" '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