feat: enabled user to set default GPT model for chat

This commit is contained in:
RockYang
2023-08-04 14:25:54 +08:00
parent 3d6d46b30d
commit da806b9492
3 changed files with 15 additions and 4 deletions

View File

@@ -146,6 +146,8 @@ const exportChat = () => {
img {
width 30px
height 30px
border-radius: 10px;
padding: 1px
}
}
}

View File

@@ -308,6 +308,9 @@ onMounted(() => {
checkSession().then((user) => {
loginUser.value = user
isLogin.value = true
if (user.chat_config?.model !== '') {
model.value = user.chat_config.model
}
// 加载角色列表
httpGet(`/api/role/list?user_id=${user.id}`).then((res) => {
roles.value = res.data;