[FEATURE] Add "base path" to Azure OpenAI embeddings node (#3086)

Add "base path" to Azure OpenAI embeddings node #3048

Co-authored-by: Jingun Jung <jingun.jung@wedx.cc>
This commit is contained in:
Jingun Jung 2024-08-27 00:12:04 +09:00 committed by GitHub
parent a781576f16
commit ea680484d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 1 deletions

View File

@ -44,6 +44,13 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
type: 'number',
optional: true,
additionalParams: true
},
{
label: 'BasePath',
name: 'basepath',
type: 'string',
optional: true,
additionalParams: true
}
]
}
@ -51,6 +58,7 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const batchSize = nodeData.inputs?.batchSize as string
const timeout = nodeData.inputs?.timeout as string
const basePath = nodeData.inputs?.basepath as string
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const azureOpenAIApiKey = getCredentialParam('azureOpenAIApiKey', credentialData, nodeData)
@ -62,7 +70,8 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
azureOpenAIApiKey,
azureOpenAIApiInstanceName,
azureOpenAIApiDeploymentName,
azureOpenAIApiVersion
azureOpenAIApiVersion,
azureOpenAIBasePath: basePath
}
if (batchSize) obj.batchSize = parseInt(batchSize, 10)