Feat: Add Tavily Api Key to chat configuration modal. #5198 (#5347)

### What problem does this PR solve?

Feat: Add Tavily Api Key to chat configuration modal. #5198

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-02-26 10:20:40 +08:00
committed by GitHub
parent 150ab9c6a4
commit e5e9ca0015
7 changed files with 47 additions and 9 deletions

View File

@ -2,7 +2,7 @@ import KnowledgeBaseItem from '@/components/knowledge-base-item';
import { useTranslate } from '@/hooks/common-hooks';
import { useFetchTenantInfo } from '@/hooks/user-setting-hooks';
import { PlusOutlined } from '@ant-design/icons';
import { Form, Input, message, Select, Switch, Upload } from 'antd';
import { Form, Input, message, Select, Switch, Typography, Upload } from 'antd';
import classNames from 'classnames';
import { useCallback } from 'react';
import { ISegmentedContentProps } from '../interface';
@ -147,6 +147,16 @@ const AssistantSetting = ({
>
<Switch onChange={handleTtsChange} />
</Form.Item>
<Form.Item label={'Tavily Api Key'} tooltip={t('tavilyApiKeyTip')}>
<div className="flex flex-col gap-1">
<Form.Item name={['prompt_config', 'tavily_api_key']} 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>
<KnowledgeBaseItem
required={false}
onChange={handleChange}