mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 07:26:47 +08:00
### What problem does this PR solve? Feat: Why can't Retrieval component support internet web search. #5973 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
25
web/src/components/tavily-item.tsx
Normal file
25
web/src/components/tavily-item.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { Form, Input, Typography } from 'antd';
|
||||
|
||||
interface IProps {
|
||||
name?: string | string[];
|
||||
}
|
||||
|
||||
export function TavilyItem({
|
||||
name = ['prompt_config', 'tavily_api_key'],
|
||||
}: IProps) {
|
||||
const { t } = useTranslate('chat');
|
||||
|
||||
return (
|
||||
<Form.Item label={'Tavily API Key'} tooltip={t('tavilyApiKeyTip')}>
|
||||
<div className="flex flex-col gap-1">
|
||||
<Form.Item name={name} noStyle>
|
||||
<Input.Password placeholder={t('tavilyApiKeyMessage')} />
|
||||
</Form.Item>
|
||||
<Typography.Link href="https://app.tavily.com/home" target={'_blank'}>
|
||||
{t('tavilyApiKeyHelp')}
|
||||
</Typography.Link>
|
||||
</div>
|
||||
</Form.Item>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user