mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-04-23 12:16:18 +08:00
Revert "Refactor: dataset / kb API to RESTFul style" (#13646)
Reverts infiniflow/ragflow#13619
This commit is contained in:
@ -181,7 +181,7 @@ export function ChunkMethodDialog({
|
||||
});
|
||||
|
||||
const selectedTag = useWatch({
|
||||
name: 'chunk_method',
|
||||
name: 'parser_id',
|
||||
control: form.control,
|
||||
});
|
||||
const isMineruSelected =
|
||||
|
||||
@ -23,7 +23,7 @@ export function useDisableDifferenceEmbeddingDataset() {
|
||||
|
||||
useEffect(() => {
|
||||
const datasetListMap = datasetListOrigin
|
||||
.filter((x) => x.chunk_method !== DocumentParserType.Tag)
|
||||
.filter((x) => x.parser_id !== DocumentParserType.Tag)
|
||||
.map((item: IKnowledge) => {
|
||||
return {
|
||||
label: item.name,
|
||||
@ -36,12 +36,12 @@ export function useDisableDifferenceEmbeddingDataset() {
|
||||
),
|
||||
suffix: (
|
||||
<div className="text-xs px-4 p-1 bg-bg-card text-text-secondary rounded-lg border border-bg-card">
|
||||
{item.embedding_model}
|
||||
{item.embd_id}
|
||||
</div>
|
||||
),
|
||||
value: item.id,
|
||||
disabled:
|
||||
item.embedding_model !== datasetSelectEmbedId &&
|
||||
item.embd_id !== datasetSelectEmbedId &&
|
||||
datasetSelectEmbedId !== '',
|
||||
};
|
||||
});
|
||||
@ -54,7 +54,7 @@ export function useDisableDifferenceEmbeddingDataset() {
|
||||
) => {
|
||||
if (value.length) {
|
||||
const data = datasetListOrigin?.find((item) => item.id === value[0]);
|
||||
setDatasetSelectEmbedId(data?.embedding_model ?? '');
|
||||
setDatasetSelectEmbedId(data?.embd_id ?? '');
|
||||
} else {
|
||||
setDatasetSelectEmbedId('');
|
||||
}
|
||||
|
||||
@ -242,9 +242,7 @@ export const MultiSelect = React.forwardRef<
|
||||
|
||||
const disabledValueSet = React.useMemo(() => {
|
||||
return new Set(
|
||||
flatOptions
|
||||
.filter((option) => option.disabled)
|
||||
.map((option) => option.value),
|
||||
flatOptions.filter((option) => option.disabled).map((option) => option.value),
|
||||
);
|
||||
}, [flatOptions]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user