mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor: Update Langchain to 0.1.41 & add support for Claude 3 (#8825)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Document } from 'langchain/document';
|
||||
import type { Embeddings } from 'langchain/embeddings/base';
|
||||
import type { Document } from '@langchain/core/documents';
|
||||
import type { Embeddings } from '@langchain/core/embeddings';
|
||||
import { MemoryVectorStore } from 'langchain/vectorstores/memory';
|
||||
|
||||
export class MemoryVectorStoreManager {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
|
||||
import type { VectorStore } from 'langchain/vectorstores/base';
|
||||
import type { VectorStore } from '@langchain/core/vectorstores';
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
import type {
|
||||
INodeCredentialDescription,
|
||||
@@ -13,8 +13,8 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
INodeListSearchResult,
|
||||
} from 'n8n-workflow';
|
||||
import type { Embeddings } from 'langchain/embeddings/base';
|
||||
import type { Document } from 'langchain/document';
|
||||
import type { Embeddings } from '@langchain/core/embeddings';
|
||||
import type { Document } from '@langchain/core/documents';
|
||||
import { logWrapper } from '../../../utils/logWrapper';
|
||||
import type { N8nJsonLoader } from '../../../utils/N8nJsonLoader';
|
||||
import type { N8nBinaryLoader } from '../../../utils/N8nBinaryLoader';
|
||||
|
||||
@@ -7,12 +7,11 @@ export async function pineconeIndexSearch(this: ILoadOptionsFunctions) {
|
||||
|
||||
const client = new Pinecone({
|
||||
apiKey: credentials.apiKey as string,
|
||||
environment: credentials.environment as string,
|
||||
});
|
||||
|
||||
const indexes = await client.listIndexes();
|
||||
|
||||
const results = indexes.map((index) => ({
|
||||
const results = (indexes.indexes ?? []).map((index) => ({
|
||||
name: index.name,
|
||||
value: index.name,
|
||||
}));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Document } from 'langchain/document';
|
||||
import type { Document } from '@langchain/core/documents';
|
||||
import type { INodeExecutionData } from 'n8n-workflow';
|
||||
import { N8nJsonLoader } from '../../../utils/N8nJsonLoader';
|
||||
import { N8nBinaryLoader } from '../../../utils/N8nBinaryLoader';
|
||||
|
||||
Reference in New Issue
Block a user