mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Run yarn lint-fix
This commit is contained in:
@@ -12,7 +12,7 @@ class SearchApi implements INodeCredential {
|
|||||||
this.name = 'searchApi'
|
this.name = 'searchApi'
|
||||||
this.version = 1.0
|
this.version = 1.0
|
||||||
this.description =
|
this.description =
|
||||||
'Sign in to <a target="_blank" href="https://www.searchapi.io/">SearchApi</a> to obtain a free API key from the dashboard.'
|
'Sign in to <a target="_blank" href="https://www.searchapi.io/">SearchApi</a> to obtain a free API key from the dashboard.'
|
||||||
this.inputs = [
|
this.inputs = [
|
||||||
{
|
{
|
||||||
label: 'SearchApi API Key',
|
label: 'SearchApi API Key',
|
||||||
|
|||||||
@@ -74,17 +74,17 @@ class SearchAPI_DocumentLoaders implements INode {
|
|||||||
const searchApiKey = getCredentialParam('searchApiKey', credentialData, nodeData)
|
const searchApiKey = getCredentialParam('searchApiKey', credentialData, nodeData)
|
||||||
|
|
||||||
// Check and parse custom parameters (should be JSON or object)
|
// Check and parse custom parameters (should be JSON or object)
|
||||||
const parsedParameters = typeof customParameters === 'object' ? customParameters : JSON.parse(customParameters || '{}');
|
const parsedParameters = typeof customParameters === 'object' ? customParameters : JSON.parse(customParameters || '{}')
|
||||||
|
|
||||||
// Prepare the configuration for the SearchApiLoader
|
// Prepare the configuration for the SearchApiLoader
|
||||||
const loaderConfig = {
|
const loaderConfig = {
|
||||||
q: query,
|
q: query,
|
||||||
apiKey: searchApiKey,
|
apiKey: searchApiKey,
|
||||||
...parsedParameters
|
...parsedParameters
|
||||||
};
|
}
|
||||||
|
|
||||||
// Initialize the loader with the given configuration
|
// Initialize the loader with the given configuration
|
||||||
const loader = new SearchApiLoader(loaderConfig);
|
const loader = new SearchApiLoader(loaderConfig)
|
||||||
|
|
||||||
// Fetch documents, split if a text splitter is provided
|
// Fetch documents, split if a text splitter is provided
|
||||||
const docs = textSplitter ? await loader.loadAndSplit() : await loader.load()
|
const docs = textSplitter ? await loader.loadAndSplit() : await loader.load()
|
||||||
|
|||||||
@@ -16,11 +16,7 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "conversationalRetrievalQAChain",
|
"name": "conversationalRetrievalQAChain",
|
||||||
"type": "ConversationalRetrievalQAChain",
|
"type": "ConversationalRetrievalQAChain",
|
||||||
"baseClasses": [
|
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "Runnable"],
|
||||||
"ConversationalRetrievalQAChain",
|
|
||||||
"BaseChain",
|
|
||||||
"Runnable"
|
|
||||||
],
|
|
||||||
"category": "Chains",
|
"category": "Chains",
|
||||||
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
|
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
|
||||||
"inputParams": [
|
"inputParams": [
|
||||||
@@ -130,11 +126,7 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "memoryVectorStore",
|
"name": "memoryVectorStore",
|
||||||
"type": "Memory",
|
"type": "Memory",
|
||||||
"baseClasses": [
|
"baseClasses": ["Memory", "VectorStoreRetriever", "BaseRetriever"],
|
||||||
"Memory",
|
|
||||||
"VectorStoreRetriever",
|
|
||||||
"BaseRetriever"
|
|
||||||
],
|
|
||||||
"category": "Vector Stores",
|
"category": "Vector Stores",
|
||||||
"description": "In-memory vectorstore that stores embeddings and does an exact, linear search for the most similar embeddings.",
|
"description": "In-memory vectorstore that stores embeddings and does an exact, linear search for the most similar embeddings.",
|
||||||
"inputParams": [
|
"inputParams": [
|
||||||
@@ -164,11 +156,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"document": [
|
"document": ["{{searchApi_0.data.instance}}", "{{searchApi_0.data.instance}}", "{{searchApi_0.data.instance}}"],
|
||||||
"{{searchApi_0.data.instance}}",
|
|
||||||
"{{searchApi_0.data.instance}}",
|
|
||||||
"{{searchApi_0.data.instance}}"
|
|
||||||
],
|
|
||||||
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
|
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
|
||||||
"topK": ""
|
"topK": ""
|
||||||
},
|
},
|
||||||
@@ -221,12 +209,7 @@
|
|||||||
"version": 2,
|
"version": 2,
|
||||||
"name": "chatOpenAI",
|
"name": "chatOpenAI",
|
||||||
"type": "ChatOpenAI",
|
"type": "ChatOpenAI",
|
||||||
"baseClasses": [
|
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||||
"ChatOpenAI",
|
|
||||||
"BaseChatModel",
|
|
||||||
"BaseLanguageModel",
|
|
||||||
"Runnable"
|
|
||||||
],
|
|
||||||
"category": "Chat Models",
|
"category": "Chat Models",
|
||||||
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
|
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
|
||||||
"inputParams": [
|
"inputParams": [
|
||||||
@@ -234,9 +217,7 @@
|
|||||||
"label": "Connect Credential",
|
"label": "Connect Credential",
|
||||||
"name": "credential",
|
"name": "credential",
|
||||||
"type": "credential",
|
"type": "credential",
|
||||||
"credentialNames": [
|
"credentialNames": ["openAIApi"],
|
||||||
"openAIApi"
|
|
||||||
],
|
|
||||||
"id": "chatOpenAI_0-input-credential-credential"
|
"id": "chatOpenAI_0-input-credential-credential"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -406,12 +387,7 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "characterTextSplitter",
|
"name": "characterTextSplitter",
|
||||||
"type": "CharacterTextSplitter",
|
"type": "CharacterTextSplitter",
|
||||||
"baseClasses": [
|
"baseClasses": ["CharacterTextSplitter", "TextSplitter", "BaseDocumentTransformer", "Runnable"],
|
||||||
"CharacterTextSplitter",
|
|
||||||
"TextSplitter",
|
|
||||||
"BaseDocumentTransformer",
|
|
||||||
"Runnable"
|
|
||||||
],
|
|
||||||
"category": "Text Splitters",
|
"category": "Text Splitters",
|
||||||
"description": "splits only on one type of character (defaults to \"\\n\\n\").",
|
"description": "splits only on one type of character (defaults to \"\\n\\n\").",
|
||||||
"inputParams": [
|
"inputParams": [
|
||||||
@@ -479,10 +455,7 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "openAIEmbeddings",
|
"name": "openAIEmbeddings",
|
||||||
"type": "OpenAIEmbeddings",
|
"type": "OpenAIEmbeddings",
|
||||||
"baseClasses": [
|
"baseClasses": ["OpenAIEmbeddings", "Embeddings"],
|
||||||
"OpenAIEmbeddings",
|
|
||||||
"Embeddings"
|
|
||||||
],
|
|
||||||
"category": "Embeddings",
|
"category": "Embeddings",
|
||||||
"description": "OpenAI API to generate embeddings for a given text",
|
"description": "OpenAI API to generate embeddings for a given text",
|
||||||
"inputParams": [
|
"inputParams": [
|
||||||
@@ -490,9 +463,7 @@
|
|||||||
"label": "Connect Credential",
|
"label": "Connect Credential",
|
||||||
"name": "credential",
|
"name": "credential",
|
||||||
"type": "credential",
|
"type": "credential",
|
||||||
"credentialNames": [
|
"credentialNames": ["openAIApi"],
|
||||||
"openAIApi"
|
|
||||||
],
|
|
||||||
"id": "openAIEmbeddings_0-input-credential-credential"
|
"id": "openAIEmbeddings_0-input-credential-credential"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -568,9 +539,7 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"name": "searchApi",
|
"name": "searchApi",
|
||||||
"type": "Document",
|
"type": "Document",
|
||||||
"baseClasses": [
|
"baseClasses": ["Document"],
|
||||||
"Document"
|
|
||||||
],
|
|
||||||
"category": "Document Loaders",
|
"category": "Document Loaders",
|
||||||
"description": "Load data from real-time search results",
|
"description": "Load data from real-time search results",
|
||||||
"inputParams": [
|
"inputParams": [
|
||||||
@@ -579,9 +548,7 @@
|
|||||||
"name": "credential",
|
"name": "credential",
|
||||||
"type": "credential",
|
"type": "credential",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
"credentialNames": [
|
"credentialNames": ["searchApi"],
|
||||||
"searchApi"
|
|
||||||
],
|
|
||||||
"id": "searchApi_0-input-credential-credential"
|
"id": "searchApi_0-input-credential-credential"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user