Safe Haskell | None |
---|---|
Language | Haskell2010 |
The API
Documentation
type OpenAIAuth = BasicAuth "OpenAI API" () Source #
type OpenAIApi = "v1" :> OpenAIApiInternal Source #
type OpenAIApiInternal = ("engines" :> EnginesApi) :<|> (("files" :> FilesApi) :<|> AnswerApi) Source #
type FilesApi = (OpenAIAuth :> (MultipartForm Mem FileCreate :> Post '[JSON] File)) :<|> (OpenAIAuth :> (Capture "file_id" FileId :> Delete '[JSON] FileDeleteConfirmation)) Source #
type AnswerApi = "answers" :> (OpenAIAuth :> (ReqBody '[JSON] AnswerReq :> Post '[JSON] AnswerResp)) Source #
type EnginesApi = (OpenAIAuth :> Get '[JSON] (OpenAIList Engine)) :<|> ((OpenAIAuth :> (Capture "engine_id" EngineId :> Get '[JSON] Engine)) :<|> ((OpenAIAuth :> (Capture "engine_id" EngineId :> ("completions" :> (ReqBody '[JSON] TextCompletionCreate :> Post '[JSON] TextCompletion)))) :<|> (OpenAIAuth :> (Capture "engine_id" EngineId :> ("search" :> (ReqBody '[JSON] SearchResultCreate :> Post '[JSON] (OpenAIList SearchResult))))))) Source #