瀏覽代碼

Prompt编写与参数配置

Ryuiso 5 月之前
父節點
當前提交
a1c00d1e22
共有 2 個文件被更改,包括 30 次插入13 次删除
  1. 13 4
      src/pages/deepseek/questionAnswer/info/index.tsx
  2. 17 9
      src/pages/deepseek/questionAnswer/info/style.less

+ 13 - 4
src/pages/deepseek/questionAnswer/info/index.tsx

@@ -5,9 +5,9 @@ import './style.less';
 import {
     Button, Input, Form, Divider, Splitter, Select, InputNumber, InputNumberProps,
     Radio, Switch, Row, Col, Slider, Space, RadioChangeEvent,
-    Spin, message, Typography
+    Spin, message, Typography, Tooltip
 } from 'antd';
-import { PlusCircleOutlined, MinusCircleOutlined, ArrowLeftOutlined } from '@ant-design/icons';
+import { PlusCircleOutlined, MinusCircleOutlined, ArrowLeftOutlined, InfoCircleOutlined } from '@ant-design/icons';
 import { apis } from '@/apis';
 import router from '@/router';
 import LocalStorage from '@/LocalStorage';
@@ -527,7 +527,7 @@ const QuestionAnswerInfo: React.FC = () => {
                     </div>
 
                     <div style={{ display: step === 2 ? 'block' : 'none' }} className='questionAnswerInfo-content'>
-                        <div className='flex-between'>
+                        <div className='flex-between padding-bottom-16'>
                             <div>
                                 <Button
                                     className='btn-back'
@@ -645,7 +645,16 @@ const QuestionAnswerInfo: React.FC = () => {
                                 )}
                             </div>
                         </div>
-                        <h3>Prompt编写</h3>
+                        <div className='section-title'>
+                            Prompt编写与参数配置
+                            <Tooltip 
+                                title="Prompt用于对大模型的回复做出一些列指令和约束。这段Prompt不会被用户看到。" 
+                                placement="right"
+                                overlayStyle={{ fontSize: '12px' }}
+                            >
+                                <InfoCircleOutlined style={{ marginLeft: '8px', color: '#999', fontSize: '14px' }} />
+                            </Tooltip>
+                        </div>
                         <Splitter style={{ border: '1px solid #f0f0f0', borderRadius: '6px' }}>
                             <Splitter.Panel defaultSize="65%">
                                 <div className='prompt'>

+ 17 - 9
src/pages/deepseek/questionAnswer/info/style.less

@@ -10,7 +10,7 @@
     width: 100%;
     height: 100%;
     background: #FFFFFF;
-    padding: 20px;
+    padding: 16px 20px;
     
     // 标题样式
     &-title {
@@ -221,14 +221,6 @@
   margin-left: 20px;
 }
 
-// 标题和链接样式
-.section-title {
-  font-size: 16px;
-  font-weight: 500;
-  color: #262626;
-  margin-bottom: 16px;
-}
-
 .link-more-settings {
   color: @primary-color;
   cursor: pointer;
@@ -239,6 +231,14 @@
   }
 }
 
+// 标题和链接样式
+.section-title {
+  font-size: 14px;
+  font-weight: 500;
+  color: #262626;
+  margin-bottom: 12px;
+}
+
 // Prompt编辑器布局样式
 .prompt {
   width: 100%;
@@ -335,6 +335,14 @@
     &-10 {
       padding-bottom: 10px;
     }
+
+    &-12 {
+      padding-bottom: 12px;
+    }
+
+    &-16 {
+      padding-bottom: 16px;
+    }
   }
 }