(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "./ai-node-sdk-version", "./utils/log-wrapper", "./utils/log-ai-event", "./utils/sse", "./utils/embeddings-input-validation", "./utils/helpers", "./utils/n8n-binary-loader", "./utils/n8n-json-loader", "./utils/loaders/n8n-pdf-loader", "./utils/n8n-llm-tracing", "./utils/workflow-text-editor", "./utils/tokenizer/token-estimator", "./utils/tokenizer/tiktoken", "./utils/failed-attempt-handler/n8nLlmFailedAttemptHandler", "./utils/http-proxy-agent", "./web-search", "./utils/follow-redirects", "./utils/shared-fields", "./utils/fromai-tool-factory", "./utils/vector-store/createVectorStoreNode/createVectorStoreNode", "./utils/vector-store/MemoryManager/MemoryVectorStoreManager", "./utils/vector-store/processDocuments", "./converters/tool", "./converters/message", "./guards", "./adapters/langchain-chat-model", "./chat-model/base", "./memory/base-chat-history", "./memory/base-chat-memory", "./memory/windowed-chat-memory", "./suppliers/supplyMemory", "./suppliers/supplyModel"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    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 = 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;
    var ai_node_sdk_version_1 = require("./ai-node-sdk-version");
    Object.defineProperty(exports, "AI_NODE_SDK_VERSION", { enumerable: true, get: function () { return ai_node_sdk_version_1.AI_NODE_SDK_VERSION; } });
    var log_wrapper_1 = require("./utils/log-wrapper");
    Object.defineProperty(exports, "logWrapper", { enumerable: true, get: function () { return log_wrapper_1.logWrapper; } });
    var log_ai_event_1 = require("./utils/log-ai-event");
    Object.defineProperty(exports, "logAiEvent", { enumerable: true, get: function () { return log_ai_event_1.logAiEvent; } });
    var sse_1 = require("./utils/sse");
    Object.defineProperty(exports, "parseSSEStream", { enumerable: true, get: function () { return sse_1.parseSSEStream; } });
    var embeddings_input_validation_1 = require("./utils/embeddings-input-validation");
    Object.defineProperty(exports, "validateEmbedQueryInput", { enumerable: true, get: function () { return embeddings_input_validation_1.validateEmbedQueryInput; } });
    Object.defineProperty(exports, "validateEmbedDocumentsInput", { enumerable: true, get: function () { return embeddings_input_validation_1.validateEmbedDocumentsInput; } });
    var helpers_1 = require("./utils/helpers");
    Object.defineProperty(exports, "getMetadataFiltersValues", { enumerable: true, get: function () { return helpers_1.getMetadataFiltersValues; } });
    Object.defineProperty(exports, "hasLongSequentialRepeat", { enumerable: true, get: function () { return helpers_1.hasLongSequentialRepeat; } });
    var n8n_binary_loader_1 = require("./utils/n8n-binary-loader");
    Object.defineProperty(exports, "N8nBinaryLoader", { enumerable: true, get: function () { return n8n_binary_loader_1.N8nBinaryLoader; } });
    var n8n_json_loader_1 = require("./utils/n8n-json-loader");
    Object.defineProperty(exports, "N8nJsonLoader", { enumerable: true, get: function () { return n8n_json_loader_1.N8nJsonLoader; } });
    var n8n_pdf_loader_1 = require("./utils/loaders/n8n-pdf-loader");
    Object.defineProperty(exports, "N8nPdfLoader", { enumerable: true, get: function () { return n8n_pdf_loader_1.N8nPdfLoader; } });
    var n8n_llm_tracing_1 = require("./utils/n8n-llm-tracing");
    Object.defineProperty(exports, "N8nLlmTracing", { enumerable: true, get: function () { return n8n_llm_tracing_1.N8nLlmTracing; } });
    var workflow_text_editor_1 = require("./utils/workflow-text-editor");
    Object.defineProperty(exports, "TextEditorDocument", { enumerable: true, get: function () { return workflow_text_editor_1.TextEditorDocument; } });
    Object.defineProperty(exports, "NoMatchFoundError", { enumerable: true, get: function () { return workflow_text_editor_1.NoMatchFoundError; } });
    Object.defineProperty(exports, "MultipleMatchesError", { enumerable: true, get: function () { return workflow_text_editor_1.MultipleMatchesError; } });
    Object.defineProperty(exports, "InvalidLineNumberError", { enumerable: true, get: function () { return workflow_text_editor_1.InvalidLineNumberError; } });
    Object.defineProperty(exports, "InvalidViewRangeError", { enumerable: true, get: function () { return workflow_text_editor_1.InvalidViewRangeError; } });
    Object.defineProperty(exports, "InvalidPathError", { enumerable: true, get: function () { return workflow_text_editor_1.InvalidPathError; } });
    Object.defineProperty(exports, "FileExistsError", { enumerable: true, get: function () { return workflow_text_editor_1.FileExistsError; } });
    Object.defineProperty(exports, "FileNotFoundError", { enumerable: true, get: function () { return workflow_text_editor_1.FileNotFoundError; } });
    Object.defineProperty(exports, "BatchReplacementError", { enumerable: true, get: function () { return workflow_text_editor_1.BatchReplacementError; } });
    Object.defineProperty(exports, "formatTextWithLineNumbers", { enumerable: true, get: function () { return workflow_text_editor_1.formatTextWithLineNumbers; } });
    Object.defineProperty(exports, "findDivergenceContext", { enumerable: true, get: function () { return workflow_text_editor_1.findDivergenceContext; } });
    Object.defineProperty(exports, "parseStrReplacements", { enumerable: true, get: function () { return workflow_text_editor_1.parseStrReplacements; } });
    var token_estimator_1 = require("./utils/tokenizer/token-estimator");
    Object.defineProperty(exports, "estimateTokensFromStringList", { enumerable: true, get: function () { return token_estimator_1.estimateTokensFromStringList; } });
    Object.defineProperty(exports, "estimateTokensByCharCount", { enumerable: true, get: function () { return token_estimator_1.estimateTokensByCharCount; } });
    Object.defineProperty(exports, "estimateTextSplitsByTokens", { enumerable: true, get: function () { return token_estimator_1.estimateTextSplitsByTokens; } });
    var tiktoken_1 = require("./utils/tokenizer/tiktoken");
    Object.defineProperty(exports, "encodingForModel", { enumerable: true, get: function () { return tiktoken_1.encodingForModel; } });
    Object.defineProperty(exports, "getEncoding", { enumerable: true, get: function () { return tiktoken_1.getEncoding; } });
    var n8nLlmFailedAttemptHandler_1 = require("./utils/failed-attempt-handler/n8nLlmFailedAttemptHandler");
    Object.defineProperty(exports, "makeN8nLlmFailedAttemptHandler", { enumerable: true, get: function () { return n8nLlmFailedAttemptHandler_1.makeN8nLlmFailedAttemptHandler; } });
    var http_proxy_agent_1 = require("./utils/http-proxy-agent");
    Object.defineProperty(exports, "getProxyAgent", { enumerable: true, get: function () { return http_proxy_agent_1.getProxyAgent; } });
    Object.defineProperty(exports, "getNodeProxyAgent", { enumerable: true, get: function () { return http_proxy_agent_1.getNodeProxyAgent; } });
    Object.defineProperty(exports, "proxyFetch", { enumerable: true, get: function () { return http_proxy_agent_1.proxyFetch; } });
    var web_search_1 = require("./web-search");
    Object.defineProperty(exports, "braveSearch", { enumerable: true, get: function () { return web_search_1.braveSearch; } });
    Object.defineProperty(exports, "searxngSearch", { enumerable: true, get: function () { return web_search_1.searxngSearch; } });
    var follow_redirects_1 = require("./utils/follow-redirects");
    Object.defineProperty(exports, "fetchFollowingRedirects", { enumerable: true, get: function () { return follow_redirects_1.fetchFollowingRedirects; } });
    var shared_fields_1 = require("./utils/shared-fields");
    Object.defineProperty(exports, "getConnectionHintNoticeField", { enumerable: true, get: function () { return shared_fields_1.getConnectionHintNoticeField; } });
    Object.defineProperty(exports, "metadataFilterField", { enumerable: true, get: function () { return shared_fields_1.metadataFilterField; } });
    Object.defineProperty(exports, "getBatchingOptionFields", { enumerable: true, get: function () { return shared_fields_1.getBatchingOptionFields; } });
    Object.defineProperty(exports, "getTemplateNoticeField", { enumerable: true, get: function () { return shared_fields_1.getTemplateNoticeField; } });
    var fromai_tool_factory_1 = require("./utils/fromai-tool-factory");
    Object.defineProperty(exports, "createToolFromNode", { enumerable: true, get: function () { return fromai_tool_factory_1.createToolFromNode; } });
    Object.defineProperty(exports, "createZodSchemaFromArgs", { enumerable: true, get: function () { return fromai_tool_factory_1.createZodSchemaFromArgs; } });
    Object.defineProperty(exports, "extractFromAIParameters", { enumerable: true, get: function () { return fromai_tool_factory_1.extractFromAIParameters; } });
    var createVectorStoreNode_1 = require("./utils/vector-store/createVectorStoreNode/createVectorStoreNode");
    Object.defineProperty(exports, "createVectorStoreNode", { enumerable: true, get: function () { return createVectorStoreNode_1.createVectorStoreNode; } });
    var MemoryVectorStoreManager_1 = require("./utils/vector-store/MemoryManager/MemoryVectorStoreManager");
    Object.defineProperty(exports, "MemoryVectorStoreManager", { enumerable: true, get: function () { return MemoryVectorStoreManager_1.MemoryVectorStoreManager; } });
    var processDocuments_1 = require("./utils/vector-store/processDocuments");
    Object.defineProperty(exports, "processDocuments", { enumerable: true, get: function () { return processDocuments_1.processDocuments; } });
    Object.defineProperty(exports, "processDocument", { enumerable: true, get: function () { return processDocuments_1.processDocument; } });
    var tool_1 = require("./converters/tool");
    Object.defineProperty(exports, "getParametersJsonSchema", { enumerable: true, get: function () { return tool_1.getParametersJsonSchema; } });
    var message_1 = require("./converters/message");
    Object.defineProperty(exports, "fromLcMessage", { enumerable: true, get: function () { return message_1.fromLcMessage; } });
    Object.defineProperty(exports, "toLcMessage", { enumerable: true, get: function () { return message_1.toLcMessage; } });
    Object.defineProperty(exports, "toLcContent", { enumerable: true, get: function () { return message_1.toLcContent; } });
    Object.defineProperty(exports, "fromLcContent", { enumerable: true, get: function () { return message_1.fromLcContent; } });
    var guards_1 = require("./guards");
    Object.defineProperty(exports, "isBaseChatMemory", { enumerable: true, get: function () { return guards_1.isBaseChatMemory; } });
    Object.defineProperty(exports, "isBaseChatMessageHistory", { enumerable: true, get: function () { return guards_1.isBaseChatMessageHistory; } });
    Object.defineProperty(exports, "isChatInstance", { enumerable: true, get: function () { return guards_1.isChatInstance; } });
    Object.defineProperty(exports, "isToolsInstance", { enumerable: true, get: function () { return guards_1.isToolsInstance; } });
    var langchain_chat_model_1 = require("./adapters/langchain-chat-model");
    Object.defineProperty(exports, "LangchainChatModelAdapter", { enumerable: true, get: function () { return langchain_chat_model_1.LangchainChatModelAdapter; } });
    var base_1 = require("./chat-model/base");
    Object.defineProperty(exports, "BaseChatModel", { enumerable: true, get: function () { return base_1.BaseChatModel; } });
    var base_chat_history_1 = require("./memory/base-chat-history");
    Object.defineProperty(exports, "BaseChatHistory", { enumerable: true, get: function () { return base_chat_history_1.BaseChatHistory; } });
    var base_chat_memory_1 = require("./memory/base-chat-memory");
    Object.defineProperty(exports, "BaseChatMemory", { enumerable: true, get: function () { return base_chat_memory_1.BaseChatMemory; } });
    var windowed_chat_memory_1 = require("./memory/windowed-chat-memory");
    Object.defineProperty(exports, "WindowedChatMemory", { enumerable: true, get: function () { return windowed_chat_memory_1.WindowedChatMemory; } });
    var supplyMemory_1 = require("./suppliers/supplyMemory");
    Object.defineProperty(exports, "supplyMemory", { enumerable: true, get: function () { return supplyMemory_1.supplyMemory; } });
    var supplyModel_1 = require("./suppliers/supplyModel");
    Object.defineProperty(exports, "supplyModel", { enumerable: true, get: function () { return supplyModel_1.supplyModel; } });
});
//# sourceMappingURL=index.js.map