mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: fetch flow (#1068)
### What problem does this PR solve? feat: fetch flow #918 feat: save graph ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -8,11 +8,8 @@ import { IDialog } from '@/interfaces/database/chat';
|
||||
import { Divider, Flex, Form, Modal, Segmented, UploadFile } from 'antd';
|
||||
import { SegmentedValue } from 'antd/es/segmented';
|
||||
import camelCase from 'lodash/camelCase';
|
||||
import omit from 'lodash/omit';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { variableEnabledFieldMap } from '../constants';
|
||||
import { IPromptConfigParameters } from '../interface';
|
||||
import { excludeUnEnabledVariables } from '../utils';
|
||||
import AssistantSetting from './assistant-setting';
|
||||
import { useFetchLlmModelOnVisible, useFetchModelId } from './hooks';
|
||||
import ModelSetting from './model-setting';
|
||||
@ -20,6 +17,7 @@ import PromptEngine from './prompt-engine';
|
||||
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
import { getBase64FromUploadFileList } from '@/utils/fileUtil';
|
||||
import { removeUselessFieldsFromValues } from '@/utils/form';
|
||||
import styles from './index.less';
|
||||
|
||||
const layout = {
|
||||
@ -76,11 +74,10 @@ const ChatConfigurationModal = ({
|
||||
|
||||
const handleOk = async () => {
|
||||
const values = await form.validateFields();
|
||||
const nextValues: any = omit(values, [
|
||||
...Object.keys(variableEnabledFieldMap),
|
||||
'parameters',
|
||||
...excludeUnEnabledVariables(values),
|
||||
]);
|
||||
const nextValues: any = removeUselessFieldsFromValues(
|
||||
values,
|
||||
'llm_setting.',
|
||||
);
|
||||
const emptyResponse = nextValues.prompt_config?.empty_response ?? '';
|
||||
|
||||
const icon = await getBase64FromUploadFileList(values.icon);
|
||||
|
||||
Reference in New Issue
Block a user