mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-29 03:53:14 +03:00
Temperature can now be adjusted via CLI.
This commit is contained in:
parent
737ab428ed
commit
805aaef1dd
@ -33,7 +33,8 @@ data NewProjectConfig = NewProjectConfig
|
||||
{ projectAuth :: !(Maybe AuthProvider),
|
||||
-- One of the Tailwind color names: https://tailwindcss.com/docs/customizing-colors
|
||||
projectPrimaryColor :: !(Maybe String),
|
||||
projectDefaultGptModel :: !(Maybe GPT.Model)
|
||||
projectDefaultGptModel :: !(Maybe GPT.Model),
|
||||
projectDefaultGptTemperature :: !(Maybe Float)
|
||||
}
|
||||
deriving (Show)
|
||||
|
||||
@ -42,11 +43,13 @@ instance Aeson.FromJSON NewProjectConfig where
|
||||
auth <- obj .:? "auth"
|
||||
primaryColor <- obj .:? "primaryColor"
|
||||
defaultGptModel <- obj .:? "defaultGptModel"
|
||||
defaultGptTemperature <- obj .:? "defaultGptTemperature"
|
||||
return
|
||||
( NewProjectConfig
|
||||
{ projectAuth = auth,
|
||||
projectPrimaryColor = primaryColor,
|
||||
projectDefaultGptModel = defaultGptModel
|
||||
projectDefaultGptModel = defaultGptModel,
|
||||
projectDefaultGptTemperature = defaultGptTemperature
|
||||
}
|
||||
)
|
||||
|
||||
@ -55,7 +58,8 @@ emptyNewProjectConfig =
|
||||
NewProjectConfig
|
||||
{ projectAuth = Nothing,
|
||||
projectPrimaryColor = Nothing,
|
||||
projectDefaultGptModel = Nothing
|
||||
projectDefaultGptModel = Nothing,
|
||||
projectDefaultGptTemperature = Nothing
|
||||
}
|
||||
|
||||
getProjectAuth :: NewProjectDetails -> AuthProvider
|
||||
@ -133,7 +137,7 @@ defaultChatGPTParams :: NewProjectDetails -> ChatGPTParams
|
||||
defaultChatGPTParams projectDetails =
|
||||
GPT.ChatGPTParams
|
||||
{ GPT._model = fromMaybe GPT.GPT_3_5_turbo_16k (projectDefaultGptModel $ _projectConfig projectDetails),
|
||||
GPT._temperature = Just 0.7
|
||||
GPT._temperature = Just $ fromMaybe 0.7 (projectDefaultGptTemperature $ _projectConfig projectDetails)
|
||||
}
|
||||
|
||||
defaultChatGPTParamsForFixing :: NewProjectDetails -> ChatGPTParams
|
||||
|
Loading…
Reference in New Issue
Block a user