fix: fixed the issue where parameters of DuckDuckGo could not be saved to the backend after being dragged to the canvas #918 (#1503)

### What problem does this PR solve?

fix: fixed the issue where parameters of DuckDuckGo could not be saved
to the backend after being dragged to the canvas #918

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-15 10:23:16 +08:00
committed by GitHub
parent d9868d0229
commit 2dea8448a6
3 changed files with 43 additions and 30 deletions

View File

@ -4,6 +4,12 @@ import { ReactComponent as KeywordIcon } from '@/assets/svg/keyword.svg';
import { variableEnabledFieldMap } from '@/constants/chat';
import i18n from '@/locales/config';
// DuckDuckGo's channel options
export enum Channel {
Text = 'text',
News = 'news',
}
import {
BranchesOutlined,
DatabaseOutlined,
@ -192,17 +198,13 @@ export const initialKeywordExtractValues = {
...initialLlmBaseValues,
top_n: 1,
};
export const initialDuckValues = {
top_n: 10,
channel: Channel.Text,
};
export const initialFormValuesMap = {
[Operator.Begin]: initialBeginValues,
[Operator.Retrieval]: initialRetrievalValues,
[Operator.Generate]: initialGenerateValues,
[Operator.Answer]: {},
[Operator.Categorize]: initialCategorizeValues,
[Operator.Relevant]: initialRelevantValues,
[Operator.RewriteQuestion]: initialRewriteQuestionValues,
[Operator.Message]: initialMessageValues,
[Operator.KeywordExtract]: initialKeywordExtractValues,
export const initialBaiduValues = {
top_n: 10,
};
export const CategorizeAnchorPointPositions = [