mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Add Email and DuckDuckGo and Wikipedia Operator #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { omit } from 'lodash';
|
||||
import { omit, pick } from 'lodash';
|
||||
import { useCallback } from 'react';
|
||||
import { Operator } from '../constant';
|
||||
import { useInitializeOperatorParams } from './use-add-node';
|
||||
@ -27,6 +27,22 @@ export function useAgentToolInitialValues() {
|
||||
case Operator.YahooFinance:
|
||||
return omit(initialValues, 'stock_code');
|
||||
|
||||
case Operator.Email:
|
||||
return pick(
|
||||
initialValues,
|
||||
'smtp_server',
|
||||
'smtp_port',
|
||||
'email',
|
||||
'password',
|
||||
'sender_name',
|
||||
);
|
||||
|
||||
case Operator.DuckDuckGo:
|
||||
return pick(initialValues, 'top_n', 'channel');
|
||||
|
||||
case Operator.Wikipedia:
|
||||
return pick(initialValues, 'top_n', 'language');
|
||||
|
||||
default:
|
||||
return initialValues;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user