mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
remove unsupported params in AzureChatOpenAI & AzureOpenAI
This commit is contained in:
@@ -86,13 +86,6 @@ class AzureChatOpenAI_ChatModels implements INode {
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Top Probability',
|
||||
name: 'topP',
|
||||
type: 'number',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Frequency Penalty',
|
||||
name: 'frequencyPenalty',
|
||||
@@ -125,7 +118,6 @@ class AzureChatOpenAI_ChatModels implements INode {
|
||||
const azureOpenAIApiDeploymentName = nodeData.inputs?.azureOpenAIApiDeploymentName as string
|
||||
const azureOpenAIApiVersion = nodeData.inputs?.azureOpenAIApiVersion as string
|
||||
const maxTokens = nodeData.inputs?.maxTokens as string
|
||||
const topP = nodeData.inputs?.topP as string
|
||||
const frequencyPenalty = nodeData.inputs?.frequencyPenalty as string
|
||||
const presencePenalty = nodeData.inputs?.presencePenalty as string
|
||||
const timeout = nodeData.inputs?.timeout as string
|
||||
@@ -140,7 +132,6 @@ class AzureChatOpenAI_ChatModels implements INode {
|
||||
}
|
||||
|
||||
if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10)
|
||||
if (topP) obj.topP = parseInt(topP, 10)
|
||||
if (frequencyPenalty) obj.frequencyPenalty = parseInt(frequencyPenalty, 10)
|
||||
if (presencePenalty) obj.presencePenalty = parseInt(presencePenalty, 10)
|
||||
if (timeout) obj.timeout = parseInt(timeout, 10)
|
||||
|
||||
@@ -153,13 +153,6 @@ class AzureOpenAI_LLMs implements INode {
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Batch Size',
|
||||
name: 'batchSize',
|
||||
type: 'number',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Timeout',
|
||||
name: 'timeout',
|
||||
@@ -182,7 +175,6 @@ class AzureOpenAI_LLMs implements INode {
|
||||
const frequencyPenalty = nodeData.inputs?.frequencyPenalty as string
|
||||
const presencePenalty = nodeData.inputs?.presencePenalty as string
|
||||
const timeout = nodeData.inputs?.timeout as string
|
||||
const batchSize = nodeData.inputs?.batchSize as string
|
||||
const bestOf = nodeData.inputs?.bestOf as string
|
||||
|
||||
const obj: Partial<AzureOpenAIInput> & Partial<OpenAIInput> = {
|
||||
@@ -199,7 +191,6 @@ class AzureOpenAI_LLMs implements INode {
|
||||
if (frequencyPenalty) obj.frequencyPenalty = parseInt(frequencyPenalty, 10)
|
||||
if (presencePenalty) obj.presencePenalty = parseInt(presencePenalty, 10)
|
||||
if (timeout) obj.timeout = parseInt(timeout, 10)
|
||||
if (batchSize) obj.batchSize = parseInt(batchSize, 10)
|
||||
if (bestOf) obj.bestOf = parseInt(bestOf, 10)
|
||||
|
||||
const model = new OpenAI(obj)
|
||||
|
||||
Reference in New Issue
Block a user