|
@@ -50,7 +50,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<InputNumber
|
|
<InputNumber
|
|
|
min={0}
|
|
min={0}
|
|
|
max={1}
|
|
max={1}
|
|
|
- style={{ margin: '0 16px', width: '100px' }}
|
|
|
|
|
|
|
+ className='form-input-number-small'
|
|
|
step={0.01}
|
|
step={0.01}
|
|
|
value={topPValue}
|
|
value={topPValue}
|
|
|
onChange={onChange}
|
|
onChange={onChange}
|
|
@@ -85,7 +85,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<InputNumber
|
|
<InputNumber
|
|
|
min={0}
|
|
min={0}
|
|
|
max={1}
|
|
max={1}
|
|
|
- style={{ margin: '0 16px', width: '100px' }}
|
|
|
|
|
|
|
+ className='form-input-number-small'
|
|
|
step={0.01}
|
|
step={0.01}
|
|
|
value={tempValue}
|
|
value={tempValue}
|
|
|
onChange={onChange}
|
|
onChange={onChange}
|
|
@@ -421,7 +421,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='name'
|
|
name='name'
|
|
|
rules={[{ required: true, message: '问答应用名称不能为空' }]}
|
|
rules={[{ required: true, message: '问答应用名称不能为空' }]}
|
|
|
>
|
|
>
|
|
|
- <Input placeholder="应用名称" style={{ width: 646, padding: 8 }} />
|
|
|
|
|
|
|
+ <Input placeholder="请输入问答应用名称" className='form-input-large' />
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
|
|
|
|
<FormItem
|
|
<FormItem
|
|
@@ -429,8 +429,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='typeId'
|
|
name='typeId'
|
|
|
>
|
|
>
|
|
|
<Select
|
|
<Select
|
|
|
- style={{ width: '300px', height: '48px' }}
|
|
|
|
|
- placeholder='请选应用类型'
|
|
|
|
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
|
|
+ placeholder='请选择问答应用类型'
|
|
|
onChange={handleAppChange}
|
|
onChange={handleAppChange}
|
|
|
allowClear={true}
|
|
allowClear={true}
|
|
|
>
|
|
>
|
|
@@ -452,7 +452,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
rules={[{ required: true, message: '项目类型不能为空' }]}
|
|
rules={[{ required: true, message: '项目类型不能为空' }]}
|
|
|
>
|
|
>
|
|
|
<Select
|
|
<Select
|
|
|
- style={{ width: '300px', height: '48px' }}
|
|
|
|
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
placeholder='请选择项目类型'
|
|
placeholder='请选择项目类型'
|
|
|
value={selectedAppProId}
|
|
value={selectedAppProId}
|
|
|
onChange={(value) => setSelectedAppProId(value)}
|
|
onChange={(value) => setSelectedAppProId(value)}
|
|
@@ -474,8 +474,8 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<TextArea
|
|
<TextArea
|
|
|
showCount
|
|
showCount
|
|
|
maxLength={500}
|
|
maxLength={500}
|
|
|
- placeholder="请输入描述"
|
|
|
|
|
- style={{ height: 120, resize: 'none', width: 646 }}
|
|
|
|
|
|
|
+ placeholder="请输入当前应用的描述"
|
|
|
|
|
+ className='form-textarea-large'
|
|
|
/>
|
|
/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
|
|
|
@@ -484,16 +484,16 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<div>
|
|
<div>
|
|
|
{
|
|
{
|
|
|
inputs.map(input => (
|
|
inputs.map(input => (
|
|
|
- <div key={input.id} style={{ paddingTop: '10px' }}>
|
|
|
|
|
|
|
+ <div key={input.id} className='padding-top-10'>
|
|
|
<label>问题 {input.id}</label>
|
|
<label>问题 {input.id}</label>
|
|
|
<Input
|
|
<Input
|
|
|
- style={{ width: 300, paddingTop: 8, marginLeft: 20 }}
|
|
|
|
|
|
|
+ className='question-input'
|
|
|
type="text"
|
|
type="text"
|
|
|
value={input.value}
|
|
value={input.value}
|
|
|
onChange={e => handleChange(input.id, e.target.value)}
|
|
onChange={e => handleChange(input.id, e.target.value)}
|
|
|
/>
|
|
/>
|
|
|
- <PlusCircleOutlined style={{ marginLeft: 20 }} onClick={addInput} />
|
|
|
|
|
- <MinusCircleOutlined style={{ marginLeft: 20 }} onClick={delInput} />
|
|
|
|
|
|
|
+ <PlusCircleOutlined className='question-icon' onClick={addInput} />
|
|
|
|
|
+ <MinusCircleOutlined className='question-icon' onClick={delInput} />
|
|
|
</div>
|
|
</div>
|
|
|
))}
|
|
))}
|
|
|
</div>
|
|
</div>
|
|
@@ -512,10 +512,10 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div style={{ display: step === 2 ? 'block' : 'none' }} className='questionAnswerInfo-content'>
|
|
<div style={{ display: step === 2 ? 'block' : 'none' }} className='questionAnswerInfo-content'>
|
|
|
- <div style={{ paddingBottom: '10px', display: 'flex', justifyContent: 'flex-end' }}>
|
|
|
|
|
|
|
+ <div className='flex-end padding-bottom-10'>
|
|
|
<div>
|
|
<div>
|
|
|
<Button
|
|
<Button
|
|
|
- style={{ background: '#f5f5f5' }}
|
|
|
|
|
|
|
+ className='btn-secondary'
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
setStep(1);
|
|
setStep(1);
|
|
|
}}
|
|
}}
|
|
@@ -622,14 +622,14 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</div>
|
|
</div>
|
|
|
<Splitter style={{ height: '100%', boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)' }}>
|
|
<Splitter style={{ height: '100%', boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)' }}>
|
|
|
<Splitter.Panel defaultSize="40%">
|
|
<Splitter.Panel defaultSize="40%">
|
|
|
- <div style={{ width: '100%', height: '100%' }}>
|
|
|
|
|
|
|
+ <div className='full-size'>
|
|
|
<h2>Prompt编写</h2>
|
|
<h2>Prompt编写</h2>
|
|
|
<div style={{ paddingTop: '20px' }}>
|
|
<div style={{ paddingTop: '20px' }}>
|
|
|
<TextArea
|
|
<TextArea
|
|
|
autoSize
|
|
autoSize
|
|
|
readOnly
|
|
readOnly
|
|
|
placeholder="编写Prompt过程中可以引入2项变量:{{知识}} 代表知识库中检索到的知识内容, {{用户}}代表用户输入的内容。您可以在编写Prompt过程中将变量拼接在合适的位置。插入:{{知识}} 插入:{{用户}}"
|
|
placeholder="编写Prompt过程中可以引入2项变量:{{知识}} 代表知识库中检索到的知识内容, {{用户}}代表用户输入的内容。您可以在编写Prompt过程中将变量拼接在合适的位置。插入:{{知识}} 插入:{{用户}}"
|
|
|
- style={{ width: '100%', height: '300px' }}
|
|
|
|
|
|
|
+ className='textarea-full-width textarea-fixed-height'
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<Divider plain></Divider>
|
|
<Divider plain></Divider>
|
|
@@ -667,16 +667,13 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
|
|
|
|
|
</Splitter.Panel>
|
|
</Splitter.Panel>
|
|
|
<Splitter.Panel defaultSize="60%">
|
|
<Splitter.Panel defaultSize="60%">
|
|
|
- <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', background: '#f5f5f5', width: '100%', height: '100%' }}>
|
|
|
|
|
- <div style={{ width: '50%', height: '100%' }}>
|
|
|
|
|
- <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', paddingTop: '50px', fontSize: '16px' }}>
|
|
|
|
|
|
|
+ <div className='flex-center-container'>
|
|
|
|
|
+ <div className='half-width'>
|
|
|
|
|
+ <div className='flex-center-top'>
|
|
|
欢迎使用 {name}
|
|
欢迎使用 {name}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div style={{
|
|
|
|
|
- display: 'flex', justifyContent: 'center', alignItems: 'center',
|
|
|
|
|
- paddingTop: '20px'
|
|
|
|
|
- }}>
|
|
|
|
|
|
|
+ <div className='flex-center padding-top-20'>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='引用知识库'
|
|
label='引用知识库'
|
|
|
name='knowledge_ids'
|
|
name='knowledge_ids'
|
|
@@ -685,7 +682,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
// mode='multiple'
|
|
// mode='multiple'
|
|
|
// maxCount={MAX_COUNT}
|
|
// maxCount={MAX_COUNT}
|
|
|
// suffixIcon={suffix}
|
|
// suffixIcon={suffix}
|
|
|
- style={{ width: '300px', height: '48px' }}
|
|
|
|
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
placeholder='请选择知识库'
|
|
placeholder='请选择知识库'
|
|
|
>
|
|
>
|
|
|
{
|
|
{
|
|
@@ -698,7 +695,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
</Select>
|
|
</Select>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style={{display: 'flex', justifyContent: 'center', alignItems: 'center'}}>
|
|
|
|
|
|
|
+ <div className='flex-center'>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='调用模型'
|
|
label='调用模型'
|
|
|
name="model"
|
|
name="model"
|
|
@@ -706,7 +703,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<Select
|
|
<Select
|
|
|
placeholder='请选择模型'
|
|
placeholder='请选择模型'
|
|
|
allowClear={true}
|
|
allowClear={true}
|
|
|
- style={{width: '300px', height: '48px'}}
|
|
|
|
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
onChange={(value) => {
|
|
onChange={(value) => {
|
|
|
if (value === 'Qwen3-30B') {
|
|
if (value === 'Qwen3-30B') {
|
|
|
setIsDeepThinkVisible(true);
|
|
setIsDeepThinkVisible(true);
|
|
@@ -721,26 +718,20 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
|
|
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style={{
|
|
|
|
|
- display: isDeepThinkVisible ? 'flex' : 'none',
|
|
|
|
|
- justifyContent: 'center',
|
|
|
|
|
- alignItems: 'center'
|
|
|
|
|
|
|
+ <div className='flex-center' style={{
|
|
|
|
|
+ display: isDeepThinkVisible ? 'flex' : 'none'
|
|
|
}}>
|
|
}}>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='深度思考'
|
|
label='深度思考'
|
|
|
name='isDeepThink'
|
|
name='isDeepThink'
|
|
|
rules={[{ required: true, message: '请选择是否深度思考' }]}>
|
|
rules={[{ required: true, message: '请选择是否深度思考' }]}>
|
|
|
- <Radio.Group buttonStyle="solid" style={{width: '300px'}}>
|
|
|
|
|
|
|
+ <Radio.Group buttonStyle="solid" className='form-control-width'>
|
|
|
<Radio.Button value='Y'>是</Radio.Button>
|
|
<Radio.Button value='Y'>是</Radio.Button>
|
|
|
<Radio.Button value='N'>否</Radio.Button>
|
|
<Radio.Button value='N'>否</Radio.Button>
|
|
|
</Radio.Group>
|
|
</Radio.Group>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style={{
|
|
|
|
|
- display: 'flex',
|
|
|
|
|
- justifyContent: 'center',
|
|
|
|
|
- alignItems: 'center'
|
|
|
|
|
- }}>
|
|
|
|
|
|
|
+ <div className='flex-center'>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='max token'
|
|
label='max token'
|
|
|
name='max_token'
|
|
name='max_token'
|
|
@@ -753,14 +744,10 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
!isVisible &&
|
|
!isVisible &&
|
|
|
- <div style={{
|
|
|
|
|
- display: 'flex',
|
|
|
|
|
- justifyContent: 'center',
|
|
|
|
|
- alignItems: 'center'
|
|
|
|
|
- }}>
|
|
|
|
|
|
|
+ <div className='flex-center'>
|
|
|
<a onClick={() => {
|
|
<a onClick={() => {
|
|
|
setIsVisible(!isVisible);
|
|
setIsVisible(!isVisible);
|
|
|
- }} className='questionAnswerInfo-content-title'>
|
|
|
|
|
|
|
+ }} className='link-more-settings'>
|
|
|
更多设置
|
|
更多设置
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
@@ -771,28 +758,20 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<div style={{display: isVisible ? 'block' : 'none', paddingTop: '20px'}}>
|
|
<div style={{display: isVisible ? 'block' : 'none', paddingTop: '20px'}}>
|
|
|
{isVisibleCus &&
|
|
{isVisibleCus &&
|
|
|
<Space style={{width: '100%'}} direction="vertical">
|
|
<Space style={{width: '100%'}} direction="vertical">
|
|
|
- <div style={{
|
|
|
|
|
- display: 'flex',
|
|
|
|
|
- justifyContent: 'center',
|
|
|
|
|
- alignItems: 'center'
|
|
|
|
|
- }}>
|
|
|
|
|
|
|
+ <div className='flex-center'>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='Top-p'
|
|
label='Top-p'
|
|
|
name='topP'
|
|
name='topP'
|
|
|
- style={{width: '300px'}}
|
|
|
|
|
|
|
+ className='form-control-width'
|
|
|
>
|
|
>
|
|
|
<TopPDecimalStep/>
|
|
<TopPDecimalStep/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style={{
|
|
|
|
|
- display: 'flex',
|
|
|
|
|
- justifyContent: 'center',
|
|
|
|
|
- alignItems: 'center'
|
|
|
|
|
- }}>
|
|
|
|
|
|
|
+ <div className='flex-center'>
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='Temperature'
|
|
label='Temperature'
|
|
|
name='temperature'
|
|
name='temperature'
|
|
|
- style={{width: '300px'}}
|
|
|
|
|
|
|
+ className='form-control-width'
|
|
|
>
|
|
>
|
|
|
<TempDecimalStep/>
|
|
<TempDecimalStep/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -810,7 +789,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='param_desc'
|
|
name='param_desc'
|
|
|
rules={[{required: true, message: '回答风格不能为空'}]}>
|
|
rules={[{required: true, message: '回答风格不能为空'}]}>
|
|
|
<Radio.Group buttonStyle="solid"
|
|
<Radio.Group buttonStyle="solid"
|
|
|
- className='questionAnswerInfo-content-title'>
|
|
|
|
|
|
|
+ className='form-control-width'>
|
|
|
<Radio.Button onClick={() => {
|
|
<Radio.Button onClick={() => {
|
|
|
handleRedioClick('strict')
|
|
handleRedioClick('strict')
|
|
|
}} value='strict'>严谨</Radio.Button>
|
|
}} value='strict'>严谨</Radio.Button>
|
|
@@ -839,7 +818,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
<FormItem
|
|
<FormItem
|
|
|
label='展示引用知识'
|
|
label='展示引用知识'
|
|
|
name='show_recall_result'
|
|
name='show_recall_result'
|
|
|
- className='questionAnswerInfo-content-title'>
|
|
|
|
|
|
|
+ className='form-control-width'>
|
|
|
<Switch onChange={onChangeShow}/>
|
|
<Switch onChange={onChangeShow}/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
|
</div>
|
|
</div>
|
|
@@ -869,7 +848,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
justifyContent: 'center',
|
|
justifyContent: 'center',
|
|
|
alignItems: 'center'
|
|
alignItems: 'center'
|
|
|
}}>
|
|
}}>
|
|
|
- <div className='questionAnswerInfo-content-title'>重排方式</div>
|
|
|
|
|
|
|
+ <div className='section-title'>重排方式</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style={{
|
|
<div style={{
|
|
|
display: 'flex',
|
|
display: 'flex',
|
|
@@ -880,7 +859,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
label='Rerank模型'
|
|
label='Rerank模型'
|
|
|
name='rerank_status'
|
|
name='rerank_status'
|
|
|
valuePropName='checked'
|
|
valuePropName='checked'
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
|
|
|
|
+ className='form-control-width'
|
|
|
>
|
|
>
|
|
|
<Switch onChange={onChangeModel}/>
|
|
<Switch onChange={onChangeModel}/>
|
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -896,7 +875,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='rerank_model_name'
|
|
name='rerank_model_name'
|
|
|
>
|
|
>
|
|
|
<Select
|
|
<Select
|
|
|
- style={{width: '300px', height: '48px'}}
|
|
|
|
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
placeholder='请选择模型'
|
|
placeholder='请选择模型'
|
|
|
// defaultValue={'rerank'}
|
|
// defaultValue={'rerank'}
|
|
|
>
|
|
>
|
|
@@ -915,7 +894,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
name='slice_config_type'
|
|
name='slice_config_type'
|
|
|
rules={[{required: true, message: '召回方式不能为空'}]}>
|
|
rules={[{required: true, message: '召回方式不能为空'}]}>
|
|
|
<Select
|
|
<Select
|
|
|
- style={{width: '300px', height: '48px'}}
|
|
|
|
|
|
|
+ className='questionAnswerInfo-content-title'
|
|
|
placeholder='请选择'
|
|
placeholder='请选择'
|
|
|
onChange={onChangeCount}>
|
|
onChange={onChangeCount}>
|
|
|
<Option value="fixed">手动设置</Option>
|
|
<Option value="fixed">手动设置</Option>
|
|
@@ -950,7 +929,7 @@ const QuestionAnswerInfo: React.FC = () => {
|
|
|
>
|
|
>
|
|
|
<TextArea
|
|
<TextArea
|
|
|
rows={4}
|
|
rows={4}
|
|
|
- className='questionAnswerInfo-content-title'
|
|
|
|
|
|
|
+ className='form-textarea-large'
|
|
|
placeholder="请输入内容"
|
|
placeholder="请输入内容"
|
|
|
/>
|
|
/>
|
|
|
</FormItem>
|
|
</FormItem>
|