|
|
@@ -5,7 +5,8 @@ import './style.less';
|
|
|
import {
|
|
|
Button, Input, Form, Divider, Splitter, Select, InputNumber, InputNumberProps,
|
|
|
Radio, Switch, Row, Col, Slider, Space, RadioChangeEvent,
|
|
|
- Spin, message, Typography, Tooltip
|
|
|
+ Spin, message, Typography, Tooltip,
|
|
|
+ Cascader
|
|
|
} from 'antd';
|
|
|
import { PlusCircleOutlined, MinusCircleOutlined, ArrowLeftOutlined, InfoCircleOutlined } from '@ant-design/icons';
|
|
|
import { apis } from '@/apis';
|
|
|
@@ -99,6 +100,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
label: string,
|
|
|
value: string,
|
|
|
}[];
|
|
|
+
|
|
|
type KnowledgeList = {
|
|
|
label: string,
|
|
|
value: string,
|
|
|
@@ -107,6 +109,10 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
type AppTypeList = {
|
|
|
label: string,
|
|
|
value: string,
|
|
|
+ children: {
|
|
|
+ label: string,
|
|
|
+ value: string,
|
|
|
+ }[],
|
|
|
}[];
|
|
|
|
|
|
const [step, setStep] = React.useState(1);
|
|
|
@@ -124,7 +130,6 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
const [createFlag, setCreateFlag] = React.useState<boolean>();
|
|
|
const [appProjectList, setAppProjectList] = React.useState<AppTypeList>([]);
|
|
|
const [isAppPro, setIsAppPro] = React.useState<boolean>(false);
|
|
|
- const [selectedAppProId, setSelectedAppProId] = React.useState<string | undefined>(undefined); // 新增状态变量用于绑定 Select 值
|
|
|
|
|
|
const style: React.CSSProperties = {
|
|
|
display: 'flex',
|
|
|
@@ -214,8 +219,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
fetchDetail: async (app_id: string) => {
|
|
|
setPageLoading(true);
|
|
|
try {
|
|
|
- const res = await apis.fetchTakaiApplicationDetail(app_id)
|
|
|
- console.log(res.data);
|
|
|
+ const res = await apis.fetchTakaiApplicationDetail(app_id);
|
|
|
const sd = res.data.questionlist.map((item: any, index: number) => {
|
|
|
return {
|
|
|
"id": index + 1,
|
|
|
@@ -263,13 +267,13 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
setIsVisibleSlice(false);
|
|
|
}
|
|
|
|
|
|
- if(info.typeId === 42 || info.typeId === 43){
|
|
|
+ if (info.typeId === 41) {
|
|
|
setIsAppPro(true);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
setIsAppPro(false);
|
|
|
}
|
|
|
|
|
|
- if(info.model === 'Qwen3-30B') {
|
|
|
+ if (info.model === 'Qwen3-30B') {
|
|
|
setIsDeepThinkVisible(true);
|
|
|
} else {
|
|
|
setIsDeepThinkVisible(false);
|
|
|
@@ -289,9 +293,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
questionList: sd, //问题列表
|
|
|
max_token: info.maxToken, //应用最大token
|
|
|
updateDate: info.updateDate, // 更新时间
|
|
|
- appProId: info.typeId, //项目级应用类型
|
|
|
- typeId: info.typeId === 42 || info.typeId === 43 ? 41 : info.typeId, //应用类型
|
|
|
-
|
|
|
+ appProId: info.appProId,// 项目
|
|
|
+ typeId: info.typeId, //应用类型
|
|
|
param_desc: data_info.param_desc, //回答风格
|
|
|
show_recall_result: data_info.show_recall_result, //是否展示召回结果
|
|
|
recall_method: data_info.recall_method, //召回方式
|
|
|
@@ -300,7 +303,6 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
slice_config_type: data_info.slice_config_type, // 召回切片数量
|
|
|
slice_count: data_info.slice_count, // 切片数量
|
|
|
recall_slice_splicing_method: data_info.recall_slice_splicing_method, // 切片内容
|
|
|
-
|
|
|
// rerank_status = 1 rerank_index_type_list
|
|
|
// recall_method = 'embedding' || 'mixed' recall_index_type_list
|
|
|
//recall_index_type_list: info.recall_index_type_list, //知识库id
|
|
|
@@ -367,20 +369,13 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
// 项目级应用下的类型
|
|
|
fetchAppProType: async () => {
|
|
|
try {
|
|
|
- const res = await apis.fetchTakaiAppTypeList('project_type');
|
|
|
- const list = res.data.map((item: any) => {
|
|
|
- return {
|
|
|
- label: item.dictLabel,
|
|
|
- value: item.dictCode,
|
|
|
- }
|
|
|
- });
|
|
|
- console.log(list, 'project_type');
|
|
|
+ const res = await apis.fetchTakaiAppTypeList('projectTree');
|
|
|
+ const list: AppTypeList = res.data;
|
|
|
setAppProjectList(list);
|
|
|
} catch (error: any) {
|
|
|
console.error(error);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
}
|
|
|
|
|
|
const handleRedioClick = (value: string) => {
|
|
|
@@ -444,27 +439,21 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
}
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
-
|
|
|
{
|
|
|
isAppPro &&
|
|
|
- <FormItem
|
|
|
- label='类型'
|
|
|
- name='appProId'
|
|
|
- rules={[{ required: true, message: '项目类型不能为空' }]}
|
|
|
- >
|
|
|
- <Select
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
- placeholder='请选择项目类型'
|
|
|
- value={selectedAppProId}
|
|
|
- onChange={(value) => setSelectedAppProId(value)}
|
|
|
+ <>
|
|
|
+ <FormItem
|
|
|
+ label='项目'
|
|
|
+ name='appProId'
|
|
|
+ rules={[{ required: true, message: '项目不能为空' }]}
|
|
|
>
|
|
|
- {appProjectList.map((item, index) => (
|
|
|
- <Option value={item.value} key={index}>
|
|
|
- {item.label}
|
|
|
- </Option>
|
|
|
- ))}
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
+ <Cascader
|
|
|
+ options={appProjectList}
|
|
|
+ placeholder="请选择项目"
|
|
|
+ showSearch
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </>
|
|
|
}
|
|
|
|
|
|
<FormItem
|
|
|
@@ -501,7 +490,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
))}
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div style={{ display: 'flex', gap: '12px', marginTop: '24px', paddingTop: '24px', borderTop: '1px solid #f0f0f0' }}>
|
|
|
<Button
|
|
|
className='btn-cancel'
|
|
|
@@ -511,8 +500,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
>
|
|
|
返回
|
|
|
</Button>
|
|
|
- <Button
|
|
|
- type='primary'
|
|
|
+ <Button
|
|
|
+ type='primary'
|
|
|
onClick={() => {
|
|
|
form.validateFields(['name', 'desc', 'appProId']).then(async (values) => {
|
|
|
setStep(2);
|
|
|
@@ -595,7 +584,6 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
};
|
|
|
// const knowledgeIds: string[] = [];
|
|
|
// knowledgeIds.push(values.knowledge_ids);
|
|
|
- console.log(values.appProId , 'values.appProId ');
|
|
|
const info = {
|
|
|
id: values.id,
|
|
|
name: values.name, //应用名称
|
|
|
@@ -606,13 +594,14 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
knowledge_ids: values.knowledge_ids,
|
|
|
slice_count: values.slice_count,
|
|
|
model: values.model,
|
|
|
- isDeepThink:values.isDeepThink,
|
|
|
+ isDeepThink: values.isDeepThink,
|
|
|
icon_color: values.icon_color,
|
|
|
icon_type: values.icon_type,
|
|
|
questionList: question,
|
|
|
knowledge_info: JSON.stringify(data_info),
|
|
|
max_token: values.max_token, //应用最大token
|
|
|
- typeId: values.appProId === 42 || values.appProId === 43 ? values.appProId : values.typeId, // 应用类型
|
|
|
+ typeId: values.typeId, // 应用类型
|
|
|
+ appProId: values.appProId,// 项目
|
|
|
userId: userId, // 用户id
|
|
|
};
|
|
|
console.log(info, 'info data');
|
|
|
@@ -642,14 +631,16 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
});
|
|
|
});
|
|
|
}}
|
|
|
- >提交应用</Button>
|
|
|
+ >
|
|
|
+ 提交应用
|
|
|
+ </Button>
|
|
|
)}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className='section-title'>
|
|
|
Prompt编写与参数配置
|
|
|
- <Tooltip
|
|
|
- title="Prompt用于对大模型的回复做出一些列指令和约束。这段Prompt不会被用户看到。"
|
|
|
+ <Tooltip
|
|
|
+ title="Prompt用于对大模型的回复做出一些列指令和约束。这段Prompt不会被用户看到。"
|
|
|
placement="right"
|
|
|
overlayStyle={{ fontSize: '12px' }}
|
|
|
>
|
|
|
@@ -663,8 +654,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<div className='prompt-info-text'>
|
|
|
<Typography.Paragraph style={{ fontSize: '12px', lineHeight: '1.6', color: '#999', margin: 0 }}>
|
|
|
编写Prompt过程中可以引入2项变量:
|
|
|
- <span className='variable-highlight'>{'{{知识}}'}</span>
|
|
|
- 代表知识库中检索到的知识内容,
|
|
|
+ <span className='variable-highlight'>{'{{知识}}'}</span>
|
|
|
+ 代表知识库中检索到的知识内容,
|
|
|
<span className='variable-highlight'>{'{{用户}}'}</span>
|
|
|
代表用户输入的内容。您可以在编写Prompt过程中将变量拼接在合适的位置。
|
|
|
<br />
|
|
|
@@ -742,7 +733,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<FormItem
|
|
|
label='调用模型'
|
|
|
name="model"
|
|
|
- rules={[{required: true, message: '模型不能为空'}]}>
|
|
|
+ rules={[{ required: true, message: '模型不能为空' }]}>
|
|
|
<Select
|
|
|
placeholder='请选择模型'
|
|
|
allowClear={true}
|
|
|
@@ -760,227 +751,227 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</Select>
|
|
|
|
|
|
</FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='flex-center' style={{
|
|
|
+ display: isDeepThinkVisible ? 'flex' : 'none'
|
|
|
+ }}>
|
|
|
+ <FormItem
|
|
|
+ label='深度思考'
|
|
|
+ name='isDeepThink'
|
|
|
+ rules={[{ required: true, message: '请选择是否深度思考' }]}>
|
|
|
+ <Radio.Group buttonStyle="solid" className='form-control-width'>
|
|
|
+ <Radio.Button value='Y'>是</Radio.Button>
|
|
|
+ <Radio.Button value='N'>否</Radio.Button>
|
|
|
+ </Radio.Group>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='flex-center'>
|
|
|
+ <FormItem
|
|
|
+ label='max token'
|
|
|
+ name='max_token'
|
|
|
+ rules={[{ required: true, message: 'max token不能为空' }]}>
|
|
|
+ <InputNumber
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {
|
|
|
+ !isVisible &&
|
|
|
+ <div className='flex-center'>
|
|
|
+ <a onClick={() => {
|
|
|
+ setIsVisible(!isVisible);
|
|
|
+ }} className='link-more-settings'>
|
|
|
+ 更多设置
|
|
|
+ </a>
|
|
|
</div>
|
|
|
- <div className='flex-center' style={{
|
|
|
- display: isDeepThinkVisible ? 'flex' : 'none'
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ {/* {isVisible && */}
|
|
|
+ <div style={{ display: isVisible ? 'block' : 'none', paddingTop: '20px' }}>
|
|
|
+ {isVisibleCus &&
|
|
|
+ <Space style={{ width: '100%' }} direction="vertical">
|
|
|
+ <div className='flex-center'>
|
|
|
+ <FormItem
|
|
|
+ label='Top-p'
|
|
|
+ name='topP'
|
|
|
+ className='form-control-width'
|
|
|
+ >
|
|
|
+ <TopPDecimalStep />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='flex-center'>
|
|
|
+ <FormItem
|
|
|
+ label='Temperature'
|
|
|
+ name='temperature'
|
|
|
+ className='form-control-width'
|
|
|
+ >
|
|
|
+ <TempDecimalStep />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ </Space>
|
|
|
+ }
|
|
|
+
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
}}>
|
|
|
<FormItem
|
|
|
- label='深度思考'
|
|
|
- name='isDeepThink'
|
|
|
- rules={[{ required: true, message: '请选择是否深度思考' }]}>
|
|
|
- <Radio.Group buttonStyle="solid" className='form-control-width'>
|
|
|
- <Radio.Button value='Y'>是</Radio.Button>
|
|
|
- <Radio.Button value='N'>否</Radio.Button>
|
|
|
+ label='回答风格'
|
|
|
+ name='param_desc'
|
|
|
+ rules={[{ required: true, message: '回答风格不能为空' }]}>
|
|
|
+ <Radio.Group buttonStyle="solid"
|
|
|
+ className='form-control-width'>
|
|
|
+ <Radio.Button onClick={() => {
|
|
|
+ handleRedioClick('strict')
|
|
|
+ }} value='strict'>严谨</Radio.Button>
|
|
|
+ <Radio.Button onClick={() => {
|
|
|
+ handleRedioClick('moderate')
|
|
|
+ }} value='moderate'>适中</Radio.Button>
|
|
|
+ <Radio.Button onClick={() => {
|
|
|
+ handleRedioClick('flexib')
|
|
|
+ }} value='flexib'>发散</Radio.Button>
|
|
|
+ <Radio.Button value='custom'
|
|
|
+ onClick={() => {
|
|
|
+ setIsVisibleCus(!isVisibleCus);
|
|
|
+ setTopPValue(0.1);
|
|
|
+ setTempValue(0.01);
|
|
|
+ }}
|
|
|
+ >自定义
|
|
|
+ </Radio.Button>
|
|
|
</Radio.Group>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <div className='flex-center'>
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
+ }}>
|
|
|
<FormItem
|
|
|
- label='max token'
|
|
|
- name='max_token'
|
|
|
- rules={[{required: true, message: 'max token不能为空'}]}>
|
|
|
- <InputNumber
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
+ label='展示引用知识'
|
|
|
+ name='show_recall_result'
|
|
|
+ className='form-control-width'>
|
|
|
+ <Switch onChange={onChangeShow} />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
+ }}>
|
|
|
+ <FormItem
|
|
|
+ label='召回方式'
|
|
|
+ name='recall_method'
|
|
|
+ rules={[{ required: true, message: '召回方式不能为空' }]}>
|
|
|
+
|
|
|
+ <Radio.Group
|
|
|
+ style={style}
|
|
|
+ onChange={onChangeRecallMethod}
|
|
|
+ options={[
|
|
|
+ { value: 'embedding', label: '向量化检索' },
|
|
|
+ { value: 'keyword', label: '关键词检索' },
|
|
|
+ { value: 'mixed', label: '混合检索' },
|
|
|
+ ]}
|
|
|
/>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
-
|
|
|
- {
|
|
|
- !isVisible &&
|
|
|
- <div className='flex-center'>
|
|
|
- <a onClick={() => {
|
|
|
- setIsVisible(!isVisible);
|
|
|
- }} className='link-more-settings'>
|
|
|
- 更多设置
|
|
|
- </a>
|
|
|
- </div>
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- {/* {isVisible && */}
|
|
|
- <div style={{display: isVisible ? 'block' : 'none', paddingTop: '20px'}}>
|
|
|
- {isVisibleCus &&
|
|
|
- <Space style={{width: '100%'}} direction="vertical">
|
|
|
- <div className='flex-center'>
|
|
|
- <FormItem
|
|
|
- label='Top-p'
|
|
|
- name='topP'
|
|
|
- className='form-control-width'
|
|
|
- >
|
|
|
- <TopPDecimalStep/>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <div className='flex-center'>
|
|
|
- <FormItem
|
|
|
- label='Temperature'
|
|
|
- name='temperature'
|
|
|
- className='form-control-width'
|
|
|
- >
|
|
|
- <TempDecimalStep/>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- </Space>
|
|
|
- }
|
|
|
-
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <FormItem
|
|
|
- label='回答风格'
|
|
|
- name='param_desc'
|
|
|
- rules={[{required: true, message: '回答风格不能为空'}]}>
|
|
|
- <Radio.Group buttonStyle="solid"
|
|
|
- className='form-control-width'>
|
|
|
- <Radio.Button onClick={() => {
|
|
|
- handleRedioClick('strict')
|
|
|
- }} value='strict'>严谨</Radio.Button>
|
|
|
- <Radio.Button onClick={() => {
|
|
|
- handleRedioClick('moderate')
|
|
|
- }} value='moderate'>适中</Radio.Button>
|
|
|
- <Radio.Button onClick={() => {
|
|
|
- handleRedioClick('flexib')
|
|
|
- }} value='flexib'>发散</Radio.Button>
|
|
|
- <Radio.Button value='custom'
|
|
|
- onClick={() => {
|
|
|
- setIsVisibleCus(!isVisibleCus);
|
|
|
- setTopPValue(0.1);
|
|
|
- setTempValue(0.01);
|
|
|
- }}
|
|
|
- >自定义
|
|
|
- </Radio.Button>
|
|
|
- </Radio.Group>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <FormItem
|
|
|
- label='展示引用知识'
|
|
|
- name='show_recall_result'
|
|
|
- className='form-control-width'>
|
|
|
- <Switch onChange={onChangeShow}/>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <FormItem
|
|
|
- label='召回方式'
|
|
|
- name='recall_method'
|
|
|
- rules={[{required: true, message: '召回方式不能为空'}]}>
|
|
|
-
|
|
|
- <Radio.Group
|
|
|
- style={style}
|
|
|
- onChange={onChangeRecallMethod}
|
|
|
- options={[
|
|
|
- {value: 'embedding', label: '向量化检索'},
|
|
|
- {value: 'keyword', label: '关键词检索'},
|
|
|
- {value: 'mixed', label: '混合检索'},
|
|
|
- ]}
|
|
|
- />
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <div className='section-title'>重排方式</div>
|
|
|
- </div>
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
+ }}>
|
|
|
+ <div className='section-title'>重排方式</div>
|
|
|
+ </div>
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
+ }}>
|
|
|
+ <FormItem
|
|
|
+ label='Rerank模型'
|
|
|
+ name='rerank_status'
|
|
|
+ valuePropName='checked'
|
|
|
+ className='form-control-width'
|
|
|
+ >
|
|
|
+ <Switch onChange={onChangeModel} />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ {isVisibleRerank &&
|
|
|
<div style={{
|
|
|
display: 'flex',
|
|
|
justifyContent: 'center',
|
|
|
alignItems: 'center'
|
|
|
}}>
|
|
|
<FormItem
|
|
|
- label='Rerank模型'
|
|
|
- name='rerank_status'
|
|
|
- valuePropName='checked'
|
|
|
- className='form-control-width'
|
|
|
+ label='模型选择'
|
|
|
+ name='rerank_model_name'
|
|
|
>
|
|
|
- <Switch onChange={onChangeModel}/>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- {isVisibleRerank &&
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <FormItem
|
|
|
- label='模型选择'
|
|
|
- name='rerank_model_name'
|
|
|
- >
|
|
|
- <Select
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
- placeholder='请选择模型'
|
|
|
- // defaultValue={'rerank'}
|
|
|
- >
|
|
|
- <Option value='rerank'>默认rerank模型</Option>
|
|
|
- </Select>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- }
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <FormItem
|
|
|
- label='召回切片数量'
|
|
|
- name='slice_config_type'
|
|
|
- rules={[{required: true, message: '召回方式不能为空'}]}>
|
|
|
<Select
|
|
|
className='questionAnswerInfo-content-title'
|
|
|
- placeholder='请选择'
|
|
|
- onChange={onChangeCount}>
|
|
|
- <Option value="fixed">手动设置</Option>
|
|
|
- <Option value="customized">自动设置</Option>
|
|
|
+ placeholder='请选择模型'
|
|
|
+ // defaultValue={'rerank'}
|
|
|
+ >
|
|
|
+ <Option value='rerank'>默认rerank模型</Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ }
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
+ }}>
|
|
|
+ <FormItem
|
|
|
+ label='召回切片数量'
|
|
|
+ name='slice_config_type'
|
|
|
+ rules={[{ required: true, message: '召回方式不能为空' }]}>
|
|
|
+ <Select
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
+ placeholder='请选择'
|
|
|
+ onChange={onChangeCount}>
|
|
|
+ <Option value="fixed">手动设置</Option>
|
|
|
+ <Option value="customized">自动设置</Option>
|
|
|
+ </Select>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
|
|
|
- {isVisibleSlice &&
|
|
|
- <div style={{
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'center',
|
|
|
- alignItems: 'center'
|
|
|
- }}>
|
|
|
- <FormItem
|
|
|
- label='召回切片数'
|
|
|
- name='slice_count'
|
|
|
- rules={[{required: true, message: '切片数不能为空'}]}>
|
|
|
- <InputNumber max={1024} changeOnWheel
|
|
|
- className='questionAnswerInfo-content-title'/>
|
|
|
- </FormItem>
|
|
|
- </div>
|
|
|
- }
|
|
|
+ {isVisibleSlice &&
|
|
|
<div style={{
|
|
|
display: 'flex',
|
|
|
justifyContent: 'center',
|
|
|
alignItems: 'center'
|
|
|
}}>
|
|
|
<FormItem
|
|
|
- label='召回切片拼接方式'
|
|
|
- name='recall_slice_splicing_method'
|
|
|
- >
|
|
|
- <TextArea
|
|
|
- rows={4}
|
|
|
- className='form-textarea-large'
|
|
|
- placeholder="请输入内容"
|
|
|
- />
|
|
|
+ label='召回切片数'
|
|
|
+ name='slice_count'
|
|
|
+ rules={[{ required: true, message: '切片数不能为空' }]}>
|
|
|
+ <InputNumber max={1024} changeOnWheel
|
|
|
+ className='questionAnswerInfo-content-title' />
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ }
|
|
|
+ <div style={{
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center'
|
|
|
+ }}>
|
|
|
+ <FormItem
|
|
|
+ label='召回切片拼接方式'
|
|
|
+ name='recall_slice_splicing_method'
|
|
|
+ >
|
|
|
+ <TextArea
|
|
|
+ rows={4}
|
|
|
+ className='form-textarea-large'
|
|
|
+ placeholder="请输入内容"
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
</div>
|
|
|
- {/* } */}
|
|
|
</div>
|
|
|
+ {/* } */}
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</Splitter.Panel>
|
|
|
</Splitter>
|
|
|
</div>
|