refactor(core): Shovel around more of AI code (no-changelog) (#12218)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-16 13:46:19 +01:00
committed by GitHub
parent a8e7a05856
commit 2ce1644d01
138 changed files with 590 additions and 529 deletions

View File

@@ -1,4 +1,5 @@
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
import type { TextSplitter } from '@langchain/textsplitters';
import {
NodeConnectionType,
type INodeType,
@@ -7,11 +8,9 @@ import {
type SupplyData,
} from 'n8n-workflow';
import type { TextSplitter } from '@langchain/textsplitters';
import { logWrapper } from '../../../utils/logWrapper';
import { N8nBinaryLoader } from '../../../utils/N8nBinaryLoader';
import { getConnectionHintNoticeField, metadataFilterField } from '../../../utils/sharedFields';
import { logWrapper } from '@utils/logWrapper';
import { N8nBinaryLoader } from '@utils/N8nBinaryLoader';
import { getConnectionHintNoticeField, metadataFilterField } from '@utils/sharedFields';
// Dependencies needed underneath the hood for the loaders. We add them
// here only to track where what dependency is sued

View File

@@ -1,4 +1,5 @@
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
import type { TextSplitter } from '@langchain/textsplitters';
import {
NodeConnectionType,
type INodeType,
@@ -7,10 +8,9 @@ import {
type SupplyData,
} from 'n8n-workflow';
import type { TextSplitter } from '@langchain/textsplitters';
import { logWrapper } from '../../../utils/logWrapper';
import { N8nBinaryLoader } from '../../../utils/N8nBinaryLoader';
import { metadataFilterField } from '../../../utils/sharedFields';
import { logWrapper } from '@utils/logWrapper';
import { N8nBinaryLoader } from '@utils/N8nBinaryLoader';
import { metadataFilterField } from '@utils/sharedFields';
// Dependencies needed underneath the hood for the loaders. We add them
// here only to track where what dependency is sued
@@ -18,7 +18,7 @@ import { metadataFilterField } from '../../../utils/sharedFields';
import 'mammoth'; // for docx
import 'epub2'; // for epub
import 'pdf-parse'; // for pdf
import { N8nJsonLoader } from '../../../utils/N8nJsonLoader';
import { N8nJsonLoader } from '@utils/N8nJsonLoader';
export class DocumentDefaultDataLoader implements INodeType {
description: INodeTypeDescription = {

View File

@@ -1,4 +1,6 @@
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
import { GithubRepoLoader } from '@langchain/community/document_loaders/web/github';
import type { CharacterTextSplitter } from '@langchain/textsplitters';
import {
NodeConnectionType,
type INodeType,
@@ -6,10 +8,9 @@ import {
type ISupplyDataFunctions,
type SupplyData,
} from 'n8n-workflow';
import { GithubRepoLoader } from '@langchain/community/document_loaders/web/github';
import type { CharacterTextSplitter } from '@langchain/textsplitters';
import { logWrapper } from '../../../utils/logWrapper';
import { getConnectionHintNoticeField } from '../../../utils/sharedFields';
import { logWrapper } from '@utils/logWrapper';
import { getConnectionHintNoticeField } from '@utils/sharedFields';
export class DocumentGithubLoader implements INodeType {
description: INodeTypeDescription = {

View File

@@ -1,4 +1,5 @@
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
import type { TextSplitter } from '@langchain/textsplitters';
import {
NodeConnectionType,
type INodeType,
@@ -7,10 +8,9 @@ import {
type SupplyData,
} from 'n8n-workflow';
import type { TextSplitter } from '@langchain/textsplitters';
import { logWrapper } from '../../../utils/logWrapper';
import { N8nJsonLoader } from '../../../utils/N8nJsonLoader';
import { getConnectionHintNoticeField, metadataFilterField } from '../../../utils/sharedFields';
import { logWrapper } from '@utils/logWrapper';
import { N8nJsonLoader } from '@utils/N8nJsonLoader';
import { getConnectionHintNoticeField, metadataFilterField } from '@utils/sharedFields';
export class DocumentJsonInputLoader implements INodeType {
description: INodeTypeDescription = {