[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:
parent
a781576f16
commit
ea680484d3
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue