@n8n/ai-utilities 0.30.1 → 0.30.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,12 +8,13 @@ export { N8nBinaryLoader } from './utils/n8n-binary-loader';
8
8
  export { N8nJsonLoader } from './utils/n8n-json-loader';
9
9
  export { N8nPdfLoader } from './utils/loaders/n8n-pdf-loader';
10
10
  export { N8nLlmTracing } from './utils/n8n-llm-tracing';
11
+ export { redactHeaderValues } from './utils/redact-headers';
11
12
  export { TextEditorDocument, NoMatchFoundError, MultipleMatchesError, InvalidLineNumberError, InvalidViewRangeError, InvalidPathError, FileExistsError, FileNotFoundError, BatchReplacementError, formatTextWithLineNumbers, findDivergenceContext, parseStrReplacements, } from './utils/workflow-text-editor';
12
13
  export type { ViewCommand, CreateCommand, StrReplaceCommand, InsertCommand, BatchStrReplaceCommand, TextEditorCommand, TextEditorCommandWithBatch, TextEditorToolCall, TextEditorResult, StrReplacement, BatchReplaceResult, TextEditorDocumentOptions, } from './utils/workflow-text-editor';
13
14
  export { estimateTokensFromStringList, estimateTokensByCharCount, estimateTextSplitsByTokens, } from './utils/tokenizer/token-estimator';
14
15
  export { encodingForModel, getEncoding } from './utils/tokenizer/tiktoken';
15
16
  export { makeN8nLlmFailedAttemptHandler } from './utils/failed-attempt-handler/n8nLlmFailedAttemptHandler';
16
- export { getProxyAgent, getNodeProxyAgent, proxyFetch, type AgentTimeoutOptions, } from './utils/http-proxy-agent';
17
+ export { getProxyAgent, getNodeProxyAgent, proxyFetch, type AgentTimeoutOptions, type ProxyFetchOptions, } from './utils/http-proxy-agent';
17
18
  export { braveSearch, searxngSearch, type BraveSearchOptions } from './web-search';
18
19
  export type { WebSearchOptions, WebSearchResponse, WebSearchResult } from './web-search';
19
20
  export { fetchFollowingRedirects, type FollowRedirectsOptions, } from './utils/follow-redirects';
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toLcMessage = exports.fromLcMessage = exports.getParametersJsonSchema = exports.processDocument = exports.processDocuments = exports.MemoryVectorStoreManager = exports.createVectorStoreNode = exports.extractFromAIParameters = exports.createZodSchemaFromArgs = exports.createToolFromNode = exports.getTemplateNoticeField = exports.getBatchingOptionFields = exports.metadataFilterField = exports.getConnectionHintNoticeField = exports.fetchFollowingRedirects = exports.searxngSearch = exports.braveSearch = exports.proxyFetch = exports.getNodeProxyAgent = exports.getProxyAgent = exports.makeN8nLlmFailedAttemptHandler = exports.getEncoding = exports.encodingForModel = exports.estimateTextSplitsByTokens = exports.estimateTokensByCharCount = exports.estimateTokensFromStringList = exports.parseStrReplacements = exports.findDivergenceContext = exports.formatTextWithLineNumbers = exports.BatchReplacementError = exports.FileNotFoundError = exports.FileExistsError = exports.InvalidPathError = exports.InvalidViewRangeError = exports.InvalidLineNumberError = exports.MultipleMatchesError = exports.NoMatchFoundError = exports.TextEditorDocument = exports.N8nLlmTracing = exports.N8nPdfLoader = exports.N8nJsonLoader = exports.N8nBinaryLoader = exports.hasLongSequentialRepeat = exports.getMetadataFiltersValues = exports.validateEmbedDocumentsInput = exports.validateEmbedQueryInput = exports.parseSSEStream = exports.logAiEvent = exports.logWrapper = exports.AI_NODE_SDK_VERSION = void 0;
4
- exports.supplyModel = exports.supplyMemory = exports.WindowedChatMemory = exports.BaseChatMemory = exports.BaseChatHistory = exports.BaseChatModel = exports.LangchainChatModelAdapter = exports.isToolsInstance = exports.isChatInstance = exports.isBaseChatMessageHistory = exports.isBaseChatMemory = exports.fromLcContent = exports.toLcContent = void 0;
3
+ exports.fromLcMessage = exports.getParametersJsonSchema = exports.processDocument = exports.processDocuments = exports.MemoryVectorStoreManager = exports.createVectorStoreNode = exports.extractFromAIParameters = exports.createZodSchemaFromArgs = exports.createToolFromNode = exports.getTemplateNoticeField = exports.getBatchingOptionFields = exports.metadataFilterField = exports.getConnectionHintNoticeField = exports.fetchFollowingRedirects = exports.searxngSearch = exports.braveSearch = exports.proxyFetch = exports.getNodeProxyAgent = exports.getProxyAgent = exports.makeN8nLlmFailedAttemptHandler = exports.getEncoding = exports.encodingForModel = exports.estimateTextSplitsByTokens = exports.estimateTokensByCharCount = exports.estimateTokensFromStringList = exports.parseStrReplacements = exports.findDivergenceContext = exports.formatTextWithLineNumbers = exports.BatchReplacementError = exports.FileNotFoundError = exports.FileExistsError = exports.InvalidPathError = exports.InvalidViewRangeError = exports.InvalidLineNumberError = exports.MultipleMatchesError = exports.NoMatchFoundError = exports.TextEditorDocument = exports.redactHeaderValues = exports.N8nLlmTracing = exports.N8nPdfLoader = exports.N8nJsonLoader = exports.N8nBinaryLoader = exports.hasLongSequentialRepeat = exports.getMetadataFiltersValues = exports.validateEmbedDocumentsInput = exports.validateEmbedQueryInput = exports.parseSSEStream = exports.logAiEvent = exports.logWrapper = exports.AI_NODE_SDK_VERSION = void 0;
4
+ exports.supplyModel = exports.supplyMemory = exports.WindowedChatMemory = exports.BaseChatMemory = exports.BaseChatHistory = exports.BaseChatModel = exports.LangchainChatModelAdapter = exports.isToolsInstance = exports.isChatInstance = exports.isBaseChatMessageHistory = exports.isBaseChatMemory = exports.fromLcContent = exports.toLcContent = exports.toLcMessage = void 0;
5
5
  var ai_node_sdk_version_1 = require("./ai-node-sdk-version");
