Skip to content

Commit

Permalink
[FEATURE] Add "base path" to Azure OpenAI embeddings node (FlowiseAI#…
Browse files Browse the repository at this point in the history
…3086)

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

Co-authored-by: Jingun Jung <jingun.jung@wedx.cc>
  • Loading branch information
2 people authored and patrickalvesexperian committed Sep 3, 2024
1 parent b8db277 commit c585beb
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,21 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
type: 'number',
optional: true,
additionalParams: true
},
{
label: 'BasePath',
name: 'basepath',
type: 'string',
optional: true,
additionalParams: true
}
]
}

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)
Expand All @@ -62,7 +70,8 @@ class AzureOpenAIEmbedding_Embeddings implements INode {
azureOpenAIApiKey,
azureOpenAIApiInstanceName,
azureOpenAIApiDeploymentName,
azureOpenAIApiVersion
azureOpenAIApiVersion,
azureOpenAIBasePath: basePath
}

if (batchSize) obj.batchSize = parseInt(batchSize, 10)
Expand Down

0 comments on commit c585beb

Please sign in to comment.