Feat: Render WikipediaForm and BaiduForm with shadcn-ui. #3221 (#5564)

### What problem does this PR solve?

Feat: Render WikipediaForm and BaiduForm with shadcn-ui. #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-03-03 19:01:15 +08:00
committed by GitHub
parent c813c1ff4c
commit 1075b975c5
8 changed files with 215 additions and 122 deletions

View File

@ -125,23 +125,36 @@ export function useFormConfigMap() {
},
[Operator.Baidu]: {
component: BaiduForm,
defaultValues: {},
schema: z.object({}),
defaultValues: { top_n: 10 },
schema: z.object({ top_n: z.number() }),
},
[Operator.DuckDuckGo]: {
component: DuckDuckGoForm,
defaultValues: {},
schema: z.object({}),
defaultValues: {
top_n: 10,
channel: 'text',
},
schema: z.object({
top_n: z.number(),
}),
},
[Operator.KeywordExtract]: {
component: KeywordExtractForm,
defaultValues: {},
schema: z.object({}),
defaultValues: { top_n: 3 },
schema: z.object({
llm_id: z.string(),
top_n: z.number(),
}),
},
[Operator.Wikipedia]: {
component: WikipediaForm,
defaultValues: {},
schema: z.object({}),
defaultValues: {
top_n: 10,
},
schema: z.object({
language: z.string(),
top_n: z.number(),
}),
},
[Operator.PubMed]: {
component: PubMedForm,
@ -206,13 +219,22 @@ export function useFormConfigMap() {
},
[Operator.WenCai]: {
component: WenCaiForm,
defaultValues: {},
schema: z.object({}),
defaultValues: {
top_n: 20,
},
schema: z.object({
top_n: z.number(),
query_type: z.string(),
}),
},
[Operator.AkShare]: {
component: AkShareForm,
defaultValues: {},
schema: z.object({}),
defaultValues: {
top_n: 10,
},
schema: z.object({
top_n: z.number(),
}),
},
[Operator.YahooFinance]: {
component: YahooFinanceForm,