refactor temperature/top-p parsing for clarity

This commit is contained in:
Paulo Santos
2026-02-04 12:20:53 +00:00
committed by GitHub
parent 71c69d42b5
commit 1171309110
3 changed files with 5 additions and 5 deletions

View File

@@ -69,8 +69,8 @@ export async function run(): Promise<void> {
const temperatureInput = core.getInput('temperature')
const topPInput = core.getInput('top-p')
const temperature =
promptConfig?.modelParameters?.temperature ?? (temperatureInput !== '' ? parseFloat(temperatureInput) : undefined)
const topP = promptConfig?.modelParameters?.topP ?? (topPInput !== '' ? parseFloat(topPInput) : undefined)
promptConfig?.modelParameters?.temperature ?? (temperatureInput ? parseFloat(temperatureInput) : undefined)
const topP = promptConfig?.modelParameters?.topP ?? (topPInput ? parseFloat(topPInput) : undefined)
// Parse custom headers
const customHeadersInput = core.getInput('custom-headers')