Wasp AI: small fixes.

This commit is contained in:
Martin Sosic 2023-07-07 15:46:43 +02:00
parent 64163763e3
commit e3f09be9ae
2 changed files with 4 additions and 2 deletions

View File

@ -126,7 +126,9 @@ queryChatGPT params messages = do
( liftIO $
(Right <$> ChatGPT.queryChatGPT key params' messages')
`catchRetryableHttpException` ( \e -> do
hPutStrLn stderr $ "Caught retryable HTTP exception while doing ChatGPT request: " <> show e
hPutStrLn stderr $ "Caught retryable HTTP exception while doing ChatGPT request: "
<> maybe "" (\code -> "Status code: " <> show code <> "; ") (Utils.HTTP.getHttpExceptionStatusCode e)
<> show e
return $ Left e
)
)

View File

@ -41,7 +41,7 @@ type PlanRule = String
generatePlan :: NewProjectDetails -> [PlanRule] -> CodeAgent Plan
generatePlan newProjectDetails planRules = do
writeToLog "Generating plan... (slowest step, usually takes 30 to 60 seconds)"
writeToLog "Generating plan (slowest step, usually takes 30 to 90 seconds)..."
initialPlan <- queryChatGPTForJSON (defaultChatGPTParams {_model = planGptModel}) chatMessages
writeToLog $ "Initial plan generated!\n" <> summarizePlan initialPlan
writeToLog "Fixing initial plan..."