Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The API
Documentation
type OpenAIAuth = Auth '[Bearer] () Source #
type OpenAIApi = "v1" :> OpenAIApiInternal Source #
type OpenAIApiInternal = ("models" :> ModelsApi) :<|> (("completions" :> CompletionsApi) :<|> (("chat" :> ChatApi) :<|> (("edits" :> EditsApi) :<|> (("images" :> ImagesApi) :<|> (("embeddings" :> EmbeddingsApi) :<|> (("audio" :> AudioApi) :<|> (("files" :> FilesApi) :<|> (FineTuneApi :<|> ("engines" :> EnginesApi))))))))) Source #
type ModelsApi = (OpenAIAuth :> Get '[JSON] (OpenAIList Model)) :<|> (OpenAIAuth :> (Capture "model_id" ModelId :> Get '[JSON] Model)) Source #
type CompletionsApi = OpenAIAuth :> (ReqBody '[JSON] CompletionCreate :> Post '[JSON] CompletionResponse) Source #
type ChatApi = OpenAIAuth :> ("completions" :> (ReqBody '[JSON] ChatCompletionRequest :> Post '[JSON] ChatResponse)) Source #
type EditsApi = OpenAIAuth :> (ReqBody '[JSON] EditCreate :> Post '[JSON] EditResponse) Source #
type ImagesApi = (OpenAIAuth :> ("generations" :> (ReqBody '[JSON] ImageCreate :> Post '[JSON] ImageResponse))) :<|> ((OpenAIAuth :> ("edits" :> (ReqBody '[JSON] ImageEditRequest :> Post '[JSON] ImageResponse))) :<|> (OpenAIAuth :> ("variations" :> (ReqBody '[JSON] ImageVariationRequest :> Post '[JSON] ImageResponse)))) Source #
type EmbeddingsApi = OpenAIAuth :> (ReqBody '[JSON] EmbeddingCreate :> Post '[JSON] EmbeddingResponse) Source #
type AudioApi = (OpenAIAuth :> ("transcriptions" :> (MultipartForm Tmp AudioTranscriptionRequest :> Post '[JSON] AudioResponseData))) :<|> (OpenAIAuth :> ("translations" :> (MultipartForm Tmp AudioTranslationRequest :> Post '[JSON] AudioResponseData))) Source #
type FilesApi = (OpenAIAuth :> (MultipartForm Mem FileCreate :> Post '[JSON] File)) :<|> (OpenAIAuth :> (Capture "file_id" FileId :> Delete '[JSON] FileDeleteConfirmation)) Source #
type FineTuneApi = (OpenAIAuth :> ("fine-tunes" :> (ReqBody '[JSON] FineTuneCreate :> Post '[JSON] FineTune))) :<|> ((OpenAIAuth :> ("fine-tunes" :> Get '[JSON] (OpenAIList FineTune))) :<|> ((OpenAIAuth :> ("fine-tunes" :> (Capture "fine_tune_id" FineTuneId :> Get '[JSON] FineTune))) :<|> ((OpenAIAuth :> ("fine-tunes" :> (Capture "fine_tune_id" FineTuneId :> ("cancel" :> Post '[JSON] FineTune)))) :<|> (OpenAIAuth :> ("fine-tunes" :> (Capture "fine_tune_id" FineTuneId :> ("events" :> Get '[JSON] (OpenAIList FineTuneEvent)))))))) 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 :> ("embeddings" :> (ReqBody '[JSON] EngineEmbeddingCreate :> Post '[JSON] (OpenAIList EngineEmbedding))))))) Source #