Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Update Langchain dependencies (no-changelog) #9252

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"sqlite3"
],
"overrides": {
"@langchain/core": "0.1.41",
"@langchain/core": "0.1.61",
"@types/node": "^18.16.16",
"axios": "1.6.7",
"chokidar": "3.5.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { zodToJsonSchema } from 'zod-to-json-schema';
import type { OpenAI as OpenAIClient } from 'openai';
import type { OpenAIClient } from '@langchain/openai';
import type { StructuredTool } from '@langchain/core/tools';

// Copied from langchain(`langchain/src/tools/convert_to_openai.ts`)
Expand Down Expand Up @@ -33,9 +33,7 @@ export function formatToOpenAITool(tool: StructuredTool): OpenAIClient.Chat.Chat
};
}

export function formatToOpenAIAssistantTool(
tool: StructuredTool,
): OpenAIClient.Beta.AssistantCreateParams.AssistantToolsFunction {
export function formatToOpenAIAssistantTool(tool: StructuredTool): OpenAIClient.Beta.AssistantTool {
return {
type: 'function',
function: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type INodeTypeDescription,
type SupplyData,
} from 'n8n-workflow';
import { Calculator } from 'langchain/tools/calculator';
import { Calculator } from '@langchain/community/tools/calculator';
import { logWrapper } from '../../../utils/logWrapper';
import { getConnectionHintNoticeField } from '../../../utils/sharedFields';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export function formatToOpenAITool(tool: StructuredTool): OpenAIClient.Chat.Chat
};
}

export function formatToOpenAIAssistantTool(
tool: StructuredTool,
): OpenAIClient.Beta.AssistantCreateParams.AssistantToolsFunction {
export function formatToOpenAIAssistantTool(tool: StructuredTool): OpenAIClient.Beta.AssistantTool {
return {
type: 'function',
function: {
Expand Down
16 changes: 8 additions & 8 deletions packages/@n8n/nodes-langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@
"@google-ai/generativelanguage": "0.2.1",
"@google/generative-ai": "0.8.0",
"@huggingface/inference": "2.6.4",
"@langchain/anthropic": "^0.1.3",
"@langchain/cohere": "^0.0.5",
"@langchain/community": "0.0.44",
"@langchain/core": "0.1.41",
"@langchain/anthropic": "^0.1.16",
"@langchain/cohere": "^0.0.8",
"@langchain/community": "0.0.53",
"@langchain/core": "0.1.61",
"@langchain/google-genai": "^0.0.12",
"@langchain/mistralai": "0.0.13",
"@langchain/openai": "^0.0.16",
"@langchain/mistralai": "0.0.19",
"@langchain/openai": "^0.0.28",
"@langchain/pinecone": "^0.0.3",
OlegIvaniv marked this conversation as resolved.
Show resolved Hide resolved
"@langchain/redis": "^0.0.2",
"@n8n/typeorm": "0.3.20-9",
Expand All @@ -158,12 +158,12 @@
"html-to-text": "9.0.5",
"jest-mock-extended": "^3.0.4",
"json-schema-to-zod": "2.0.14",
"langchain": "0.1.25",
"langchain": "0.1.36",
"lodash": "4.17.21",
"mammoth": "1.6.0",
"n8n-nodes-base": "workspace:*",
"n8n-workflow": "workspace:*",
"openai": "4.26.1",
"openai": "4.32.1",
OlegIvaniv marked this conversation as resolved.
Show resolved Hide resolved
"pdf-parse": "1.1.1",
"pg": "8.11.3",
"redis": "4.6.12",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
"ts-essentials": "^7.0.3"
},
"dependencies": {
"@langchain/community": "0.0.44",
"@langchain/core": "0.1.41",
"@langchain/openai": "0.0.16",
"@langchain/community": "0.0.53",
"@langchain/core": "0.1.61",
"@langchain/openai": "0.0.28",
"@n8n/client-oauth2": "workspace:*",
"@n8n/localtunnel": "2.1.0",
"@n8n/n8n-nodes-langchain": "workspace:*",
Expand Down Expand Up @@ -138,7 +138,7 @@
"json-diff": "1.0.6",
"jsonschema": "1.4.1",
"jsonwebtoken": "9.0.2",
"langchain": "0.1.25",
"langchain": "0.1.36",
"ldapts": "4.2.6",
"lodash": "4.17.21",
"luxon": "3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@
"title-case": "3.0.3",
"transliteration": "2.3.5",
"xml2js": "0.6.2",
"@langchain/core": "0.1.41"
"@langchain/core": "0.1.61"
}
}
Loading
Loading