-- | The `ToolCall` typemodule OpenAI.V1.ToolCall ( -- * Types ToolCall(..) , Function(..) ) whereimport OpenAI.Prelude-- | A called functiondata Function = Function{ name :: Text, arguments :: Text } deriving stock (Generic, Show) deriving anyclass (FromJSON, ToJSON)-- | Tools called by the modeldata ToolCall = ToolCall_Function { id :: Text , function :: Function } deriving stock (Generic, Show)toolCallOptions :: OptionstoolCallOptions = aesonOptions { sumEncoding = TaggedObject{ tagFieldName = "type", contentsFieldName = "" } , tagSingleConstructors = True , constructorTagModifier = stripPrefix "ToolCall_" }instance ToJSON ToolCall where toJSON = genericToJSON toolCallOptionsinstance FromJSON ToolCall where parseJSON = genericParseJSON toolCallOptions