@n8n/ai-utilities 0.31.1 → 0.32.0

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.
@@ -19,6 +19,7 @@ export { getProxyAgent, getNodeProxyAgent, proxyFetch, type AgentTimeoutOptions,
19
19
  export { braveSearch, searxngSearch, type BraveSearchOptions } from './web-search';
20
20
  export type { WebSearchOptions, WebSearchResponse, WebSearchResult } from './web-search';
21
21
  export { fetchFollowingRedirects, type FollowRedirectsOptions, } from './utils/follow-redirects';
22
+ export { createRefreshingAuthFetch, type RefreshingAuthFetchOptions, } from './utils/refreshing-auth-fetch';
22
23
  export { getConnectionHintNoticeField, metadataFilterField, getBatchingOptionFields, getTemplateNoticeField, } from './utils/shared-fields';
23
24
  export { createToolFromNode, createZodSchemaFromArgs, extractFromAIParameters, } from './utils/fromai-tool-factory';
24
25
  export { createVectorStoreNode } from './utils/vector-store/createVectorStoreNode/createVectorStoreNode';
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.redactSecrets = 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 = exports.fromLcMessage = void 0;
3
+ exports.processDocument = exports.processDocuments = exports.MemoryVectorStoreManager = exports.createVectorStoreNode = exports.extractFromAIParameters = exports.createZodSchemaFromArgs = exports.createToolFromNode = exports.getTemplateNoticeField = exports.getBatchingOptionFields = exports.metadataFilterField = exports.getConnectionHintNoticeField = exports.createRefreshingAuthFetch = 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.redactSecrets = 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 = exports.fromLcMessage = exports.getParametersJsonSchema = 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");
@@ -59,6 +59,8 @@ Object.defineProperty(exports, "braveSearch", { enumerable: true, get: function
59
59
  Object.defineProperty(exports, "searxngSearch", { enumerable: true, get: function () { return web_search_1.searxngSearch; } });
60
60
  var follow_redirects_1 = require("./utils/follow-redirects");
61
61
  Object.defineProperty(exports, "fetchFollowingRedirects", { enumerable: true, get: function () { return follow_redirects_1.fetchFollowingRedirects; } });
62
+ var refreshing_auth_fetch_1 = require("./utils/refreshing-auth-fetch");
63
+ Object.defineProperty(exports, "createRefreshingAuthFetch", { enumerable: true, get: function () { return refreshing_auth_fetch_1.createRefreshingAuthFetch; } });
62
64
  var shared_fields_1 = require("./utils/shared-fields");
63
65
  Object.defineProperty(exports, "getConnectionHintNoticeField", { enumerable: true, get: function () { return shared_fields_1.getConnectionHintNoticeField; } });
64
66
  Object.defineProperty(exports, "metadataFilterField", { enumerable: true, get: function () { return shared_fields_1.metadataFilterField; } });
@@ -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,yDAAuD;AAA9C,+G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