6
6
  Object.defineProperty(exports, "AI_NODE_SDK_VERSION", { enumerable: true, get: function () { return ai_node_sdk_version_1.AI_NODE_SDK_VERSION; } });
7
7
  var log_wrapper_1 = require("./utils/log-wrapper");
@@ -24,6 +24,8 @@ var n8n_pdf_loader_1 = require("./utils/loaders/n8n-pdf-loader");
24
24
  Object.defineProperty(exports, "N8nPdfLoader", { enumerable: true, get: function () { return n8n_pdf_loader_1.N8nPdfLoader; } });
25
25
  var n8n_llm_tracing_1 = require("./utils/n8n-llm-tracing");
26
26
  Object.defineProperty(exports, "N8nLlmTracing", { enumerable: true, get: function () { return n8n_llm_tracing_1.N8nLlmTracing; } });
27
+ var redact_headers_1 = require("./utils/redact-headers");
28
+ Object.defineProperty(exports, "redactHeaderValues", { enumerable: true, get: function () { return redact_headers_1.redactHeaderValues; } });
27
29
  var workflow_text_editor_1 = require("./utils/workflow-text-editor");
28
30
  Object.defineProperty(exports, "TextEditorDocument", { enumerable: true, get: function () { return workflow_text_editor_1.TextEditorDocument; } });
29
31
  Object.defineProperty(exports, "NoMatchFoundError", { enumerable: true, get: function () { return workflow_text_editor_1.NoMatchFoundError; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AACA,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAG5B,mDAAiD;AAAxC,yGAAA,UAAU,OAAA;AACnB,qDAAkD;AAAzC,0GAAA,UAAU,OAAA;AACnB,mCAA6C;AAApC,qGAAA,cAAc,OAAA;AACvB,mFAG6C;AAF5C,sIAAA,uBAAuB,OAAA;AACvB,0IAAA,2BAA2B,OAAA;AAE5B,2CAAoF;AAA3E,mHAAA,wBAAwB,OAAA;AAAE,kHAAA,uBAAuB,OAAA;AAC1D,+DAA4D;AAAnD,oHAAA,eAAe,OAAA;AACxB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,iEAA8D;AAArD,8GAAA,YAAY,OAAA;AACrB,2DAAwD;AAA/C,gHAAA,aAAa,OAAA;AACtB,qEAasC;AAZrC,0HAAA,kBAAkB,OAAA;AAClB,yHAAA,iBAAiB,OAAA;AACjB,4HAAA,oBAAoB,OAAA;AACpB,8HAAA,sBAAsB,OAAA;AACtB,6HAAA,qBAAqB,OAAA;AACrB,wHAAA,gBAAgB,OAAA;AAChB,uHAAA,eAAe,OAAA;AACf,yHAAA,iBAAiB,OAAA;AACjB,6HAAA,qBAAqB,OAAA;AACrB,iIAAA,yBAAyB,OAAA;AACzB,6HAAA,qBAAqB,OAAA;AACrB,4HAAA,oBAAoB,OAAA;AAgBrB,qEAI2C;AAH1C,+HAAA,4BAA4B,OAAA;AAC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