feat: add custom edge (#1061)

### What problem does this PR solve?
feat: add custom edge
feat: add flow card
feat: add store for canvas
#918 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-06-05 10:46:06 +08:00
committed by GitHub
parent b8eedbdd86
commit 39ac3b1e60
42 changed files with 1559 additions and 387 deletions

View File

@ -7,7 +7,6 @@ import {
Form,
Input,
Row,
Slider,
Switch,
Table,
TableProps,
@ -30,16 +29,11 @@ import {
import { EditableCell, EditableRow } from './editable-cell';
import Rerank from '@/components/rerank';
import TopNItem from '@/components/top-n-item';
import { useTranslate } from '@/hooks/commonHooks';
import { useSelectPromptConfigParameters } from '../hooks';
import styles from './index.less';
type FieldType = {
similarity_threshold?: number;
vector_similarity_weight?: number;
top_n?: number;
};
const PromptEngine = (
{ show }: ISegmentedContentProps,
ref: ForwardedRef<Array<IPromptConfigParameters>>,
@ -165,14 +159,7 @@ const PromptEngine = (
</Form.Item>
<Divider></Divider>
<SimilaritySlider isTooltipShown></SimilaritySlider>
<Form.Item<FieldType>
label={t('topN')}
name={'top_n'}
initialValue={8}
tooltip={t('topNTip')}
>
<Slider max={30} />
</Form.Item>
<TopNItem></TopNItem>
<Rerank></Rerank>
<section className={classNames(styles.variableContainer)}>
<Row align={'middle'} justify="end">