mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
add bathSize into AzureOpenAIEmbedding
This commit is contained in:
@@ -55,6 +55,14 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
|
|||||||
],
|
],
|
||||||
default: '2023-03-15-preview'
|
default: '2023-03-15-preview'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Batch Size',
|
||||||
|
name: 'batchSize',
|
||||||
|
type: 'number',
|
||||||
|
default: '1',
|
||||||
|
optional: true,
|
||||||
|
additionalParams: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Timeout',
|
label: 'Timeout',
|
||||||
name: 'timeout',
|
name: 'timeout',
|
||||||
@@ -70,6 +78,7 @@ 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 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> = {
|
||||||
@@ -79,6 +88,7 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
|
|||||||
azureOpenAIApiVersion
|
azureOpenAIApiVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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