-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -74,12 +48,7 @@ import {ElMessage} from "element-plus";
const title = ref('聊天设置')
const form = ref({
chat_config: {
- model: '',
- max_tokens: 0,
- enable_context: false,
- enable_history: false,
- temperature: false,
- api_key: ''
+ api_keys: {OpenAI: "", Azure: "", ChatGLM: ""}
}
})
const showPicker = ref(false)
@@ -89,6 +58,7 @@ onMounted(() => {
// 获取最新用户信息
httpGet('/api/user/profile').then(res => {
form.value = res.data
+ form.value.chat_config.api_keys = res.data.chat_config.api_keys ?? {OpenAI: "", Azure: "", ChatGLM: ""}
}).catch(() => {
showFailToast('获取用户信息失败')
});
@@ -119,10 +89,15 @@ const save = () => {
-