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 component YahooFinance #1739 ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
This commit is contained in:
@ -15,6 +15,7 @@ import { ReactComponent as QWeatherIcon } from '@/assets/svg/qweather.svg';
|
||||
import { ReactComponent as SwitchIcon } from '@/assets/svg/switch.svg';
|
||||
import { ReactComponent as WenCaiIcon } from '@/assets/svg/wencai.svg';
|
||||
import { ReactComponent as WikipediaIcon } from '@/assets/svg/wikipedia.svg';
|
||||
import { ReactComponent as YahooFinanceIcon } from '@/assets/svg/yahoo-finance.svg';
|
||||
|
||||
import { variableEnabledFieldMap } from '@/constants/chat';
|
||||
import i18n from '@/locales/config';
|
||||
@ -63,6 +64,7 @@ export enum Operator {
|
||||
Switch = 'Switch',
|
||||
WenCai = 'WenCai',
|
||||
AkShare = 'AkShare',
|
||||
YahooFinance = 'YahooFinance',
|
||||
}
|
||||
|
||||
export const operatorIconMap = {
|
||||
@ -91,6 +93,7 @@ export const operatorIconMap = {
|
||||
[Operator.Switch]: SwitchIcon,
|
||||
[Operator.WenCai]: WenCaiIcon,
|
||||
[Operator.AkShare]: AkShareIcon,
|
||||
[Operator.YahooFinance]: YahooFinanceIcon,
|
||||
};
|
||||
|
||||
export const operatorMap: Record<
|
||||
@ -202,6 +205,7 @@ export const operatorMap: Record<
|
||||
[Operator.Switch]: { backgroundColor: '#dbaff6' },
|
||||
[Operator.WenCai]: { backgroundColor: '#faac5b' },
|
||||
[Operator.AkShare]: { backgroundColor: '#8085f5' },
|
||||
[Operator.YahooFinance]: { backgroundColor: '#b474ff' },
|
||||
};
|
||||
|
||||
export const componentMenuList = [
|
||||
@ -277,6 +281,9 @@ export const componentMenuList = [
|
||||
{
|
||||
name: Operator.AkShare,
|
||||
},
|
||||
{
|
||||
name: Operator.YahooFinance,
|
||||
},
|
||||
];
|
||||
|
||||
export const initialRetrievalValues = {
|
||||
@ -420,6 +427,15 @@ export const initialWenCaiValues = { top_n: 20, query_type: 'stock' };
|
||||
|
||||
export const initialAkShareValues = { top_n: 10 };
|
||||
|
||||
export const initialYahooFinanceValues = {
|
||||
info: true,
|
||||
history: false,
|
||||
financials: false,
|
||||
balance_sheet: false,
|
||||
cash_flow_statement: false,
|
||||
news: true,
|
||||
};
|
||||
|
||||
export const CategorizeAnchorPointPositions = [
|
||||
{ top: 1, right: 34 },
|
||||
{ top: 8, right: 18 },
|
||||
@ -492,6 +508,7 @@ export const RestrictedUpstreamMap = {
|
||||
[Operator.Switch]: [Operator.Begin],
|
||||
[Operator.WenCai]: [Operator.Begin],
|
||||
[Operator.AkShare]: [Operator.Begin],
|
||||
[Operator.YahooFinance]: [Operator.Begin],
|
||||
};
|
||||
|
||||
export const NodeMap = {
|
||||
@ -520,6 +537,7 @@ export const NodeMap = {
|
||||
[Operator.Switch]: 'categorizeNode',
|
||||
[Operator.WenCai]: 'ragNode',
|
||||
[Operator.AkShare]: 'ragNode',
|
||||
[Operator.YahooFinance]: 'ragNode',
|
||||
};
|
||||
|
||||
export const LanguageOptions = [
|
||||
|
||||
Reference in New Issue
Block a user