mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
remove unsupported params in AzureOpenAIEmbedding
This commit is contained in:
@@ -55,20 +55,6 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
|
|||||||
],
|
],
|
||||||
default: '2023-03-15-preview'
|
default: '2023-03-15-preview'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: 'Strip New Lines',
|
|
||||||
name: 'stripNewLines',
|
|
||||||
type: 'boolean',
|
|
||||||
optional: true,
|
|
||||||
additionalParams: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Batch Size',
|
|
||||||
name: 'batchSize',
|
|
||||||
type: 'number',
|
|
||||||
optional: true,
|
|
||||||
additionalParams: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Timeout',
|
label: 'Timeout',
|
||||||
name: 'timeout',
|
name: 'timeout',
|
||||||
@@ -84,8 +70,6 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
|
|||||||
const azureOpenAIApiInstanceName = nodeData.inputs?.azureOpenAIApiInstanceName as string
|
const azureOpenAIApiInstanceName = nodeData.inputs?.azureOpenAIApiInstanceName as string
|
||||||
const azureOpenAIApiDeploymentName = nodeData.inputs?.azureOpenAIApiDeploymentName as string
|
const azureOpenAIApiDeploymentName = nodeData.inputs?.azureOpenAIApiDeploymentName as string
|
||||||
const azureOpenAIApiVersion = nodeData.inputs?.azureOpenAIApiVersion as string
|
const azureOpenAIApiVersion = nodeData.inputs?.azureOpenAIApiVersion as string
|
||||||
const stripNewLines = nodeData.inputs?.stripNewLines as boolean
|
|
||||||
const batchSize = nodeData.inputs?.batchSize as string
|
|
||||||
const timeout = nodeData.inputs?.timeout as string
|
const timeout = nodeData.inputs?.timeout as string
|
||||||
|
|
||||||
const obj: Partial<OpenAIEmbeddingsParams> & Partial<AzureOpenAIInput> = {
|
const obj: Partial<OpenAIEmbeddingsParams> & Partial<AzureOpenAIInput> = {
|
||||||
@@ -95,8 +79,6 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
|
|||||||
azureOpenAIApiVersion
|
azureOpenAIApiVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stripNewLines) obj.stripNewLines = stripNewLines
|
|
||||||
if (batchSize) obj.batchSize = parseInt(batchSize, 10)
|
|
||||||
if (timeout) obj.timeout = parseInt(timeout, 10)
|
if (timeout) obj.timeout = parseInt(timeout, 10)
|
||||||
|
|
||||||
const model = new OpenAIEmbeddings(obj)
|
const model = new OpenAIEmbeddings(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user