|
|
@@ -732,14 +732,15 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='name'
|
|
|
rules={[{ required: true, message: '问答应用名称不能为空' }]}
|
|
|
>
|
|
|
- <Input placeholder="请输入问答应用名称" className='form-input-large' />
|
|
|
+ <Input placeholder="请输入问答应用名称" className='form-element-standard' style={{ height: '48px'}}/>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
label='应用类型'
|
|
|
name='typeId'
|
|
|
>
|
|
|
<Select
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
+ className='form-element-select'
|
|
|
+ style={{ height: '48px'}}
|
|
|
placeholder='请选择问答应用类型'
|
|
|
onChange={handleAppChange}
|
|
|
allowClear={true}
|
|
|
@@ -765,7 +766,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
options={appProjectList}
|
|
|
placeholder="请选择项目"
|
|
|
showSearch
|
|
|
- className="questionAnswerInfo-content-title"
|
|
|
+ className="form-element-select"
|
|
|
+ style={{ height: '48px'}}
|
|
|
/>
|
|
|
</FormItem>
|
|
|
</>
|
|
|
@@ -775,7 +777,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='visible'
|
|
|
>
|
|
|
<Select
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
+ className='form-element-select'
|
|
|
+ style={{ height: '48px'}}
|
|
|
placeholder='请选择是否公开'
|
|
|
allowClear={true}
|
|
|
onChange={(e) => {
|
|
|
@@ -833,12 +836,12 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</FormItem>
|
|
|
|
|
|
<div className='preset-questions'>
|
|
|
- <h4>添加预设问题</h4>
|
|
|
+ <h4>添加引导问题</h4>
|
|
|
<div>
|
|
|
{
|
|
|
inputs.map(input => (
|
|
|
<div key={input.id} className='question-item'>
|
|
|
- <label>问题 {input.id}</label>
|
|
|
+ <label>引导问题 {input.id}</label>
|
|
|
<Input
|
|
|
className='question-input'
|
|
|
type="text"
|
|
|
@@ -935,7 +938,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</Tooltip>
|
|
|
</div>
|
|
|
<Splitter style={{ border: '1px solid #f0f0f0', borderRadius: '6px', height: 550 }}>
|
|
|
- <Splitter.Panel defaultSize="45%">
|
|
|
+ <Splitter.Panel defaultSize="35%">
|
|
|
<div className='prompt'>
|
|
|
<div className='prompt-info'>
|
|
|
<div className='prompt-info-text'>
|
|
|
@@ -945,15 +948,15 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
代表知识库中检索到的知识内容,
|
|
|
<span className='variable-highlight'>{'{{用户}}'}</span>
|
|
|
代表用户输入的内容。您可以在编写Prompt过程中将变量拼接在合适的位置。
|
|
|
- <br />
|
|
|
+ {/* <br />
|
|
|
插入:
|
|
|
<span className='variable-highlight'>{'{{知识}}'}</span>,
|
|
|
插入:
|
|
|
- <span className='variable-highlight'>{'{{用户}}'}</span>。
|
|
|
+ <span className='variable-highlight'>{'{{用户}}'}</span>。 */}
|
|
|
</Typography.Paragraph>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <Divider style={{ margin: '0' }} />
|
|
|
+ {/* 移除 Divider,使用 CSS 边框替代 */}
|
|
|
<div className='prompt-editor-area'>
|
|
|
<FormItem name='prompt'
|
|
|
initialValue={
|
|
|
@@ -987,11 +990,11 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</div>
|
|
|
</div>
|
|
|
</Splitter.Panel>
|
|
|
- <Splitter.Panel defaultSize="25%">
|
|
|
+ <Splitter.Panel defaultSize="30%">
|
|
|
<div className='flex-center-container'>
|
|
|
<div className='half-width'>
|
|
|
<div className='flex-center-top'>
|
|
|
- 欢迎使用 {name}
|
|
|
+ 欢迎使用 {name || '问答应用'}
|
|
|
</div>
|
|
|
<div className='flex-start pl-20 padding-top-20'>
|
|
|
<FormItem
|
|
|
@@ -1002,9 +1005,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
mode='multiple'
|
|
|
maxCount={MAX_COUNT}
|
|
|
showSearch={true}
|
|
|
- // suffixIcon={suffix}
|
|
|
- // className='questionAnswerInfo-content-title'
|
|
|
- placeholder='请选择知识库'
|
|
|
+ className='form-element-select'
|
|
|
+ placeholder='请选择需要引用的知识库'
|
|
|
>
|
|
|
{
|
|
|
knowledgeList.map((item, index) => {
|
|
|
@@ -1024,7 +1026,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<Select
|
|
|
placeholder='请选择模型'
|
|
|
allowClear={true}
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
+ className='form-element-select'
|
|
|
onChange={(value) => {
|
|
|
if (value === 'Qwen3-30B') {
|
|
|
setIsDeepThinkVisible(true);
|
|
|
@@ -1046,7 +1048,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
label='深度思考'
|
|
|
name='isDeepThink'
|
|
|
rules={[{ required: true, message: '请选择是否深度思考' }]}>
|
|
|
- <Radio.Group buttonStyle="solid" className='form-control-width'>
|
|
|
+ <Radio.Group buttonStyle="solid" className='form-element-button-group'>
|
|
|
<Radio.Button value='Y'>是</Radio.Button>
|
|
|
<Radio.Button value='N'>否</Radio.Button>
|
|
|
</Radio.Group>
|
|
|
@@ -1058,7 +1060,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='max_token'
|
|
|
rules={[{ required: true, message: 'max token不能为空' }]}>
|
|
|
<InputNumber
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
+ className='form-element-input-number'
|
|
|
/>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
@@ -1083,7 +1085,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<FormItem
|
|
|
label='Top-p'
|
|
|
name='topP'
|
|
|
- className='form-control-width'
|
|
|
+ className='form-element-standard'
|
|
|
>
|
|
|
<TopPDecimalStep />
|
|
|
</FormItem>
|
|
|
@@ -1092,7 +1094,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<FormItem
|
|
|
label='Temperature'
|
|
|
name='temperature'
|
|
|
- className='form-control-width'
|
|
|
+ className='form-element-standard'
|
|
|
>
|
|
|
<TempDecimalStep />
|
|
|
</FormItem>
|
|
|
@@ -1110,7 +1112,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='param_desc'
|
|
|
rules={[{ required: true, message: '回答风格不能为空' }]}>
|
|
|
<Radio.Group buttonStyle="solid"
|
|
|
- className='form-control-width'>
|
|
|
+ className='form-element-button-group'>
|
|
|
<Radio.Button onClick={() => {
|
|
|
handleRedioClick('strict')
|
|
|
}} value='strict'>严谨</Radio.Button>
|
|
|
@@ -1139,7 +1141,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<FormItem
|
|
|
label='展示引用知识'
|
|
|
name='show_recall_result'
|
|
|
- className='form-control-width'>
|
|
|
+ className='form-element-standard'>
|
|
|
<Switch onChange={onChangeShow} />
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
@@ -1200,7 +1202,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
placeholder='请选择模型'
|
|
|
// defaultValue={'rerank'}
|
|
|
>
|
|
|
- <Option value='rerank'>默认rerank模型</Option>
|
|
|
+ <Option value='rerank'>默认Rerank模型</Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
@@ -1215,7 +1217,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='slice_config_type'
|
|
|
rules={[{ required: true, message: '召回方式不能为空' }]}>
|
|
|
<Select
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
+ // className='questionAnswerInfo-content-title'
|
|
|
+ className='form-element-select'
|
|
|
placeholder='请选择'
|
|
|
onChange={onChangeCount}>
|
|
|
<Option value="fixed">手动设置</Option>
|
|
|
@@ -1235,7 +1238,9 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='slice_count'
|
|
|
rules={[{ required: true, message: '切片数不能为空' }]}>
|
|
|
<InputNumber max={1024} changeOnWheel
|
|
|
- className='questionAnswerInfo-content-title' />
|
|
|
+ // className='questionAnswerInfo-content-title'
|
|
|
+ className='form-element-standard'
|
|
|
+ />
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
}
|
|
|
@@ -1260,7 +1265,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</div>
|
|
|
</div>
|
|
|
</Splitter.Panel>
|
|
|
- {appId && (<Splitter.Panel defaultSize="30%">
|
|
|
+ {appId && (<Splitter.Panel defaultSize="35%">
|
|
|
<Chat appId={appId} />
|
|
|
</Splitter.Panel>)}
|
|
|
</Splitter>
|