@n8n/n8n-nodes-langchain 1.100.0 → 1.101.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.
- package/dist/credentials/WeaviateApi.credentials.js +164 -0
- package/dist/credentials/WeaviateApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +7 -0
- package/dist/known/nodes.json +4 -0
- package/dist/nodes/agents/Agent/Agent.node.js +5 -2
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js +1 -4
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -1
- package/dist/nodes/agents/Agent/V2/AgentV2.node.js +23 -6
- package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +0 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js +29 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js +94 -4
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js.map +1 -1
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +0 -1
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -1
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +0 -1
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +0 -1
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +0 -1
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
- package/dist/nodes/code/Code.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +0 -2
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +0 -2
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +0 -2
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +0 -2
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +0 -2
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +4 -5
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +0 -3
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +6 -6
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +3 -1
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.js +0 -3
- package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.js +0 -3
- package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +3 -4
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +0 -3
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +1 -5
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +3 -4
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +3 -4
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +0 -3
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +0 -3
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +1 -4
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -1
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +0 -3
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -1
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +3 -3
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +3 -4
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -1
- package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
- package/dist/nodes/llms/N8nNonEstimatingTracing.js.map +1 -1
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js +1 -1
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js.map +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +0 -2
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +0 -2
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.js +0 -2
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.js.map +1 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +0 -2
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +0 -2
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +0 -2
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +0 -2
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +0 -2
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +0 -2
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +0 -2
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +0 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
- package/dist/nodes/rerankers/RerankerCohere/RerankerCohere.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +0 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +0 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +0 -2
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +0 -2
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +0 -2
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +0 -2
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TokenTextSplitter.js.map +1 -1
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +0 -2
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.js +0 -2
- package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +0 -2
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +0 -2
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
- package/dist/nodes/tools/ToolThink/ToolThink.node.js.map +1 -1
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +0 -2
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +0 -2
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -1
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +0 -2
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +0 -2
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +215 -153
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +0 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +0 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +2 -2
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js +242 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js +127 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg +2 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +15 -2
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -1
- package/dist/nodes/vector_store/shared/descriptions.js +26 -2
- package/dist/nodes/vector_store/shared/descriptions.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +0 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +1 -1
- package/dist/types/credentials.json +1 -0
- package/dist/types/nodes.json +4 -3
- package/dist/utils/httpProxyAgent.js +20 -6
- package/dist/utils/httpProxyAgent.js.map +1 -1
- package/dist/utils/logWrapper.js.map +1 -1
- package/package.json +21 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../nodes/vector_store/shared/descriptions.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nexport const pineconeIndexRLC: INodeProperties = {\n\tdisplayName: 'Pinecone Index',\n\tname: 'pineconeIndex',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'pineconeIndexSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const supabaseTableNameRLC: INodeProperties = {\n\tdisplayName: 'Table Name',\n\tname: 'tableName',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'supabaseTableNameSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const qdrantCollectionRLC: INodeProperties = {\n\tdisplayName: 'Qdrant Collection',\n\tname: 'qdrantCollection',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'qdrantCollectionsSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const milvusCollectionRLC: INodeProperties = {\n\tdisplayName: 'Milvus Collection',\n\tname: 'milvusCollection',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'milvusCollectionsSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AU;AAAA,EACV,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,kBAAkB;AAAA,MACnB;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,IACP;AAAA,EACD;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/vector_store/shared/descriptions.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nexport const pineconeIndexRLC: INodeProperties = {\n\tdisplayName: 'Pinecone Index',\n\tname: 'pineconeIndex',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'pineconeIndexSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const supabaseTableNameRLC: INodeProperties = {\n\tdisplayName: 'Table Name',\n\tname: 'tableName',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'supabaseTableNameSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const qdrantCollectionRLC: INodeProperties = {\n\tdisplayName: 'Qdrant Collection',\n\tname: 'qdrantCollection',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'qdrantCollectionsSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const milvusCollectionRLC: INodeProperties = {\n\tdisplayName: 'Milvus Collection',\n\tname: 'milvusCollection',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'milvusCollectionsSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n\nexport const weaviateCollectionRLC: INodeProperties = {\n\tdisplayName: 'Weaviate Collection',\n\tname: 'weaviateCollection',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'weaviateCollectionsSearch',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'ID',\n\t\t\tname: 'id',\n\t\t\ttype: 'string',\n\t\t},\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,mBAAoC;AAAA,EAChD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS,EAAE,MAAM,QAAQ,OAAO,GAAG;AAAA,EACnC,UAAU;AAAA,EACV,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN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;AAAA,EACD;AACD;AAEO,MAAM,wBAAyC;AAAA,EACrD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS,EAAE,MAAM,QAAQ,OAAO,GAAG;AAAA,EACnC,UAAU;AAAA,EACV,OAAO;AAAA,IACN;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,QACZ,kBAAkB;AAAA,MACnB;AAAA,IACD;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,IACP;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/actions/assistant/message.operation.ts"],"sourcesContent":["import type { BaseMessage } from '@langchain/core/messages';\nimport { AgentExecutor } from 'langchain/agents';\nimport type { OpenAIToolType } from 'langchain/dist/experimental/openai_assistant/schema';\nimport { OpenAIAssistantRunnable } from 'langchain/experimental/openai_assistant';\nimport type { BufferWindowMemory } from 'langchain/memory';\nimport omit from 'lodash/omit';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tINodeProperties,\n} from 'n8n-workflow';\nimport {\n\tApplicationError,\n\tNodeConnectionTypes,\n\tNodeOperationError,\n\tupdateDisplayOptions,\n} from 'n8n-workflow';\nimport { OpenAI as OpenAIClient } from 'openai';\n\nimport { promptTypeOptions } from '@utils/descriptions';\nimport { getConnectedTools } from '@utils/helpers';\nimport { getTracingConfig } from '@utils/tracing';\n\nimport { formatToOpenAIAssistantTool, getChatMessages } from '../../helpers/utils';\nimport { assistantRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tassistantRLC,\n\t{\n\t\t...promptTypeOptions,\n\t\tname: 'prompt',\n\t},\n\t{\n\t\tdisplayName: 'Prompt (User Message)',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tplaceholder: 'e.g. Hello, how can you help me?',\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tprompt: ['define'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Memory',\n\t\tname: 'memory',\n\t\ttype: 'options',\n\t\toptions: [\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\tname: 'Use memory connector',\n\t\t\t\tvalue: 'connector',\n\t\t\t\tdescription: 'Connect one of the supported memory nodes',\n\t\t\t},\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\tname: 'Use thread ID',\n\t\t\t\tvalue: 'threadId',\n\t\t\t\tdescription: 'Specify the ID of the thread to continue',\n\t\t\t},\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\t'@version': [{ _cnd: { gte: 1.6 } }],\n\t\t\t},\n\t\t},\n\t\tdefault: 'connector',\n\t},\n\t{\n\t\tdisplayName: 'Thread ID',\n\t\tname: 'threadId',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tplaceholder: '',\n\t\tdescription: 'The ID of the thread to continue, a new thread will be created if not specified',\n\t\thint: 'If the thread ID is empty or undefined a new thread will be created and included in the response',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\t'@version': [{ _cnd: { gte: 1.6 } }],\n\t\t\t\tmemory: ['threadId'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Connect your own custom n8n tools to this node on the canvas',\n\t\tname: 'noticeTools',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\n\t\tdescription: 'Additional options to add',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Base URL',\n\t\t\t\tname: 'baseURL',\n\t\t\t\tdefault: 'https://api.openai.com/v1',\n\t\t\t\tdescription: 'Override the default base URL for the API',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\thide: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.8 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Retries',\n\t\t\t\tname: 'maxRetries',\n\t\t\t\tdefault: 2,\n\t\t\t\tdescription: 'Maximum number of retries to attempt',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Timeout',\n\t\t\t\tname: 'timeout',\n\t\t\t\tdefault: 10000,\n\t\t\t\tdescription: 'Maximum amount of time a request is allowed to take in milliseconds',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Preserve Original Tools',\n\t\t\t\tname: 'preserveOriginalTools',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to preserve the original tools of the assistant after the execution of this node, otherwise the tools will be replaced with the connected tools, if any, default is true',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.3 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['message'],\n\t\tresource: ['assistant'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\nconst mapChatMessageToThreadMessage = (\n\tmessage: BaseMessage,\n): OpenAIClient.Beta.Threads.ThreadCreateParams.Message => ({\n\trole: message._getType() === 'ai' ? 'assistant' : 'user',\n\tcontent: message.content.toString(),\n});\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst credentials = await this.getCredentials('openAiApi');\n\tconst nodeVersion = this.getNode().typeVersion;\n\n\tconst prompt = this.getNodeParameter('prompt', i) as string;\n\n\tlet input;\n\tif (prompt === 'auto') {\n\t\tinput = this.evaluateExpression('{{ $json[\"chatInput\"] }}', i) as string;\n\t} else {\n\t\tinput = this.getNodeParameter('text', i) as string;\n\t}\n\n\tif (input === undefined) {\n\t\tthrow new NodeOperationError(this.getNode(), 'No prompt specified', {\n\t\t\tdescription:\n\t\t\t\t\"Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter\",\n\t\t});\n\t}\n\n\tconst assistantId = this.getNodeParameter('assistantId', i, '', { extractValue: true }) as string;\n\n\tconst options = this.getNodeParameter('options', i, {}) as {\n\t\tbaseURL?: string;\n\t\tmaxRetries: number;\n\t\ttimeout: number;\n\t\tpreserveOriginalTools?: boolean;\n\t};\n\n\tconst baseURL = (options.baseURL ?? credentials.url) as string;\n\n\tconst client = new OpenAIClient({\n\t\tapiKey: credentials.apiKey as string,\n\t\tmaxRetries: options.maxRetries ?? 2,\n\t\ttimeout: options.timeout ?? 10000,\n\t\tbaseURL,\n\t});\n\n\tconst agent = new OpenAIAssistantRunnable({ assistantId, client, asAgent: true });\n\n\tconst tools = await getConnectedTools(this, nodeVersion > 1, false);\n\tlet assistantTools;\n\n\tif (tools.length) {\n\t\tconst transformedConnectedTools = tools?.map(formatToOpenAIAssistantTool) ?? [];\n\t\tconst nativeToolsParsed: OpenAIToolType = [];\n\n\t\tassistantTools = (await client.beta.assistants.retrieve(assistantId)).tools;\n\n\t\tconst useCodeInterpreter = assistantTools.some((tool) => tool.type === 'code_interpreter');\n\t\tif (useCodeInterpreter) {\n\t\t\tnativeToolsParsed.push({\n\t\t\t\ttype: 'code_interpreter',\n\t\t\t});\n\t\t}\n\n\t\tconst useRetrieval = assistantTools.some((tool) => tool.type === 'file_search');\n\t\tif (useRetrieval) {\n\t\t\tnativeToolsParsed.push({\n\t\t\t\ttype: 'file_search',\n\t\t\t});\n\t\t}\n\n\t\tawait client.beta.assistants.update(assistantId, {\n\t\t\ttools: [...nativeToolsParsed, ...transformedConnectedTools],\n\t\t});\n\t}\n\n\tconst agentExecutor = AgentExecutor.fromAgentAndTools({\n\t\tagent,\n\t\ttools: tools ?? [],\n\t});\n\n\tconst useMemoryConnector =\n\t\tnodeVersion >= 1.6 && this.getNodeParameter('memory', i) === 'connector';\n\tconst memory =\n\t\tuseMemoryConnector || nodeVersion < 1.6\n\t\t\t? ((await this.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as\n\t\t\t\t\t| BufferWindowMemory\n\t\t\t\t\t| undefined)\n\t\t\t: undefined;\n\n\tconst threadId =\n\t\tnodeVersion >= 1.6 && !useMemoryConnector\n\t\t\t? (this.getNodeParameter('threadId', i) as string)\n\t\t\t: undefined;\n\n\tconst chainValues: IDataObject = {\n\t\tcontent: input,\n\t\tsignal: this.getExecutionCancelSignal(),\n\t\ttimeout: options.timeout ?? 10000,\n\t};\n\tlet thread: OpenAIClient.Beta.Threads.Thread;\n\tif (memory) {\n\t\tconst chatMessages = await getChatMessages(memory);\n\n\t\t// Construct a new thread from the chat history to map the memory\n\t\tif (chatMessages.length) {\n\t\t\tconst first32Messages = chatMessages.slice(0, 32);\n\t\t\t// There is a undocumented limit of 32 messages per thread when creating a thread with messages\n\t\t\tconst mappedMessages: OpenAIClient.Beta.Threads.ThreadCreateParams.Message[] =\n\t\t\t\tfirst32Messages.map(mapChatMessageToThreadMessage);\n\n\t\t\tthread = await client.beta.threads.create({ messages: mappedMessages });\n\t\t\tconst overLimitMessages = chatMessages.slice(32).map(mapChatMessageToThreadMessage);\n\n\t\t\t// Send the remaining messages that exceed the limit of 32 sequentially\n\t\t\tfor (const message of overLimitMessages) {\n\t\t\t\tawait client.beta.threads.messages.create(thread.id, message);\n\t\t\t}\n\n\t\t\tchainValues.threadId = thread.id;\n\t\t}\n\t} else if (threadId) {\n\t\tchainValues.threadId = threadId;\n\t}\n\n\tlet filteredResponse: IDataObject = {};\n\ttry {\n\t\tconst response = await agentExecutor.withConfig(getTracingConfig(this)).invoke(chainValues);\n\t\tif (memory) {\n\t\t\tawait memory.saveContext({ input }, { output: response.output });\n\n\t\t\tif (response.threadId && response.runId) {\n\t\t\t\tconst threadRun = await client.beta.threads.runs.retrieve(\n\t\t\t\t\tresponse.threadId,\n\t\t\t\t\tresponse.runId,\n\t\t\t\t);\n\t\t\t\tresponse.usage = threadRun.usage;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\toptions.preserveOriginalTools !== false &&\n\t\t\tnodeVersion >= 1.3 &&\n\t\t\t(assistantTools ?? [])?.length\n\t\t) {\n\t\t\tawait client.beta.assistants.update(assistantId, {\n\t\t\t\ttools: assistantTools,\n\t\t\t});\n\t\t}\n\t\t// Remove configuration properties and runId added by Langchain that are not relevant to the user\n\t\tfilteredResponse = omit(response, ['signal', 'timeout', 'content', 'runId']) as IDataObject;\n\t} catch (error) {\n\t\tif (!(error instanceof ApplicationError)) {\n\t\t\tthrow new NodeOperationError(this.getNode(), error.message, { itemIndex: i });\n\t\t}\n\t}\n\n\treturn [{ json: filteredResponse, pairedItem: { item: i } }];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA8B;AAE9B,8BAAwC;AAExC,kBAAiB;AAOjB,0BAKO;AACP,oBAAuC;AAEvC,0BAAkC;AAClC,qBAAkC;AAClC,qBAAiC;AAEjC,mBAA6D;AAC7D,IAAAA,uBAA6B;AAE7B,MAAM,aAAgC;AAAA,EACrC;AAAA,EACA;AAAA,IACC,GAAG;AAAA,IACH,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,QAAQ,CAAC,QAAQ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K,UAAU,CAAC,UAAU,WAAW,WAAW,OAAO,CAAC;AAAA,EAC5E,SAAS,OAAO;AACf,QAAI,EAAE,iBAAiB,uCAAmB;AACzC,YAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,MAAM,SAAS,EAAE,WAAW,EAAE,CAAC;AAAA,IAC7E;AAAA,EACD;AAEA,SAAO,CAAC,EAAE,MAAM,kBAAkB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;AAC5D;","names":["import_descriptions","OpenAIClient","omit"]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/actions/assistant/message.operation.ts"],"sourcesContent":["import type { BaseMessage } from '@langchain/core/messages';\nimport { AgentExecutor } from 'langchain/agents';\nimport type { OpenAIToolType } from 'langchain/dist/experimental/openai_assistant/schema';\nimport { OpenAIAssistantRunnable } from 'langchain/experimental/openai_assistant';\nimport type { BufferWindowMemory } from 'langchain/memory';\nimport omit from 'lodash/omit';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tINodeProperties,\n} from 'n8n-workflow';\nimport {\n\tApplicationError,\n\tNodeConnectionTypes,\n\tNodeOperationError,\n\tupdateDisplayOptions,\n} from 'n8n-workflow';\nimport { OpenAI as OpenAIClient } from 'openai';\n\nimport { promptTypeOptions } from '@utils/descriptions';\nimport { getConnectedTools } from '@utils/helpers';\nimport { getTracingConfig } from '@utils/tracing';\n\nimport { formatToOpenAIAssistantTool, getChatMessages } from '../../helpers/utils';\nimport { assistantRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tassistantRLC,\n\t{\n\t\t...promptTypeOptions,\n\t\tname: 'prompt',\n\t},\n\t{\n\t\tdisplayName: 'Prompt (User Message)',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tplaceholder: 'e.g. Hello, how can you help me?',\n\t\ttypeOptions: {\n\t\t\trows: 2,\n\t\t},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tprompt: ['define'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Memory',\n\t\tname: 'memory',\n\t\ttype: 'options',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Use memory connector',\n\t\t\t\tvalue: 'connector',\n\t\t\t\tdescription: 'Connect one of the supported memory nodes',\n\t\t\t},\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\tname: 'Use thread ID',\n\t\t\t\tvalue: 'threadId',\n\t\t\t\tdescription: 'Specify the ID of the thread to continue',\n\t\t\t},\n\t\t],\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\t'@version': [{ _cnd: { gte: 1.6 } }],\n\t\t\t},\n\t\t},\n\t\tdefault: 'connector',\n\t},\n\t{\n\t\tdisplayName: 'Thread ID',\n\t\tname: 'threadId',\n\t\ttype: 'string',\n\t\tdefault: '',\n\t\tplaceholder: '',\n\t\tdescription: 'The ID of the thread to continue, a new thread will be created if not specified',\n\t\thint: 'If the thread ID is empty or undefined a new thread will be created and included in the response',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\t'@version': [{ _cnd: { gte: 1.6 } }],\n\t\t\t\tmemory: ['threadId'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Connect your own custom n8n tools to this node on the canvas',\n\t\tname: 'noticeTools',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\n\t\tdescription: 'Additional options to add',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Base URL',\n\t\t\t\tname: 'baseURL',\n\t\t\t\tdefault: 'https://api.openai.com/v1',\n\t\t\t\tdescription: 'Override the default base URL for the API',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\thide: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.8 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Retries',\n\t\t\t\tname: 'maxRetries',\n\t\t\t\tdefault: 2,\n\t\t\t\tdescription: 'Maximum number of retries to attempt',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Timeout',\n\t\t\t\tname: 'timeout',\n\t\t\t\tdefault: 10000,\n\t\t\t\tdescription: 'Maximum amount of time a request is allowed to take in milliseconds',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Preserve Original Tools',\n\t\t\t\tname: 'preserveOriginalTools',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to preserve the original tools of the assistant after the execution of this node, otherwise the tools will be replaced with the connected tools, if any, default is true',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.3 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['message'],\n\t\tresource: ['assistant'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\nconst mapChatMessageToThreadMessage = (\n\tmessage: BaseMessage,\n): OpenAIClient.Beta.Threads.ThreadCreateParams.Message => ({\n\trole: message._getType() === 'ai' ? 'assistant' : 'user',\n\tcontent: message.content.toString(),\n});\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst credentials = await this.getCredentials('openAiApi');\n\tconst nodeVersion = this.getNode().typeVersion;\n\n\tconst prompt = this.getNodeParameter('prompt', i) as string;\n\n\tlet input;\n\tif (prompt === 'auto') {\n\t\tinput = this.evaluateExpression('{{ $json[\"chatInput\"] }}', i) as string;\n\t} else {\n\t\tinput = this.getNodeParameter('text', i) as string;\n\t}\n\n\tif (input === undefined) {\n\t\tthrow new NodeOperationError(this.getNode(), 'No prompt specified', {\n\t\t\tdescription:\n\t\t\t\t\"Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter\",\n\t\t});\n\t}\n\n\tconst assistantId = this.getNodeParameter('assistantId', i, '', { extractValue: true }) as string;\n\n\tconst options = this.getNodeParameter('options', i, {}) as {\n\t\tbaseURL?: string;\n\t\tmaxRetries: number;\n\t\ttimeout: number;\n\t\tpreserveOriginalTools?: boolean;\n\t};\n\n\tconst baseURL = (options.baseURL ?? credentials.url) as string;\n\n\tconst client = new OpenAIClient({\n\t\tapiKey: credentials.apiKey as string,\n\t\tmaxRetries: options.maxRetries ?? 2,\n\t\ttimeout: options.timeout ?? 10000,\n\t\tbaseURL,\n\t});\n\n\tconst agent = new OpenAIAssistantRunnable({ assistantId, client, asAgent: true });\n\n\tconst tools = await getConnectedTools(this, nodeVersion > 1, false);\n\tlet assistantTools;\n\n\tif (tools.length) {\n\t\tconst transformedConnectedTools = tools?.map(formatToOpenAIAssistantTool) ?? [];\n\t\tconst nativeToolsParsed: OpenAIToolType = [];\n\n\t\tassistantTools = (await client.beta.assistants.retrieve(assistantId)).tools;\n\n\t\tconst useCodeInterpreter = assistantTools.some((tool) => tool.type === 'code_interpreter');\n\t\tif (useCodeInterpreter) {\n\t\t\tnativeToolsParsed.push({\n\t\t\t\ttype: 'code_interpreter',\n\t\t\t});\n\t\t}\n\n\t\tconst useRetrieval = assistantTools.some((tool) => tool.type === 'file_search');\n\t\tif (useRetrieval) {\n\t\t\tnativeToolsParsed.push({\n\t\t\t\ttype: 'file_search',\n\t\t\t});\n\t\t}\n\n\t\tawait client.beta.assistants.update(assistantId, {\n\t\t\ttools: [...nativeToolsParsed, ...transformedConnectedTools],\n\t\t});\n\t}\n\n\tconst agentExecutor = AgentExecutor.fromAgentAndTools({\n\t\tagent,\n\t\ttools: tools ?? [],\n\t});\n\n\tconst useMemoryConnector =\n\t\tnodeVersion >= 1.6 && this.getNodeParameter('memory', i) === 'connector';\n\tconst memory =\n\t\tuseMemoryConnector || nodeVersion < 1.6\n\t\t\t? ((await this.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as\n\t\t\t\t\t| BufferWindowMemory\n\t\t\t\t\t| undefined)\n\t\t\t: undefined;\n\n\tconst threadId =\n\t\tnodeVersion >= 1.6 && !useMemoryConnector\n\t\t\t? (this.getNodeParameter('threadId', i) as string)\n\t\t\t: undefined;\n\n\tconst chainValues: IDataObject = {\n\t\tcontent: input,\n\t\tsignal: this.getExecutionCancelSignal(),\n\t\ttimeout: options.timeout ?? 10000,\n\t};\n\tlet thread: OpenAIClient.Beta.Threads.Thread;\n\tif (memory) {\n\t\tconst chatMessages = await getChatMessages(memory);\n\n\t\t// Construct a new thread from the chat history to map the memory\n\t\tif (chatMessages.length) {\n\t\t\tconst first32Messages = chatMessages.slice(0, 32);\n\t\t\t// There is a undocumented limit of 32 messages per thread when creating a thread with messages\n\t\t\tconst mappedMessages: OpenAIClient.Beta.Threads.ThreadCreateParams.Message[] =\n\t\t\t\tfirst32Messages.map(mapChatMessageToThreadMessage);\n\n\t\t\tthread = await client.beta.threads.create({ messages: mappedMessages });\n\t\t\tconst overLimitMessages = chatMessages.slice(32).map(mapChatMessageToThreadMessage);\n\n\t\t\t// Send the remaining messages that exceed the limit of 32 sequentially\n\t\t\tfor (const message of overLimitMessages) {\n\t\t\t\tawait client.beta.threads.messages.create(thread.id, message);\n\t\t\t}\n\n\t\t\tchainValues.threadId = thread.id;\n\t\t}\n\t} else if (threadId) {\n\t\tchainValues.threadId = threadId;\n\t}\n\n\tlet filteredResponse: IDataObject = {};\n\ttry {\n\t\tconst response = await agentExecutor.withConfig(getTracingConfig(this)).invoke(chainValues);\n\t\tif (memory) {\n\t\t\tawait memory.saveContext({ input }, { output: response.output });\n\n\t\t\tif (response.threadId && response.runId) {\n\t\t\t\tconst threadRun = await client.beta.threads.runs.retrieve(\n\t\t\t\t\tresponse.threadId,\n\t\t\t\t\tresponse.runId,\n\t\t\t\t);\n\t\t\t\tresponse.usage = threadRun.usage;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\toptions.preserveOriginalTools !== false &&\n\t\t\tnodeVersion >= 1.3 &&\n\t\t\t(assistantTools ?? [])?.length\n\t\t) {\n\t\t\tawait client.beta.assistants.update(assistantId, {\n\t\t\t\ttools: assistantTools,\n\t\t\t});\n\t\t}\n\t\t// Remove configuration properties and runId added by Langchain that are not relevant to the user\n\t\tfilteredResponse = omit(response, ['signal', 'timeout', 'content', 'runId']) as IDataObject;\n\t} catch (error) {\n\t\tif (!(error instanceof ApplicationError)) {\n\t\t\tthrow new NodeOperationError(this.getNode(), error.message, { itemIndex: i });\n\t\t}\n\t}\n\n\treturn [{ json: filteredResponse, pairedItem: { item: i } }];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA8B;AAE9B,8BAAwC;AAExC,kBAAiB;AAOjB,0BAKO;AACP,oBAAuC;AAEvC,0BAAkC;AAClC,qBAAkC;AAClC,qBAAiC;AAEjC,mBAA6D;AAC7D,IAAAA,uBAA6B;AAE7B,MAAM,aAAgC;AAAA,EACrC;AAAA,EACA;AAAA,IACC,GAAG;AAAA,IACH,MAAM;AAAA,EACP;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,IACb,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,QAAQ,CAAC,QAAQ;AAAA,MAClB;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,MACR;AAAA,QACC,MAAM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,MAAM,SAAS,EAAE,WAAW,EAAE,CAAC;AAAA,IAC7E;AAAA,EACD;AAEA,SAAO,CAAC,EAAE,MAAM,kBAAkB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;AAC5D;","names":["import_descriptions","OpenAIClient","omit"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../nodes/vendors/OpenAi/actions/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport type { INodeInputConfiguration, INodeTypeDescription } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport * as assistant from './assistant';\nimport * as audio from './audio';\nimport * as file from './file';\nimport * as image from './image';\nimport * as text from './text';\n\nconst prettifyOperation = (resource: string, operation: string) => {\n\tif (operation === 'deleteAssistant') {\n\t\treturn 'Delete Assistant';\n\t}\n\n\tif (operation === 'deleteFile') {\n\t\treturn 'Delete File';\n\t}\n\n\tif (operation === 'classify') {\n\t\treturn 'Classify Text';\n\t}\n\n\tif (operation === 'message' && resource === 'text') {\n\t\treturn 'Message Model';\n\t}\n\n\tconst capitalize = (str: string) => {\n\t\tconst chars = str.split('');\n\t\tchars[0] = chars[0].toUpperCase();\n\t\treturn chars.join('');\n\t};\n\n\tif (['transcribe', 'translate'].includes(operation)) {\n\t\tresource = 'recording';\n\t}\n\n\tif (operation === 'list') {\n\t\tresource = resource + 's';\n\t}\n\n\treturn `${capitalize(operation)} ${capitalize(resource)}`;\n};\n\nconst configureNodeInputs = (\n\tresource: string,\n\toperation: string,\n\thideTools: string,\n\tmemory: string | undefined,\n) => {\n\tif (resource === 'assistant' && operation === 'message') {\n\t\tconst inputs: INodeInputConfiguration[] = [\n\t\t\t{ type: 'main' },\n\t\t\t{ type: 'ai_tool', displayName: 'Tools' },\n\t\t];\n\t\tif (memory !== 'threadId') {\n\t\t\tinputs.push({ type: 'ai_memory', displayName: 'Memory', maxConnections: 1 });\n\t\t}\n\t\treturn inputs;\n\t}\n\tif (resource === 'text' && operation === 'message') {\n\t\tif (hideTools === 'hide') {\n\t\t\treturn ['main'];\n\t\t}\n\t\treturn [{ type: 'main' }, { type: 'ai_tool', displayName: 'Tools' }];\n\t}\n\n\treturn ['main'];\n};\n\
|
|
1
|
+
{"version":3,"sources":["../../../../../nodes/vendors/OpenAi/actions/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\nimport type { INodeInputConfiguration, INodeTypeDescription } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport * as assistant from './assistant';\nimport * as audio from './audio';\nimport * as file from './file';\nimport * as image from './image';\nimport * as text from './text';\n\nconst prettifyOperation = (resource: string, operation: string) => {\n\tif (operation === 'deleteAssistant') {\n\t\treturn 'Delete Assistant';\n\t}\n\n\tif (operation === 'deleteFile') {\n\t\treturn 'Delete File';\n\t}\n\n\tif (operation === 'classify') {\n\t\treturn 'Classify Text';\n\t}\n\n\tif (operation === 'message' && resource === 'text') {\n\t\treturn 'Message Model';\n\t}\n\n\tconst capitalize = (str: string) => {\n\t\tconst chars = str.split('');\n\t\tchars[0] = chars[0].toUpperCase();\n\t\treturn chars.join('');\n\t};\n\n\tif (['transcribe', 'translate'].includes(operation)) {\n\t\tresource = 'recording';\n\t}\n\n\tif (operation === 'list') {\n\t\tresource = resource + 's';\n\t}\n\n\treturn `${capitalize(operation)} ${capitalize(resource)}`;\n};\n\nconst configureNodeInputs = (\n\tresource: string,\n\toperation: string,\n\thideTools: string,\n\tmemory: string | undefined,\n) => {\n\tif (resource === 'assistant' && operation === 'message') {\n\t\tconst inputs: INodeInputConfiguration[] = [\n\t\t\t{ type: 'main' },\n\t\t\t{ type: 'ai_tool', displayName: 'Tools' },\n\t\t];\n\t\tif (memory !== 'threadId') {\n\t\t\tinputs.push({ type: 'ai_memory', displayName: 'Memory', maxConnections: 1 });\n\t\t}\n\t\treturn inputs;\n\t}\n\tif (resource === 'text' && operation === 'message') {\n\t\tif (hideTools === 'hide') {\n\t\t\treturn ['main'];\n\t\t}\n\t\treturn [{ type: 'main' }, { type: 'ai_tool', displayName: 'Tools' }];\n\t}\n\n\treturn ['main'];\n};\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'OpenAI',\n\tname: 'openAi',\n\ticon: { light: 'file:openAi.svg', dark: 'file:openAi.dark.svg' },\n\tgroup: ['transform'],\n\tversion: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8],\n\tsubtitle: `={{(${prettifyOperation})($parameter.resource, $parameter.operation)}}`,\n\tdescription: 'Message an assistant or GPT, analyze images, generate audio, etc.',\n\tdefaults: {\n\t\tname: 'OpenAI',\n\t},\n\tcodex: {\n\t\talias: ['LangChain', 'ChatGPT', 'DallE', 'whisper', 'audio', 'transcribe', 'tts', 'assistant'],\n\t\tcategories: ['AI'],\n\t\tsubcategories: {\n\t\t\tAI: ['Agents', 'Miscellaneous', 'Root Nodes'],\n\t\t},\n\t\tresources: {\n\t\t\tprimaryDocumentation: [\n\t\t\t\t{\n\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\tinputs: `={{(${configureNodeInputs})($parameter.resource, $parameter.operation, $parameter.hideTools, $parameter.memory ?? undefined)}}`,\n\toutputs: [NodeConnectionTypes.Main],\n\tcredentials: [\n\t\t{\n\t\t\tname: 'openAiApi',\n\t\t\trequired: true,\n\t\t},\n\t],\n\tproperties: [\n\t\t{\n\t\t\tdisplayName: 'Resource',\n\t\t\tname: 'resource',\n\t\t\ttype: 'options',\n\t\t\tnoDataExpression: true,\n\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Assistant',\n\t\t\t\t\tvalue: 'assistant',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Text',\n\t\t\t\t\tvalue: 'text',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Image',\n\t\t\t\t\tvalue: 'image',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Audio',\n\t\t\t\t\tvalue: 'audio',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'File',\n\t\t\t\t\tvalue: 'file',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'text',\n\t\t},\n\t\t...assistant.description,\n\t\t...audio.description,\n\t\t...file.description,\n\t\t...image.description,\n\t\t...text.description,\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAAoC;AAEpC,gBAA2B;AAC3B,YAAuB;AACvB,WAAsB;AACtB,YAAuB;AACvB,WAAsB;AAEtB,MAAM,oBAAoB,CAAC,UAAkB,cAAsB;AAClE,MAAI,cAAc,mBAAmB;AACpC,WAAO;AAAA,EACR;AAEA,MAAI,cAAc,cAAc;AAC/B,WAAO;AAAA,EACR;AAEA,MAAI,cAAc,YAAY;AAC7B,WAAO;AAAA,EACR;AAEA,MAAI,cAAc,aAAa,aAAa,QAAQ;AACnD,WAAO;AAAA,EACR;AAEA,QAAM,aAAa,CAAC,QAAgB;AACnC,UAAM,QAAQ,IAAI,MAAM,EAAE;AAC1B,UAAM,CAAC,IAAI,MAAM,CAAC,EAAE,YAAY;AAChC,WAAO,MAAM,KAAK,EAAE;AAAA,EACrB;AAEA,MAAI,CAAC,cAAc,WAAW,EAAE,SAAS,SAAS,GAAG;AACpD,eAAW;AAAA,EACZ;AAEA,MAAI,cAAc,QAAQ;AACzB,eAAW,WAAW;AAAA,EACvB;AAEA,SAAO,GAAG,WAAW,SAAS,CAAC,IAAI,WAAW,QAAQ,CAAC;AACxD;AAEA,MAAM,sBAAsB,CAC3B,UACA,WACA,WACA,WACI;AACJ,MAAI,aAAa,eAAe,cAAc,WAAW;AACxD,UAAM,SA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A,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,kBAAkB;AAAA;AAAA,MAElB,SAAS;AAAA,QACR;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,QACR;AAAA,QACA;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,QACR;AAAA,MACD;AAAA,MACA,SAAS;AAAA,IACV;AAAA,IACA,GAAG,UAAU;AAAA,IACb,GAAG,MAAM;AAAA,IACT,GAAG,KAAK;AAAA,IACR,GAAG,MAAM;AAAA,IACT,GAAG,KAAK;AAAA,EACT;AACD;","names":[]}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
{"name":"qdrantApi","displayName":"QdrantApi","documentationUrl":"https://docs.n8n.io/integrations/builtin/credentials/qdrant/","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":false,"default":""},{"displayName":"Qdrant URL","name":"qdrantUrl","type":"string","required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.qdrantUrl}}","url":"/collections"}},"supportedNodes":["vectorStoreQdrant"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreQdrant/qdrant.svg"},
|
|
17
17
|
{"name":"searXngApi","displayName":"SearXNG","documentationUrl":"searxng","properties":[{"displayName":"API URL","name":"apiUrl","type":"string","default":"","required":true}],"supportedNodes":["toolSearXng"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolSearXng/searXng.svg"},
|
|
18
18
|
{"name":"serpApi","displayName":"SerpAPI","documentationUrl":"serp","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"api_key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://serpapi.com","url":"/account.json "}},"supportedNodes":["toolSerpApi"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolSerpApi/serpApi.svg"},
|
|
19
|
+
{"name":"weaviateApi","displayName":"Weaviate Credentials","documentationUrl":"https://docs.n8n.io/integrations/builtin/credentials/weaviate/","properties":[{"displayName":"Connection Type","name":"connection_type","type":"options","options":[{"name":"Weaviate Cloud","value":"weaviate_cloud"},{"name":"Custom Connection","value":"custom_connection"}],"default":"weaviate_cloud","description":"Choose whether to connect to a Weaviate Cloud instance or a custom Weaviate instance."},{"displayName":"Weaviate Cloud Endpoint","name":"weaviate_cloud_endpoint","description":"The Endpoint of a Weaviate Cloud instance.","placeholder":"https://your-cluster.weaviate.cloud","type":"string","required":true,"default":"","displayOptions":{"show":{"connection_type":["weaviate_cloud"]}}},{"displayName":"Weaviate Api Key","name":"weaviate_api_key","description":"The API key for the Weaviate instance.","type":"string","typeOptions":{"password":true},"default":""},{"displayName":"Custom Connection HTTP Host","name":"custom_connection_http_host","description":"The host of your Weaviate instance.","type":"string","required":true,"default":"weaviate","displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection HTTP Port","name":"custom_connection_http_port","description":"The port of your Weaviate instance.","type":"number","required":true,"default":8080,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection HTTP Secure","name":"custom_connection_http_secure","description":"Whether to use a secure connection for HTTP.","type":"boolean","required":true,"default":false,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Host","name":"custom_connection_grpc_host","description":"The gRPC host of your Weaviate instance.","type":"string","required":true,"default":"weaviate","displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Port","name":"custom_connection_grpc_port","description":"The gRPC port of your Weaviate instance.","type":"number","required":true,"default":50051,"displayOptions":{"show":{"connection_type":["custom_connection"]}}},{"displayName":"Custom Connection gRPC Secure","name":"custom_connection_grpc_secure","description":"Whether to use a secure connection for gRPC.","type":"boolean","required":true,"default":false,"displayOptions":{"show":{"connection_type":["custom_connection"]}}}],"test":{"request":{"baseURL":"={{$credentials.weaviate_cloud_endpoint?$credentials.weaviate_cloud_endpoint.startsWith(\"http://\") || $credentials.weaviate_cloud_endpoint.startsWith(\"https://\")?$credentials.weaviate_cloud_endpoint:\"https://\" + $credentials.weaviate_cloud_endpoint:($credentials.custom_connection_http_secure ? \"https\" : \"http\") + \"://\" + $credentials.custom_connection_http_host + \":\" + $credentials.custom_connection_http_port }}","url":"/v1/nodes","disableFollowRedirect":false,"headers":{"Authorization":"={{$if($credentials.weaviate_api_key, \"Bearer \" + $credentials.weaviate_api_key, undefined)}}"}}},"supportedNodes":["vectorStoreWeaviate"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg"},
|
|
19
20
|
{"name":"wolframAlphaApi","displayName":"WolframAlphaApi","documentationUrl":"wolframalpha","properties":[{"displayName":"App ID","name":"appId","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"api_key":"={{$credentials.appId}}"}}},"test":{"request":{"baseURL":"https://api.wolframalpha.com/v1","url":"=/simple","qs":{"i":"How much is 1 1","appid":"={{$credentials.appId}}"}}},"supportedNodes":["toolWolframAlpha"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolWolframAlpha/wolfram-alpha.svg"},
|
|
20
21
|
{"name":"xAiApi","displayName":"xAi","documentationUrl":"xai","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://api.x.ai/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChatXAiGrok"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.dark.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.svg"}},
|
|
21
22
|
{"name":"xataApi","displayName":"Xata Api","documentationUrl":"xata","properties":[{"displayName":"Database Endpoint","name":"databaseEndpoint","required":true,"type":"string","default":"","placeholder":"https://{workspace}.{region}.xata.sh/db/{database}"},{"displayName":"Branch","name":"branch","required":true,"type":"string","default":"main"},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.databaseEndpoint}}:{{$credentials.branch}}"}},"supportedNodes":["memoryXata"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/memory/MemoryXata/xata.svg"},
|