Safe Haskell | None |
---|---|
Language | Haskell2010 |
OpenAI.Resources
Synopsis
- newtype TimeStamp = TimeStamp {}
- newtype OpenAIList a = OpenAIList {}
- newtype EngineId = EngineId {
- unEngineId :: Text
- data Engine = Engine {}
- newtype TextCompletionId = TextCompletionId {}
- data TextCompletionChoice = TextCompletionChoice {
- tccText :: Text
- tccIndex :: Int
- tccLogProps :: Maybe Int
- tccFinishReason :: Text
- data TextCompletion = TextCompletion {}
- data TextCompletionCreate = TextCompletionCreate {}
- defaultTextCompletionCreate :: Text -> TextCompletionCreate
- data SearchResult = SearchResult {
- srDocument :: Int
- srScore :: Double
- srMetadata :: Maybe Text
- data SearchResultCreate = SearchResultCreate {}
- data FileCreate = FileCreate {
- fcPurpose :: Text
- fcDocuments :: [FileHunk]
- newtype FileId = FileId {}
- data File = File {}
- data FileHunk = FileHunk {
- fhContent :: Text
- fhMetadata :: Maybe Text
- data FileDeleteConfirmation = FileDeleteConfirmation {}
- data AnswerReq = AnswerReq {
- arFile :: Maybe FileId
- arDocuments :: Maybe (Vector Text)
- arQuestion :: Text
- arSearchModel :: EngineId
- arModel :: EngineId
- arExamplesContext :: Text
- arExamples :: [[Text]]
- arReturnMetadata :: Bool
- data AnswerResp = AnswerResp {
- arsAnswers :: [Text]
Core Types
A UTCTime
wrapper that has unix timestamp JSON representation
Constructors
TimeStamp | |
Fields |
Instances
Eq TimeStamp Source # | |
Show TimeStamp Source # | |
ToJSON TimeStamp Source # | |
Defined in OpenAI.Resources | |
FromJSON TimeStamp Source # | |
ToHttpApiData TimeStamp Source # | |
Defined in OpenAI.Resources Methods toUrlPiece :: TimeStamp -> Text # toEncodedUrlPiece :: TimeStamp -> Builder # toHeader :: TimeStamp -> ByteString # toQueryParam :: TimeStamp -> Text # |
newtype OpenAIList a Source #
A Vector
wrapper.
Constructors
OpenAIList | |
Instances
Engine
Constructors
EngineId | |
Fields
|
Instances
Eq EngineId Source # | |
Show EngineId Source # | |
ToJSON EngineId Source # | |
Defined in OpenAI.Resources | |
FromJSON EngineId Source # | |
ToHttpApiData EngineId Source # | |
Defined in OpenAI.Resources Methods toUrlPiece :: EngineId -> Text # toEncodedUrlPiece :: EngineId -> Builder # toHeader :: EngineId -> ByteString # toQueryParam :: EngineId -> Text # |
Text completion
newtype TextCompletionId Source #
Constructors
TextCompletionId | |
Fields |
Instances
data TextCompletionChoice Source #
Constructors
TextCompletionChoice | |
Fields
|
Instances
Eq TextCompletionChoice Source # | |
Defined in OpenAI.Resources Methods (==) :: TextCompletionChoice -> TextCompletionChoice -> Bool # (/=) :: TextCompletionChoice -> TextCompletionChoice -> Bool # | |
Show TextCompletionChoice Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> TextCompletionChoice -> ShowS # show :: TextCompletionChoice -> String # showList :: [TextCompletionChoice] -> ShowS # | |
ToJSON TextCompletionChoice Source # | |
Defined in OpenAI.Resources Methods toJSON :: TextCompletionChoice -> Value # toEncoding :: TextCompletionChoice -> Encoding # toJSONList :: [TextCompletionChoice] -> Value # toEncodingList :: [TextCompletionChoice] -> Encoding # | |
FromJSON TextCompletionChoice Source # | |
Defined in OpenAI.Resources Methods parseJSON :: Value -> Parser TextCompletionChoice # parseJSONList :: Value -> Parser [TextCompletionChoice] # |
data TextCompletion Source #
Constructors
TextCompletion | |
Fields |
Instances
Eq TextCompletion Source # | |
Defined in OpenAI.Resources Methods (==) :: TextCompletion -> TextCompletion -> Bool # (/=) :: TextCompletion -> TextCompletion -> Bool # | |
Show TextCompletion Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> TextCompletion -> ShowS # show :: TextCompletion -> String # showList :: [TextCompletion] -> ShowS # | |
ToJSON TextCompletion Source # | |
Defined in OpenAI.Resources Methods toJSON :: TextCompletion -> Value # toEncoding :: TextCompletion -> Encoding # toJSONList :: [TextCompletion] -> Value # toEncodingList :: [TextCompletion] -> Encoding # | |
FromJSON TextCompletion Source # | |
Defined in OpenAI.Resources Methods parseJSON :: Value -> Parser TextCompletion # parseJSONList :: Value -> Parser [TextCompletion] # |
data TextCompletionCreate Source #
Constructors
TextCompletionCreate | |
Fields
|
Instances
Eq TextCompletionCreate Source # | |
Defined in OpenAI.Resources Methods (==) :: TextCompletionCreate -> TextCompletionCreate -> Bool # (/=) :: TextCompletionCreate -> TextCompletionCreate -> Bool # | |
Show TextCompletionCreate Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> TextCompletionCreate -> ShowS # show :: TextCompletionCreate -> String # showList :: [TextCompletionCreate] -> ShowS # | |
ToJSON TextCompletionCreate Source # | |
Defined in OpenAI.Resources Methods toJSON :: TextCompletionCreate -> Value # toEncoding :: TextCompletionCreate -> Encoding # toJSONList :: [TextCompletionCreate] -> Value # toEncodingList :: [TextCompletionCreate] -> Encoding # | |
FromJSON TextCompletionCreate Source # | |
Defined in OpenAI.Resources Methods parseJSON :: Value -> Parser TextCompletionCreate # parseJSONList :: Value -> Parser [TextCompletionCreate] # |
defaultTextCompletionCreate :: Text -> TextCompletionCreate Source #
Applies API defaults, only passing a prompt.
Searching
data SearchResult Source #
Constructors
SearchResult | |
Fields
|
Instances
Eq SearchResult Source # | |
Defined in OpenAI.Resources | |
Show SearchResult Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> SearchResult -> ShowS # show :: SearchResult -> String # showList :: [SearchResult] -> ShowS # | |
ToJSON SearchResult Source # | |
Defined in OpenAI.Resources Methods toJSON :: SearchResult -> Value # toEncoding :: SearchResult -> Encoding # toJSONList :: [SearchResult] -> Value # toEncodingList :: [SearchResult] -> Encoding # | |
FromJSON SearchResult Source # | |
Defined in OpenAI.Resources |
data SearchResultCreate Source #
Constructors
SearchResultCreate | |
Instances
Eq SearchResultCreate Source # | |
Defined in OpenAI.Resources Methods (==) :: SearchResultCreate -> SearchResultCreate -> Bool # (/=) :: SearchResultCreate -> SearchResultCreate -> Bool # | |
Show SearchResultCreate Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> SearchResultCreate -> ShowS # show :: SearchResultCreate -> String # showList :: [SearchResultCreate] -> ShowS # | |
ToJSON SearchResultCreate Source # | |
Defined in OpenAI.Resources Methods toJSON :: SearchResultCreate -> Value # toEncoding :: SearchResultCreate -> Encoding # toJSONList :: [SearchResultCreate] -> Value # toEncodingList :: [SearchResultCreate] -> Encoding # | |
FromJSON SearchResultCreate Source # | |
Defined in OpenAI.Resources Methods parseJSON :: Value -> Parser SearchResultCreate # parseJSONList :: Value -> Parser [SearchResultCreate] # |
File API
data FileCreate Source #
Constructors
FileCreate | |
Fields
|
Instances
Eq FileCreate Source # | |
Defined in OpenAI.Resources | |
Show FileCreate Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> FileCreate -> ShowS # show :: FileCreate -> String # showList :: [FileCreate] -> ShowS # | |
ToMultipart Mem FileCreate Source # | |
Defined in OpenAI.Resources Methods toMultipart :: FileCreate -> MultipartData Mem # |
Instances
Eq FileId Source # | |
Show FileId Source # | |
ToJSON FileId Source # | |
Defined in OpenAI.Resources | |
FromJSON FileId Source # | |
ToHttpApiData FileId Source # | |
Defined in OpenAI.Resources Methods toUrlPiece :: FileId -> Text # toEncodedUrlPiece :: FileId -> Builder # toHeader :: FileId -> ByteString # toQueryParam :: FileId -> Text # |
Instances
data FileDeleteConfirmation Source #
Constructors
FileDeleteConfirmation | |
Instances
Eq FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources Methods (==) :: FileDeleteConfirmation -> FileDeleteConfirmation -> Bool # (/=) :: FileDeleteConfirmation -> FileDeleteConfirmation -> Bool # | |
Show FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> FileDeleteConfirmation -> ShowS # show :: FileDeleteConfirmation -> String # showList :: [FileDeleteConfirmation] -> ShowS # | |
ToJSON FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources Methods toJSON :: FileDeleteConfirmation -> Value # toEncoding :: FileDeleteConfirmation -> Encoding # toJSONList :: [FileDeleteConfirmation] -> Value # | |
FromJSON FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources Methods parseJSON :: Value -> Parser FileDeleteConfirmation # parseJSONList :: Value -> Parser [FileDeleteConfirmation] # |
Answers API
Constructors
AnswerReq | |
Fields
|
data AnswerResp Source #
Constructors
AnswerResp | |
Fields
|
Instances
Eq AnswerResp Source # | |
Defined in OpenAI.Resources | |
Show AnswerResp Source # | |
Defined in OpenAI.Resources Methods showsPrec :: Int -> AnswerResp -> ShowS # show :: AnswerResp -> String # showList :: [AnswerResp] -> ShowS # | |
ToJSON AnswerResp Source # | |
Defined in OpenAI.Resources Methods toJSON :: AnswerResp -> Value # toEncoding :: AnswerResp -> Encoding # toJSONList :: [AnswerResp] -> Value # toEncodingList :: [AnswerResp] -> Encoding # | |
FromJSON AnswerResp Source # | |
Defined in OpenAI.Resources |