From c245790ef1e6861d9dd17664c90ec0fc1186ea28 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期五, 09 八月 2024 14:03:58 +0800
Subject: [PATCH] 菜单修改
---
src/views/dmx/IntelligentAgent/components/agentConfig.vue | 37 +++++++++++++++++++++++++------------
1 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/views/dmx/IntelligentAgent/components/agentConfig.vue b/src/views/dmx/IntelligentAgent/components/agentConfig.vue
index c05f1ef..c23aa64 100644
--- a/src/views/dmx/IntelligentAgent/components/agentConfig.vue
+++ b/src/views/dmx/IntelligentAgent/components/agentConfig.vue
@@ -32,7 +32,7 @@
>
<a-row class="">
<a-col :span="24">
- <a-tabs type="capsule" size="large" v-model="keyLarge" @tab-click="console.log(keyLarge)">
+ <a-tabs type="capsule" size="large" :active-key="activeKey" @change="handleTabChange">
<a-tab-pane key="1" title="鍔╃悊璁剧疆">
<a-divider style="margin-bottom: 20px;margin-top: 0" />
<div style="width: 100%;" :style="{height:height}">
@@ -220,33 +220,33 @@
</a-select>
</a-form-item>
<a-form-item label="娓╁害">
- <a-switch size="small" />
+ <a-switch size="small" v-model="temperature" />
<a-space direction="vertical" size="large">
- <a-slider v-model="form.llm_setting.temperature" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
+ <a-slider :disabled="!temperature" v-model="form.llm_setting.temperature" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
</a-space>
</a-form-item>
<a-form-item label="top P">
- <a-switch size="small" />
+ <a-switch size="small" v-model="top_p" />
<a-space direction="vertical" size="large">
- <a-slider v-model="form.llm_setting.top_p" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
+ <a-slider :disabled="!top_p" v-model="form.llm_setting.top_p" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
</a-space>
</a-form-item>
<a-form-item label="鍑哄腑澶勭綒">
- <a-switch size="small" />
+ <a-switch size="small" v-model="presence_penalty" />
<a-space direction="vertical" size="large">
- <a-slider v-model="form.llm_setting.presence_penalty" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
+ <a-slider :disabled="!presence_penalty" v-model="form.llm_setting.presence_penalty" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
</a-space>
</a-form-item>
<a-form-item label="棰戠巼澶勭綒">
- <a-switch size="small" />
+ <a-switch size="small" v-model="frequency_penalty" />
<a-space direction="vertical" size="large">
- <a-slider v-model="form.llm_setting.frequency_penalty" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
+ <a-slider :disabled="!frequency_penalty" v-model="form.llm_setting.frequency_penalty" :step="0.01" :min="0" :max="1" :style="{ width: '350px', marginLeft: '20px' }" show-input />
</a-space>
</a-form-item>
<a-form-item label="鏈�澶oken鏁�">
- <a-switch size="small" />
+ <a-switch size="small" v-model="max_tokens" />
<a-space direction="vertical" size="large">
- <a-slider v-model="form.llm_setting.max_tokens" :min="0" :max="2048" :style="{ width: '350px', marginLeft: '20px' }" show-input />
+ <a-slider :disabled="!max_tokens" v-model="form.llm_setting.max_tokens" :min="0" :max="2048" :style="{ width: '350px', marginLeft: '20px' }" show-input />
</a-space>
</a-form-item>
</a-form>
@@ -274,7 +274,7 @@
const formRef = ref();
const formRef1 = ref();
const formRef2 = ref();
-const keyLarge = ref('1');
+const activeKey = ref('1');
const form = reactive({
name: "",
icon: "",
@@ -309,6 +309,13 @@
rerank_id:'',
top_k:1024,
});
+let temperature = ref(true);
+let top_p = ref(true);
+let presence_penalty = ref(true);
+let frequency_penalty = ref(true);
+let max_tokens = ref(true);
+
+
const height = ref('calc(500px)');
const props = defineProps(['typeAngint', 'formData']);
const emit = defineEmits(['queryList']);
@@ -405,6 +412,7 @@
// post: '',// 宀椾綅
// txt: '',// 澶囨敞
// });
+ activeKey.value= '1'
formRef.value.resetFields();
formRef1.value.resetFields();
formRef2.value.resetFields();
@@ -495,6 +503,11 @@
}
+function handleTabChange(key) {
+ // 澶勭悊鏍囩鏀瑰彉浜嬩欢
+ console.log('Changed to tab:', key);
+ activeKey.value=key;
+}
const queryModel = async (params) => {
try {
--
Gitblit v1.8.0