feat: add KeywordExtractForm and BaiduForm and DuckDuckGoForm #918 (#1477)

### What problem does this PR solve?
feat: add KeywordExtractForm and BaiduForm and DuckDuckGoForm #918


### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-12 11:37:31 +08:00
committed by GitHub
parent ddeac9ab3d
commit 575099df2d
9 changed files with 99 additions and 28 deletions

View File

@@ -1,5 +1,4 @@
import { useTranslate } from '@/hooks/commonHooks';
import type { FormProps } from 'antd';
import { Form, Input } from 'antd';
import { IOperatorForm } from '../interface';
@@ -7,14 +6,6 @@ type FieldType = {
prologue?: string;
};
const onFinish: FormProps<FieldType>['onFinish'] = (values) => {
console.log('Success:', values);
};
const onFinishFailed: FormProps<FieldType>['onFinishFailed'] = (errorInfo) => {
console.log('Failed:', errorInfo);
};
const BeginForm = ({ onValuesChange, form }: IOperatorForm) => {
const { t } = useTranslate('chat');
@@ -23,10 +14,6 @@ const BeginForm = ({ onValuesChange, form }: IOperatorForm) => {
name="basic"
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}
style={{ maxWidth: 600 }}
initialValues={{ remember: true }}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
onValuesChange={onValuesChange}
autoComplete="off"
form={form}