| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenAI.V1.Chat.Completions
Description
/v1/chat/completions
Streaming is not implemented here;
Synopsis
- data CreateChatCompletion = CreateChatCompletion {
- messages :: Vector (Message (Vector Content))
- model :: Model
- store :: Maybe Bool
- metadata :: Maybe (Map Text Text)
- frequency_penalty :: Maybe Double
- logit_bias :: Maybe (Map Word Int)
- logprobs :: Maybe Bool
- top_logprobs :: Maybe Word
- max_completion_tokens :: Maybe Natural
- n :: Maybe Natural
- modalities :: Maybe (Vector Modality)
- prediction :: Maybe Prediction
- audio :: Maybe AudioParameters
- presence_penalty :: Maybe Double
- reasoning_effort :: Maybe ReasoningEffort
- response_format :: Maybe ResponseFormat
- seed :: Maybe Integer
- service_tier :: Maybe (AutoOr ServiceTier)
- stop :: Maybe (Vector Text)
- stream :: Maybe Bool
- temperature :: Maybe Double
- top_p :: Maybe Double
- tools :: Maybe (Vector Tool)
- tool_choice :: Maybe ToolChoice
- parallel_tool_calls :: Maybe Bool
- user :: Maybe Text
- web_search_options :: Maybe WebSearchOptions
- _CreateChatCompletion :: CreateChatCompletion
- data ChatCompletionObject = ChatCompletionObject {}
- data Choice = Choice {}
- data Message content
- messageToContent :: Monoid content => Message content -> content
- data Content
- = Text { }
- | Image_URL { }
- | Input_Audio { }
- data ChatCompletionChunk = ChatCompletionChunk {
- id :: Text
- choices :: Vector ChunkChoice
- created :: POSIXTime
- model :: Model
- service_tier :: Maybe ServiceTier
- system_fingerprint :: Maybe Text
- object :: Text
- usage :: Maybe (Usage CompletionTokensDetails PromptTokensDetails)
- data ChunkChoice = ChunkChoice {}
- data Delta = Delta {
- delta_content :: Maybe Text
- delta_refusal :: Maybe Text
- delta_role :: Maybe Text
- delta_tool_calls :: Maybe (Vector ToolCall)
- type ChatCompletionStreamEvent = ChatCompletionChunk
- data InputAudio = InputAudio {
- data_ :: Text
- format :: AudioFormat
- data ImageURL = ImageURL {}
- data AudioData = AudioData {}
- data Modality
- data Prediction = Content {}
- data Voice
- data AudioFormat
- data AudioParameters = AudioParameters {
- voice :: Voice
- format :: AudioFormat
- data ResponseFormat
- type ServiceTier = Text
- data ReasoningEffort
- data SearchContextSize
- data UserLocation = Approximate {}
- data WebSearchOptions = WebSearchOptions {}
- data FinishReason
- data Token = Token {}
- data LogProbs = LogProbs {}
- type API = "chat" :> ("completions" :> (ReqBody '[JSON] CreateChatCompletion :> Post '[JSON] ChatCompletionObject))
Main types
data CreateChatCompletion Source #
Request body for /v1/chat/completions
Constructors
| CreateChatCompletion | |
Fields
| |
Instances
data ChatCompletionObject Source #
ChatCompletion body
Constructors
| ChatCompletionObject | |
Fields
| |
Instances
| FromJSON ChatCompletionObject Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods parseJSON :: Value -> Parser ChatCompletionObject # parseJSONList :: Value -> Parser [ChatCompletionObject] # | |||||
| ToJSON ChatCompletionObject Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: ChatCompletionObject -> Value # toEncoding :: ChatCompletionObject -> Encoding # toJSONList :: [ChatCompletionObject] -> Value # toEncodingList :: [ChatCompletionObject] -> Encoding # omitField :: ChatCompletionObject -> Bool # | |||||
| Generic ChatCompletionObject Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
Methods from :: ChatCompletionObject -> Rep ChatCompletionObject x # to :: Rep ChatCompletionObject x -> ChatCompletionObject # | |||||
| Show ChatCompletionObject Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> ChatCompletionObject -> ShowS # show :: ChatCompletionObject -> String # showList :: [ChatCompletionObject] -> ShowS # | |||||
| type Rep ChatCompletionObject Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep ChatCompletionObject = D1 ('MetaData "ChatCompletionObject" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ChatCompletionObject" 'PrefixI 'True) (((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "choices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Choice))) :*: (S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime) :*: S1 ('MetaSel ('Just "model") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Model))) :*: ((S1 ('MetaSel ('Just "reasoning_effort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ReasoningEffort)) :*: S1 ('MetaSel ('Just "service_tier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ServiceTier))) :*: (S1 ('MetaSel ('Just "system_fingerprint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "usage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Usage CompletionTokensDetails PromptTokensDetails))))))) | |||||
A chat completion choice
Constructors
| Choice | |
Instances
| FromJSON Choice Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Choice Source # | |||||
| Generic Choice Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Choice Source # | |||||
| type Rep Choice Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep Choice = D1 ('MetaData "Choice" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Choice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "finish_reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)) :*: (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Message Text)) :*: S1 ('MetaSel ('Just "logprobs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogProbs))))) | |||||
A message from the conversation so far
Constructors
| System | |
| User | |
| Assistant | |
Fields
| |
| Tool | |
Fields
| |
Instances
| FromJSON content => FromJSON (Message content) Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON content => ToJSON (Message content) Source # | |||||
| Generic (Message content) Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show content => Show (Message content) Source # | |||||
| type Rep (Message content) Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep (Message content) = D1 ('MetaData "Message" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "System" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 content) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :+: C1 ('MetaCons "User" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 content) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))) :+: (C1 ('MetaCons "Assistant" 'PrefixI 'True) ((S1 ('MetaSel ('Just "assistant_content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe content)) :*: S1 ('MetaSel ('Just "refusal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "assistant_audio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AudioData)) :*: S1 ('MetaSel ('Just "tool_calls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector ToolCall)))))) :+: C1 ('MetaCons "Tool" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 content) :*: S1 ('MetaSel ('Just "tool_call_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) | |||||
messageToContent :: Monoid content => Message content -> content Source #
Extract the message body from a Message
Normally this would just be the content field selector, but the problem
is that the content field for the Assistant constructor is not required
to be present, so we provide a utility function to default to extract the
content field for all constructors, defaulting to mempty for the special
case where the Message is an Assistant constructor with a missing
content field
A content part
Constructors
| Text | |
| Image_URL | |
| Input_Audio | |
Fields | |
Instances
| FromJSON Content Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Content Source # | |||||
| IsString Content Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods fromString :: String -> Content # | |||||
| Generic Content Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Content Source # | |||||
| type Rep Content Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep Content = D1 ('MetaData "Content" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Text" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "Image_URL" 'PrefixI 'True) (S1 ('MetaSel ('Just "image_url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ImageURL)) :+: C1 ('MetaCons "Input_Audio" 'PrefixI 'True) (S1 ('MetaSel ('Just "input_audio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InputAudio)))) | |||||
Streaming types
data ChatCompletionChunk Source #
Chat completion chunk (streaming response)
Constructors
| ChatCompletionChunk | |
Fields
| |
Instances
| FromJSON ChatCompletionChunk Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods parseJSON :: Value -> Parser ChatCompletionChunk # parseJSONList :: Value -> Parser [ChatCompletionChunk] # | |||||
| ToJSON ChatCompletionChunk Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: ChatCompletionChunk -> Value # toEncoding :: ChatCompletionChunk -> Encoding # toJSONList :: [ChatCompletionChunk] -> Value # toEncodingList :: [ChatCompletionChunk] -> Encoding # omitField :: ChatCompletionChunk -> Bool # | |||||
| Generic ChatCompletionChunk Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
Methods from :: ChatCompletionChunk -> Rep ChatCompletionChunk x # to :: Rep ChatCompletionChunk x -> ChatCompletionChunk # | |||||
| Show ChatCompletionChunk Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> ChatCompletionChunk -> ShowS # show :: ChatCompletionChunk -> String # showList :: [ChatCompletionChunk] -> ShowS # | |||||
| type Rep ChatCompletionChunk Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep ChatCompletionChunk = D1 ('MetaData "ChatCompletionChunk" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ChatCompletionChunk" 'PrefixI 'True) (((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "choices") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector ChunkChoice))) :*: (S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime) :*: S1 ('MetaSel ('Just "model") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Model))) :*: ((S1 ('MetaSel ('Just "service_tier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ServiceTier)) :*: S1 ('MetaSel ('Just "system_fingerprint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "usage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Usage CompletionTokensDetails PromptTokensDetails))))))) | |||||
data ChunkChoice Source #
A streaming choice chunk
Constructors
| ChunkChoice | |
Instances
| FromJSON ChunkChoice Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON ChunkChoice Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: ChunkChoice -> Value # toEncoding :: ChunkChoice -> Encoding # toJSONList :: [ChunkChoice] -> Value # toEncodingList :: [ChunkChoice] -> Encoding # omitField :: ChunkChoice -> Bool # | |||||
| Generic ChunkChoice Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show ChunkChoice Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> ChunkChoice -> ShowS # show :: ChunkChoice -> String # showList :: [ChunkChoice] -> ShowS # | |||||
| type Rep ChunkChoice Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep ChunkChoice = D1 ('MetaData "ChunkChoice" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ChunkChoice" 'PrefixI 'True) ((S1 ('MetaSel ('Just "delta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Delta) :*: S1 ('MetaSel ('Just "finish_reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "index") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "logprobs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LogProbs))))) | |||||
Delta message content for streaming
Constructors
| Delta | |
Fields
| |
Instances
| FromJSON Delta Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Delta Source # | |||||
| Generic Delta Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Delta Source # | |||||
| type Rep Delta Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep Delta = D1 ('MetaData "Delta" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Delta" 'PrefixI 'True) ((S1 ('MetaSel ('Just "delta_content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "delta_refusal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "delta_role") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "delta_tool_calls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector ToolCall)))))) | |||||
type ChatCompletionStreamEvent = ChatCompletionChunk Source #
Type alias for streaming events (currently just chunks)
Other types
data InputAudio Source #
Audio content part
Constructors
| InputAudio | |
Fields
| |
Instances
| FromJSON InputAudio Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON InputAudio Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: InputAudio -> Value # toEncoding :: InputAudio -> Encoding # toJSONList :: [InputAudio] -> Value # toEncodingList :: [InputAudio] -> Encoding # omitField :: InputAudio -> Bool # | |||||
| Generic InputAudio Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show InputAudio Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> InputAudio -> ShowS # show :: InputAudio -> String # showList :: [InputAudio] -> ShowS # | |||||
| type Rep InputAudio Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep InputAudio = D1 ('MetaData "InputAudio" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "InputAudio" 'PrefixI 'True) (S1 ('MetaSel ('Just "data_") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AudioFormat))) | |||||
Image content part
Instances
| FromJSON ImageURL Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON ImageURL Source # | |||||
| Generic ImageURL Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show ImageURL Source # | |||||
| type Rep ImageURL Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep ImageURL = D1 ('MetaData "ImageURL" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ImageURL" 'PrefixI 'True) (S1 ('MetaSel ('Just "url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "detail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (AutoOr Text))))) | |||||
Data about a previous audio response from the model. Learn more
Instances
| FromJSON AudioData Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON AudioData Source # | |||||
| Generic AudioData Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show AudioData Source # | |||||
| type Rep AudioData Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
Output types that you would like the model to generate for this request
Constructors
| Modality_Text | |
| Modality_Audio |
Instances
| FromJSON Modality Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Modality Source # | |||||
| Generic Modality Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Modality Source # | |||||
| type Rep Modality Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
data Prediction Source #
Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content
Instances
| FromJSON Prediction Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Prediction Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: Prediction -> Value # toEncoding :: Prediction -> Encoding # toJSONList :: [Prediction] -> Value # toEncodingList :: [Prediction] -> Encoding # omitField :: Prediction -> Bool # | |||||
| Generic Prediction Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Prediction Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> Prediction -> ShowS # show :: Prediction -> String # showList :: [Prediction] -> ShowS # | |||||
| type Rep Prediction Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep Prediction = D1 ('MetaData "Prediction" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Content" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
The voice the model uses to respond
Instances
| FromJSON Voice Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Voice Source # | |||||
| Generic Voice Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Voice Source # | |||||
| type Rep Voice Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep Voice = D1 ('MetaData "Voice" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "Ash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ballad" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Coral" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Sage" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Verse" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data AudioFormat Source #
Specifies the output audio format
Instances
| FromJSON AudioFormat Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON AudioFormat Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: AudioFormat -> Value # toEncoding :: AudioFormat -> Encoding # toJSONList :: [AudioFormat] -> Value # toEncodingList :: [AudioFormat] -> Encoding # omitField :: AudioFormat -> Bool # | |||||
| Generic AudioFormat Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show AudioFormat Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> AudioFormat -> ShowS # show :: AudioFormat -> String # showList :: [AudioFormat] -> ShowS # | |||||
| type Rep AudioFormat Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep AudioFormat = D1 ('MetaData "AudioFormat" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "WAV" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MP3" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FLAC" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Opus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PCM16" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data AudioParameters Source #
Parameters for audio output
Constructors
| AudioParameters | |
Fields
| |
Instances
| FromJSON AudioParameters Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods parseJSON :: Value -> Parser AudioParameters # parseJSONList :: Value -> Parser [AudioParameters] # | |||||
| ToJSON AudioParameters Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: AudioParameters -> Value # toEncoding :: AudioParameters -> Encoding # toJSONList :: [AudioParameters] -> Value # toEncodingList :: [AudioParameters] -> Encoding # omitField :: AudioParameters -> Bool # | |||||
| Generic AudioParameters Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
Methods from :: AudioParameters -> Rep AudioParameters x # to :: Rep AudioParameters x -> AudioParameters # | |||||
| Show AudioParameters Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> AudioParameters -> ShowS # show :: AudioParameters -> String # showList :: [AudioParameters] -> ShowS # | |||||
| type Rep AudioParameters Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep AudioParameters = D1 ('MetaData "AudioParameters" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "AudioParameters" 'PrefixI 'True) (S1 ('MetaSel ('Just "voice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Voice) :*: S1 ('MetaSel ('Just "format") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AudioFormat))) | |||||
data ResponseFormat Source #
An object specifying the format that the model must output
Constructors
| ResponseFormat_Text | |
| JSON_Object | |
| JSON_Schema | |
Fields | |
Instances
| FromJSON ResponseFormat Source # | |||||
Defined in OpenAI.V1.ResponseFormat Methods parseJSON :: Value -> Parser ResponseFormat # parseJSONList :: Value -> Parser [ResponseFormat] # | |||||
| ToJSON ResponseFormat Source # | |||||
Defined in OpenAI.V1.ResponseFormat Methods toJSON :: ResponseFormat -> Value # toEncoding :: ResponseFormat -> Encoding # toJSONList :: [ResponseFormat] -> Value # toEncodingList :: [ResponseFormat] -> Encoding # omitField :: ResponseFormat -> Bool # | |||||
| Generic ResponseFormat Source # | |||||
Defined in OpenAI.V1.ResponseFormat Associated Types
Methods from :: ResponseFormat -> Rep ResponseFormat x # to :: Rep ResponseFormat x -> ResponseFormat # | |||||
| Show ResponseFormat Source # | |||||
Defined in OpenAI.V1.ResponseFormat Methods showsPrec :: Int -> ResponseFormat -> ShowS # show :: ResponseFormat -> String # showList :: [ResponseFormat] -> ShowS # | |||||
| type Rep ResponseFormat Source # | |||||
Defined in OpenAI.V1.ResponseFormat type Rep ResponseFormat = D1 ('MetaData "ResponseFormat" "OpenAI.V1.ResponseFormat" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "ResponseFormat_Text" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JSON_Object" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JSON_Schema" 'PrefixI 'True) (S1 ('MetaSel ('Just "json_schema") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JSONSchema)))) | |||||
type ServiceTier = Text Source #
Specifies the latency tier to use for processing the request
data ReasoningEffort Source #
Constrains effort on reasoning for reasoning models
Instances
| FromJSON ReasoningEffort Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods parseJSON :: Value -> Parser ReasoningEffort # parseJSONList :: Value -> Parser [ReasoningEffort] # | |||||
| ToJSON ReasoningEffort Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: ReasoningEffort -> Value # toEncoding :: ReasoningEffort -> Encoding # toJSONList :: [ReasoningEffort] -> Value # toEncodingList :: [ReasoningEffort] -> Encoding # omitField :: ReasoningEffort -> Bool # | |||||
| Generic ReasoningEffort Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
Methods from :: ReasoningEffort -> Rep ReasoningEffort x # to :: Rep ReasoningEffort x -> ReasoningEffort # | |||||
| Show ReasoningEffort Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> ReasoningEffort -> ShowS # show :: ReasoningEffort -> String # showList :: [ReasoningEffort] -> ShowS # | |||||
| type Rep ReasoningEffort Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep ReasoningEffort = D1 ('MetaData "ReasoningEffort" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "ReasoningEffort_Minimal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ReasoningEffort_Low" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ReasoningEffort_Medium" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ReasoningEffort_High" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data SearchContextSize Source #
High level guidance for the amount of context window space to use for the search
Instances
| FromJSON SearchContextSize Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods parseJSON :: Value -> Parser SearchContextSize # parseJSONList :: Value -> Parser [SearchContextSize] # | |||||
| ToJSON SearchContextSize Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: SearchContextSize -> Value # toEncoding :: SearchContextSize -> Encoding # toJSONList :: [SearchContextSize] -> Value # toEncodingList :: [SearchContextSize] -> Encoding # omitField :: SearchContextSize -> Bool # | |||||
| Generic SearchContextSize Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
Methods from :: SearchContextSize -> Rep SearchContextSize x # to :: Rep SearchContextSize x -> SearchContextSize # | |||||
| Show SearchContextSize Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> SearchContextSize -> ShowS # show :: SearchContextSize -> String # showList :: [SearchContextSize] -> ShowS # | |||||
| type Rep SearchContextSize Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep SearchContextSize = D1 ('MetaData "SearchContextSize" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "SearchContextSize_Low" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SearchContextSize_Medium" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SearchContextSize_High" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data UserLocation Source #
Approximate location parameters for the search
Constructors
| Approximate | |
Instances
| FromJSON UserLocation Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON UserLocation Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: UserLocation -> Value # toEncoding :: UserLocation -> Encoding # toJSONList :: [UserLocation] -> Value # toEncodingList :: [UserLocation] -> Encoding # omitField :: UserLocation -> Bool # | |||||
| Generic UserLocation Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show UserLocation Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> UserLocation -> ShowS # show :: UserLocation -> String # showList :: [UserLocation] -> ShowS # | |||||
| type Rep UserLocation Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep UserLocation = D1 ('MetaData "UserLocation" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Approximate" 'PrefixI 'True) ((S1 ('MetaSel ('Just "city") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "country") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "region") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "timezone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))) | |||||
data WebSearchOptions Source #
Search the web for relevant results to use in a response
Constructors
| WebSearchOptions | |
Instances
| FromJSON WebSearchOptions Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods parseJSON :: Value -> Parser WebSearchOptions # parseJSONList :: Value -> Parser [WebSearchOptions] # | |||||
| ToJSON WebSearchOptions Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: WebSearchOptions -> Value # toEncoding :: WebSearchOptions -> Encoding # toJSONList :: [WebSearchOptions] -> Value # toEncodingList :: [WebSearchOptions] -> Encoding # omitField :: WebSearchOptions -> Bool # | |||||
| Generic WebSearchOptions Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
Methods from :: WebSearchOptions -> Rep WebSearchOptions x # to :: Rep WebSearchOptions x -> WebSearchOptions # | |||||
| Show WebSearchOptions Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> WebSearchOptions -> ShowS # show :: WebSearchOptions -> String # showList :: [WebSearchOptions] -> ShowS # | |||||
| type Rep WebSearchOptions Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep WebSearchOptions = D1 ('MetaData "WebSearchOptions" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "WebSearchOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "search_context_size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SearchContextSize)) :*: S1 ('MetaSel ('Just "user_location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe UserLocation)))) | |||||
data FinishReason Source #
The reason the model stopped generating tokens
Constructors
| Stop | |
| Length | |
| Content_Filter | |
| Tool_Calls |
Instances
| FromJSON FinishReason Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON FinishReason Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods toJSON :: FinishReason -> Value # toEncoding :: FinishReason -> Encoding # toJSONList :: [FinishReason] -> Value # toEncodingList :: [FinishReason] -> Encoding # omitField :: FinishReason -> Bool # | |||||
| Generic FinishReason Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show FinishReason Source # | |||||
Defined in OpenAI.V1.Chat.Completions Methods showsPrec :: Int -> FinishReason -> ShowS # show :: FinishReason -> String # showList :: [FinishReason] -> ShowS # | |||||
| type Rep FinishReason Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep FinishReason = D1 ('MetaData "FinishReason" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) ((C1 ('MetaCons "Stop" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Length" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Content_Filter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Tool_Calls" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Message tokens with log probability information
Constructors
| Token | |
Instances
| FromJSON Token Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON Token Source # | |||||
| Generic Token Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show Token Source # | |||||
| type Rep Token Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep Token = D1 ('MetaData "Token" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "Token" 'PrefixI 'True) ((S1 ('MetaSel ('Just "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "logprob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "bytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Word8))) :*: S1 ('MetaSel ('Just "top_logprobs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Token)))))) | |||||
Log probability information for the choice
Instances
| FromJSON LogProbs Source # | |||||
Defined in OpenAI.V1.Chat.Completions | |||||
| ToJSON LogProbs Source # | |||||
| Generic LogProbs Source # | |||||
Defined in OpenAI.V1.Chat.Completions Associated Types
| |||||
| Show LogProbs Source # | |||||
| type Rep LogProbs Source # | |||||
Defined in OpenAI.V1.Chat.Completions type Rep LogProbs = D1 ('MetaData "LogProbs" "OpenAI.V1.Chat.Completions" "openai-2.2.1-FjXYHvgDuLi5dBzIG7AGPx" 'False) (C1 ('MetaCons "LogProbs" 'PrefixI 'True) (S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Token))) :*: S1 ('MetaSel ('Just "refusal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Vector Token))))) | |||||