mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
chore: Update langchain and langchain/openai packages (#15804)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
||||||
import { OpenAIEmbeddings } from '@langchain/openai';
|
import { AzureOpenAIEmbeddings } from '@langchain/openai';
|
||||||
import {
|
import {
|
||||||
NodeConnectionTypes,
|
NodeConnectionTypes,
|
||||||
type INodeType,
|
type INodeType,
|
||||||
@@ -143,7 +143,7 @@ export class EmbeddingsAzureOpenAi implements INodeType {
|
|||||||
options.timeout = undefined;
|
options.timeout = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const embeddings = new OpenAIEmbeddings({
|
const embeddings = new AzureOpenAIEmbeddings({
|
||||||
azureOpenAIApiDeploymentName: modelName,
|
azureOpenAIApiDeploymentName: modelName,
|
||||||
// instance name only needed to set base url
|
// instance name only needed to set base url
|
||||||
azureOpenAIApiInstanceName: !credentials.endpoint ? credentials.resourceName : undefined,
|
azureOpenAIApiInstanceName: !credentials.endpoint ? credentials.resourceName : undefined,
|
||||||
|
|||||||
@@ -228,14 +228,12 @@ export class EmbeddingsOpenAi implements INodeType {
|
|||||||
configuration.baseURL = credentials.url as string;
|
configuration.baseURL = credentials.url as string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const embeddings = new OpenAIEmbeddings(
|
const embeddings = new OpenAIEmbeddings({
|
||||||
{
|
modelName: this.getNodeParameter('model', itemIndex, 'text-embedding-3-small') as string,
|
||||||
modelName: this.getNodeParameter('model', itemIndex, 'text-embedding-3-small') as string,
|
openAIApiKey: credentials.apiKey as string,
|
||||||
openAIApiKey: credentials.apiKey as string,
|
...options,
|
||||||
...options,
|
|
||||||
},
|
|
||||||
configuration,
|
configuration,
|
||||||
);
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
response: logWrapper(embeddings, this),
|
response: logWrapper(embeddings, this),
|
||||||
|
|||||||
509
pnpm-lock.yaml
generated
509
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -36,8 +36,8 @@ catalog:
|
|||||||
xss: 1.0.15
|
xss: 1.0.15
|
||||||
zod: 3.24.1
|
zod: 3.24.1
|
||||||
'zod-to-json-schema': 3.23.3
|
'zod-to-json-schema': 3.23.3
|
||||||
'@langchain/core': 0.3.30
|
'@langchain/core': 0.3.39
|
||||||
'@langchain/openai': 0.3.17
|
'@langchain/openai': 0.5.0
|
||||||
'@langchain/anthropic': 0.3.11
|
'@langchain/anthropic': 0.3.11
|
||||||
'@langchain/community': 0.3.24
|
'@langchain/community': 0.3.24
|
||||||
'@n8n_io/ai-assistant-sdk': 1.14.0
|
'@n8n_io/ai-assistant-sdk': 1.14.0
|
||||||
|
|||||||
Reference in New Issue
Block a user