mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Run yarn lint-fix
This commit is contained in:
@@ -12,7 +12,7 @@ class SearchApi implements INodeCredential {
|
||||
this.name = 'searchApi'
|
||||
this.version = 1.0
|
||||
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 = [
|
||||
{
|
||||
label: 'SearchApi API Key',
|
||||
|
||||
@@ -74,17 +74,17 @@ class SearchAPI_DocumentLoaders implements INode {
|
||||
const searchApiKey = getCredentialParam('searchApiKey', credentialData, nodeData)
|
||||
|
||||
// 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
|
||||
const loaderConfig = {
|
||||
q: query,
|
||||
apiKey: searchApiKey,
|
||||
...parsedParameters
|
||||
};
|
||||
}
|
||||
|
||||
// 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
|
||||
const docs = textSplitter ? await loader.loadAndSplit() : await loader.load()
|
||||
|
||||
Reference in New Issue
Block a user