mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 07:26:47 +08:00
### What problem does this PR solve? Feat: Add bing form #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
32
web/src/pages/agent/form/tool-form/bing-form/index.tsx
Normal file
32
web/src/pages/agent/form/tool-form/bing-form/index.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { Form } from '@/components/ui/form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { memo } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
import { BingFormSchema, BingFormWidgets } from '../../bing-form';
|
||||
import { FormWrapper } from '../../components/form-wrapper';
|
||||
import { useValues } from '../use-values';
|
||||
import { useWatchFormChange } from '../use-watch-change';
|
||||
|
||||
export const FormSchema = z.object(BingFormSchema);
|
||||
|
||||
function BingForm() {
|
||||
const defaultValues = useValues();
|
||||
|
||||
const form = useForm<z.infer<typeof FormSchema>>({
|
||||
resolver: zodResolver(FormSchema),
|
||||
defaultValues,
|
||||
});
|
||||
|
||||
useWatchFormChange(form);
|
||||
|
||||
return (
|
||||
<Form {...form}>
|
||||
<FormWrapper>
|
||||
<BingFormWidgets></BingFormWidgets>
|
||||
</FormWrapper>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(BingForm);
|
||||
@ -1,7 +1,6 @@
|
||||
import { Operator } from '../../constant';
|
||||
import AkShareForm from '../akshare-form';
|
||||
import ArXivForm from '../arxiv-form';
|
||||
import BingForm from '../bing-form';
|
||||
import DeepLForm from '../deepl-form';
|
||||
import DuckDuckGoForm from '../duckduckgo-form';
|
||||
import EmailForm from '../email-form';
|
||||
@ -11,6 +10,7 @@ import GoogleScholarForm from '../google-scholar-form';
|
||||
import PubMedForm from '../pubmed-form';
|
||||
import WikipediaForm from '../wikipedia-form';
|
||||
import YahooFinanceForm from '../yahoo-finance-form';
|
||||
import BingForm from './bing-form';
|
||||
import CrawlerForm from './crawler-form';
|
||||
import ExeSQLForm from './exesql-form';
|
||||
import RetrievalForm from './retrieval-form';
|
||||
|
||||
Reference in New Issue
Block a user