Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 EmbeddingCreate = EmbeddingCreate {}
- data Embedding = Embedding {
- eEmbedding :: Vector Double
- eIndex :: Int
- newtype FineTuneId = FineTuneId {
- unFineTuneId :: Text
- data FineTuneCreate = FineTuneCreate {
- ftcTrainingFile :: FileId
- ftcValidationFile :: Maybe FileId
- ftcModel :: Maybe Text
- ftcBatchSize :: Maybe Int
- ftcNEpochs :: Maybe Text
- ftcLearningRateMultiplier :: Maybe Double
- ftcPromptLossWeight :: Maybe Double
- ftcComputeClassificationMetrics :: Maybe Bool
- ftcClassificationNClasses :: Maybe Int
- ftcClassificationPositiveClass :: Maybe Text
- defaultFineTuneCreate :: FileId -> FineTuneCreate
- data FineTune = FineTune {
- ftId :: FineTuneId
- ftModel :: Text
- ftCreatedAt :: Int
- ftEvents :: Vector FineTuneEvent
- ftTunedModel :: Maybe Text
- ftStatus :: Text
- data FineTuneEvent = FineTuneEvent {
- fteCreatedAt :: Int
- fteLevel :: Text
- fteMessage :: Text
- 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
- data SearchHunk = SearchHunk {
- shText :: Text
- shMetadata :: Maybe Text
- data ClassificationHunk = ClassificationHunk {}
- data FineTuneHunk = FineTuneHunk {
- fthPrompt :: Text
- fthCompletion :: 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
Instances
Eq TimeStamp Source # | |
Show TimeStamp Source # | |
ToJSON TimeStamp Source # | |
Defined in OpenAI.Resources | |
FromJSON TimeStamp Source # | |
ToHttpApiData TimeStamp Source # | |
Defined in OpenAI.Resources toUrlPiece :: TimeStamp -> Text # toEncodedUrlPiece :: TimeStamp -> Builder # toHeader :: TimeStamp -> ByteString # toQueryParam :: TimeStamp -> Text # |
newtype OpenAIList a Source #
A Vector
wrapper.
Instances
Engine
Instances
Eq EngineId Source # | |
Show EngineId Source # | |
ToJSON EngineId Source # | |
Defined in OpenAI.Resources | |
FromJSON EngineId Source # | |
ToHttpApiData EngineId Source # | |
Defined in OpenAI.Resources toUrlPiece :: EngineId -> Text # toEncodedUrlPiece :: EngineId -> Builder # toHeader :: EngineId -> ByteString # toQueryParam :: EngineId -> Text # |
Text completion
newtype TextCompletionId Source #
Instances
Eq TextCompletionId Source # | |
Defined in OpenAI.Resources (==) :: TextCompletionId -> TextCompletionId -> Bool # (/=) :: TextCompletionId -> TextCompletionId -> Bool # | |
Show TextCompletionId Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> TextCompletionId -> ShowS # show :: TextCompletionId -> String # showList :: [TextCompletionId] -> ShowS # | |
ToJSON TextCompletionId Source # | |
Defined in OpenAI.Resources toJSON :: TextCompletionId -> Value # toEncoding :: TextCompletionId -> Encoding # toJSONList :: [TextCompletionId] -> Value # toEncodingList :: [TextCompletionId] -> Encoding # | |
FromJSON TextCompletionId Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser TextCompletionId # parseJSONList :: Value -> Parser [TextCompletionId] # | |
ToHttpApiData TextCompletionId Source # | |
Defined in OpenAI.Resources toUrlPiece :: TextCompletionId -> Text # toEncodedUrlPiece :: TextCompletionId -> Builder # toHeader :: TextCompletionId -> ByteString # toQueryParam :: TextCompletionId -> Text # |
data TextCompletionChoice Source #
TextCompletionChoice | |
|
Instances
Eq TextCompletionChoice Source # | |
Defined in OpenAI.Resources (==) :: TextCompletionChoice -> TextCompletionChoice -> Bool # (/=) :: TextCompletionChoice -> TextCompletionChoice -> Bool # | |
Show TextCompletionChoice Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> TextCompletionChoice -> ShowS # show :: TextCompletionChoice -> String # showList :: [TextCompletionChoice] -> ShowS # | |
ToJSON TextCompletionChoice Source # | |
Defined in OpenAI.Resources toJSON :: TextCompletionChoice -> Value # toEncoding :: TextCompletionChoice -> Encoding # toJSONList :: [TextCompletionChoice] -> Value # toEncodingList :: [TextCompletionChoice] -> Encoding # | |
FromJSON TextCompletionChoice Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser TextCompletionChoice # parseJSONList :: Value -> Parser [TextCompletionChoice] # |
data TextCompletion Source #
Instances
Eq TextCompletion Source # | |
Defined in OpenAI.Resources (==) :: TextCompletion -> TextCompletion -> Bool # (/=) :: TextCompletion -> TextCompletion -> Bool # | |
Show TextCompletion Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> TextCompletion -> ShowS # show :: TextCompletion -> String # showList :: [TextCompletion] -> ShowS # | |
ToJSON TextCompletion Source # | |
Defined in OpenAI.Resources toJSON :: TextCompletion -> Value # toEncoding :: TextCompletion -> Encoding # toJSONList :: [TextCompletion] -> Value # toEncodingList :: [TextCompletion] -> Encoding # | |
FromJSON TextCompletion Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser TextCompletion # parseJSONList :: Value -> Parser [TextCompletion] # |
data TextCompletionCreate Source #
TextCompletionCreate | |
|
Instances
Eq TextCompletionCreate Source # | |
Defined in OpenAI.Resources (==) :: TextCompletionCreate -> TextCompletionCreate -> Bool # (/=) :: TextCompletionCreate -> TextCompletionCreate -> Bool # | |
Show TextCompletionCreate Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> TextCompletionCreate -> ShowS # show :: TextCompletionCreate -> String # showList :: [TextCompletionCreate] -> ShowS # | |
ToJSON TextCompletionCreate Source # | |
Defined in OpenAI.Resources toJSON :: TextCompletionCreate -> Value # toEncoding :: TextCompletionCreate -> Encoding # toJSONList :: [TextCompletionCreate] -> Value # toEncodingList :: [TextCompletionCreate] -> Encoding # | |
FromJSON TextCompletionCreate Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser TextCompletionCreate # parseJSONList :: Value -> Parser [TextCompletionCreate] # |
defaultTextCompletionCreate :: Text -> TextCompletionCreate Source #
Applies API defaults, only passing a prompt.
Embeddings
data EmbeddingCreate Source #
Instances
Eq EmbeddingCreate Source # | |
Defined in OpenAI.Resources (==) :: EmbeddingCreate -> EmbeddingCreate -> Bool # (/=) :: EmbeddingCreate -> EmbeddingCreate -> Bool # | |
Show EmbeddingCreate Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> EmbeddingCreate -> ShowS # show :: EmbeddingCreate -> String # showList :: [EmbeddingCreate] -> ShowS # | |
ToJSON EmbeddingCreate Source # | |
Defined in OpenAI.Resources toJSON :: EmbeddingCreate -> Value # toEncoding :: EmbeddingCreate -> Encoding # toJSONList :: [EmbeddingCreate] -> Value # toEncodingList :: [EmbeddingCreate] -> Encoding # | |
FromJSON EmbeddingCreate Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser EmbeddingCreate # parseJSONList :: Value -> Parser [EmbeddingCreate] # |
Fine tuning
newtype FineTuneId Source #
Instances
Eq FineTuneId Source # | |
Defined in OpenAI.Resources (==) :: FineTuneId -> FineTuneId -> Bool # (/=) :: FineTuneId -> FineTuneId -> Bool # | |
Show FineTuneId Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> FineTuneId -> ShowS # show :: FineTuneId -> String # showList :: [FineTuneId] -> ShowS # | |
ToJSON FineTuneId Source # | |
Defined in OpenAI.Resources toJSON :: FineTuneId -> Value # toEncoding :: FineTuneId -> Encoding # toJSONList :: [FineTuneId] -> Value # toEncodingList :: [FineTuneId] -> Encoding # | |
FromJSON FineTuneId Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser FineTuneId # parseJSONList :: Value -> Parser [FineTuneId] # | |
ToHttpApiData FineTuneId Source # | |
Defined in OpenAI.Resources toUrlPiece :: FineTuneId -> Text # toEncodedUrlPiece :: FineTuneId -> Builder # toHeader :: FineTuneId -> ByteString # toQueryParam :: FineTuneId -> Text # |
data FineTuneCreate Source #
Instances
Eq FineTuneCreate Source # | |
Defined in OpenAI.Resources (==) :: FineTuneCreate -> FineTuneCreate -> Bool # (/=) :: FineTuneCreate -> FineTuneCreate -> Bool # | |
Show FineTuneCreate Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> FineTuneCreate -> ShowS # show :: FineTuneCreate -> String # showList :: [FineTuneCreate] -> ShowS # | |
ToJSON FineTuneCreate Source # | |
Defined in OpenAI.Resources toJSON :: FineTuneCreate -> Value # toEncoding :: FineTuneCreate -> Encoding # toJSONList :: [FineTuneCreate] -> Value # toEncodingList :: [FineTuneCreate] -> Encoding # | |
FromJSON FineTuneCreate Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser FineTuneCreate # parseJSONList :: Value -> Parser [FineTuneCreate] # |
FineTune | |
|
data FineTuneEvent Source #
FineTuneEvent | |
|
Instances
Eq FineTuneEvent Source # | |
Defined in OpenAI.Resources (==) :: FineTuneEvent -> FineTuneEvent -> Bool # (/=) :: FineTuneEvent -> FineTuneEvent -> Bool # | |
Show FineTuneEvent Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> FineTuneEvent -> ShowS # show :: FineTuneEvent -> String # showList :: [FineTuneEvent] -> ShowS # | |
ToJSON FineTuneEvent Source # | |
Defined in OpenAI.Resources toJSON :: FineTuneEvent -> Value # toEncoding :: FineTuneEvent -> Encoding # toJSONList :: [FineTuneEvent] -> Value # toEncodingList :: [FineTuneEvent] -> Encoding # | |
FromJSON FineTuneEvent Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser FineTuneEvent # parseJSONList :: Value -> Parser [FineTuneEvent] # |
Searching
data SearchResult Source #
SearchResult | |
|
Instances
Eq SearchResult Source # | |
Defined in OpenAI.Resources (==) :: SearchResult -> SearchResult -> Bool # (/=) :: SearchResult -> SearchResult -> Bool # | |
Show SearchResult Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> SearchResult -> ShowS # show :: SearchResult -> String # showList :: [SearchResult] -> ShowS # | |
ToJSON SearchResult Source # | |
Defined in OpenAI.Resources toJSON :: SearchResult -> Value # toEncoding :: SearchResult -> Encoding # toJSONList :: [SearchResult] -> Value # toEncodingList :: [SearchResult] -> Encoding # | |
FromJSON SearchResult Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser SearchResult # parseJSONList :: Value -> Parser [SearchResult] # |
data SearchResultCreate Source #
Instances
Eq SearchResultCreate Source # | |
Defined in OpenAI.Resources (==) :: SearchResultCreate -> SearchResultCreate -> Bool # (/=) :: SearchResultCreate -> SearchResultCreate -> Bool # | |
Show SearchResultCreate Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> SearchResultCreate -> ShowS # show :: SearchResultCreate -> String # showList :: [SearchResultCreate] -> ShowS # | |
ToJSON SearchResultCreate Source # | |
Defined in OpenAI.Resources toJSON :: SearchResultCreate -> Value # toEncoding :: SearchResultCreate -> Encoding # toJSONList :: [SearchResultCreate] -> Value # toEncodingList :: [SearchResultCreate] -> Encoding # | |
FromJSON SearchResultCreate Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser SearchResultCreate # parseJSONList :: Value -> Parser [SearchResultCreate] # |
File API
data FileCreate Source #
FileCreate | |
|
Instances
Eq FileCreate Source # | |
Defined in OpenAI.Resources (==) :: FileCreate -> FileCreate -> Bool # (/=) :: FileCreate -> FileCreate -> Bool # | |
Show FileCreate Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> FileCreate -> ShowS # show :: FileCreate -> String # showList :: [FileCreate] -> ShowS # | |
ToMultipart Mem FileCreate Source # | |
Defined in OpenAI.Resources 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 toUrlPiece :: FileId -> Text # toEncodedUrlPiece :: FileId -> Builder # toHeader :: FileId -> ByteString # toQueryParam :: FileId -> Text # |
data SearchHunk Source #
SearchHunk | |
|
Instances
Eq SearchHunk Source # | |
Defined in OpenAI.Resources (==) :: SearchHunk -> SearchHunk -> Bool # (/=) :: SearchHunk -> SearchHunk -> Bool # | |
Show SearchHunk Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> SearchHunk -> ShowS # show :: SearchHunk -> String # showList :: [SearchHunk] -> ShowS # | |
ToJSON SearchHunk Source # | |
Defined in OpenAI.Resources toJSON :: SearchHunk -> Value # toEncoding :: SearchHunk -> Encoding # toJSONList :: [SearchHunk] -> Value # toEncodingList :: [SearchHunk] -> Encoding # | |
FromJSON SearchHunk Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser SearchHunk # parseJSONList :: Value -> Parser [SearchHunk] # |
data ClassificationHunk Source #
Instances
Eq ClassificationHunk Source # | |
Defined in OpenAI.Resources (==) :: ClassificationHunk -> ClassificationHunk -> Bool # (/=) :: ClassificationHunk -> ClassificationHunk -> Bool # | |
Show ClassificationHunk Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> ClassificationHunk -> ShowS # show :: ClassificationHunk -> String # showList :: [ClassificationHunk] -> ShowS # | |
ToJSON ClassificationHunk Source # | |
Defined in OpenAI.Resources toJSON :: ClassificationHunk -> Value # toEncoding :: ClassificationHunk -> Encoding # toJSONList :: [ClassificationHunk] -> Value # toEncodingList :: [ClassificationHunk] -> Encoding # | |
FromJSON ClassificationHunk Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser ClassificationHunk # parseJSONList :: Value -> Parser [ClassificationHunk] # |
data FineTuneHunk Source #
Instances
Eq FineTuneHunk Source # | |
Defined in OpenAI.Resources (==) :: FineTuneHunk -> FineTuneHunk -> Bool # (/=) :: FineTuneHunk -> FineTuneHunk -> Bool # | |
Show FineTuneHunk Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> FineTuneHunk -> ShowS # show :: FineTuneHunk -> String # showList :: [FineTuneHunk] -> ShowS # | |
ToJSON FineTuneHunk Source # | |
Defined in OpenAI.Resources toJSON :: FineTuneHunk -> Value # toEncoding :: FineTuneHunk -> Encoding # toJSONList :: [FineTuneHunk] -> Value # toEncodingList :: [FineTuneHunk] -> Encoding # | |
FromJSON FineTuneHunk Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser FineTuneHunk # parseJSONList :: Value -> Parser [FineTuneHunk] # |
data FileDeleteConfirmation Source #
Instances
Eq FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources | |
Show FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> FileDeleteConfirmation -> ShowS # show :: FileDeleteConfirmation -> String # showList :: [FileDeleteConfirmation] -> ShowS # | |
ToJSON FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources toJSON :: FileDeleteConfirmation -> Value # toEncoding :: FileDeleteConfirmation -> Encoding # toJSONList :: [FileDeleteConfirmation] -> Value # | |
FromJSON FileDeleteConfirmation Source # | |
Defined in OpenAI.Resources |
Answers API
AnswerReq | |
|
data AnswerResp Source #
AnswerResp | |
|
Instances
Eq AnswerResp Source # | |
Defined in OpenAI.Resources (==) :: AnswerResp -> AnswerResp -> Bool # (/=) :: AnswerResp -> AnswerResp -> Bool # | |
Show AnswerResp Source # | |
Defined in OpenAI.Resources showsPrec :: Int -> AnswerResp -> ShowS # show :: AnswerResp -> String # showList :: [AnswerResp] -> ShowS # | |
ToJSON AnswerResp Source # | |
Defined in OpenAI.Resources toJSON :: AnswerResp -> Value # toEncoding :: AnswerResp -> Encoding # toJSONList :: [AnswerResp] -> Value # toEncodingList :: [AnswerResp] -> Encoding # | |
FromJSON AnswerResp Source # | |
Defined in OpenAI.Resources parseJSON :: Value -> Parser AnswerResp # parseJSONList :: Value -> Parser [AnswerResp] # |