change parseInt to parseFloat

This commit is contained in:
chungyau97 2023-07-25 23:53:42 +08:00
parent bdf41778a4
commit b454083eaf
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ class ChatOpenAI_ChatModels implements INode {
}
if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10)
if (topP) obj.topP = parseInt(topP, 10)
if (topP) obj.topP = parseFloat(topP)
if (frequencyPenalty) obj.frequencyPenalty = parseInt(frequencyPenalty, 10)
if (presencePenalty) obj.presencePenalty = parseInt(presencePenalty, 10)
if (timeout) obj.timeout = parseInt(timeout, 10)

View File

@ -139,7 +139,7 @@ class OpenAI_LLMs implements INode {
}
if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10)
if (topP) obj.topP = parseInt(topP, 10)
if (topP) obj.topP = parseFloat(topP)
if (frequencyPenalty) obj.frequencyPenalty = parseInt(frequencyPenalty, 10)
if (presencePenalty) obj.presencePenalty = parseInt(presencePenalty, 10)
if (timeout) obj.timeout = parseInt(timeout, 10)