|
|
@@ -11,9 +11,7 @@
|
|
|
@ok="handleSave"
|
|
|
>
|
|
|
<div :class="prefixCls">
|
|
|
- <p class="llm-setting__tip">
|
|
|
- 配置保存到服务端 <code>qingjian/system/conf/llm.json</code>,AI 清洗模板匹配与文件 AI 识别共用,保存后立即生效。
|
|
|
- </p>
|
|
|
+ <p class="llm-setting__tip">AI 清洗模板匹配与文件 AI 识别共用此配置,保存后立即生效。</p>
|
|
|
|
|
|
<div v-if="loading" class="llm-setting__loading">
|
|
|
<Skeleton active :paragraph="{ rows: 6 }" />
|
|
|
@@ -104,16 +102,6 @@
|
|
|
<div v-if="errors.timeoutSeconds" class="llm-setting__error">{{ errors.timeoutSeconds }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="llm-setting__item llm-setting__switch">
|
|
|
- <div class="llm-setting__switch-main">
|
|
|
- <div class="llm-setting__label">思考模式</div>
|
|
|
- <div class="llm-setting__hint">
|
|
|
- 开启后推理模型会先输出 reasoning;关闭可避免 reasoning 占满输出 Token 导致正文为空。
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <Switch v-model:checked="form.enableThinking" />
|
|
|
- </div>
|
|
|
</template>
|
|
|
</div>
|
|
|
</BasicModal>
|
|
|
@@ -121,7 +109,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { reactive, ref, unref, watch } from 'vue';
|
|
|
- import { Input, InputNumber, Skeleton, Switch, Tooltip } from 'ant-design-vue';
|
|
|
+ import { Input, InputNumber, Skeleton, Tooltip } from 'ant-design-vue';
|
|
|
import { QuestionCircleOutlined } from '@ant-design/icons-vue';
|
|
|
import { BasicModal, useModalInner } from '@/core/components/Modal';
|
|
|
import { useDesign } from '@/core/hooks/web/useDesign';
|
|
|
@@ -143,7 +131,6 @@
|
|
|
temperature?: number;
|
|
|
maxTokens?: number;
|
|
|
timeoutSeconds?: number;
|
|
|
- enableThinking: boolean;
|
|
|
}
|
|
|
|
|
|
const form = reactive<LlmConfigForm>({
|
|
|
@@ -153,7 +140,6 @@
|
|
|
temperature: 0,
|
|
|
maxTokens: 8192,
|
|
|
timeoutSeconds: 180,
|
|
|
- enableThinking: false,
|
|
|
});
|
|
|
|
|
|
const errors = reactive({
|
|
|
@@ -183,7 +169,6 @@
|
|
|
form.temperature = config?.temperature ?? 0;
|
|
|
form.maxTokens = config?.maxTokens ?? 8192;
|
|
|
form.timeoutSeconds = config?.timeoutSeconds ?? 180;
|
|
|
- form.enableThinking = !!config?.enableThinking;
|
|
|
}
|
|
|
|
|
|
async function loadConfig() {
|
|
|
@@ -239,7 +224,6 @@
|
|
|
temperature: Number(form.temperature ?? 0),
|
|
|
maxTokens: Number(form.maxTokens ?? 8192),
|
|
|
timeoutSeconds: Number(form.timeoutSeconds ?? 180),
|
|
|
- enableThinking: form.enableThinking,
|
|
|
};
|
|
|
|
|
|
saving.value = true;
|
|
|
@@ -299,12 +283,6 @@
|
|
|
font-size: 13px;
|
|
|
line-height: 1.7;
|
|
|
color: #6b7280;
|
|
|
-
|
|
|
- code {
|
|
|
- padding: 0 4px;
|
|
|
- background: #f3f4f6;
|
|
|
- border-radius: 4px;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.llm-setting__row {
|
|
|
@@ -357,29 +335,6 @@
|
|
|
color: #cf1322;
|
|
|
}
|
|
|
|
|
|
- .llm-setting__switch {
|
|
|
- flex-direction: row;
|
|
|
- gap: 12px;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- padding: 10px 12px;
|
|
|
- background: #f8fafc;
|
|
|
- border: 1px solid #e5e7eb;
|
|
|
- border-radius: 8px;
|
|
|
- }
|
|
|
-
|
|
|
- .llm-setting__switch-main {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- gap: 2px;
|
|
|
- }
|
|
|
-
|
|
|
- .llm-setting__hint {
|
|
|
- font-size: 12px;
|
|
|
- line-height: 1.6;
|
|
|
- color: #9ca3af;
|
|
|
- }
|
|
|
-
|
|
|
@media screen and (max-width: 640px) {
|
|
|
.llm-setting__row,
|
|
|
.llm-setting__row--three {
|