🆕 控制页面新增设置AI模型

This commit is contained in:
李寻欢
2024-01-31 12:02:33 +08:00
parent 244bff5714
commit ea4262adf0
7 changed files with 99 additions and 8 deletions

View File

@@ -134,4 +134,25 @@ function getGroupUsers(groupId, groupName) {
// loading.style.display = "none"
groupNameTag.innerHTML = groupName
})
}
}
// AI模型变动
function aiModelChange(event, wxid) {
// 取出变动后的值
const modelStr = event.target.value;
console.log("AI模型变动: ", wxid, modelStr)
axios({
method: 'post',
url: '/api/ai/model',
data: {
wxid: wxid,
model: modelStr
}
}).then(function (response) {
console.log(`返回结果: ${JSON.stringify(response)}`);
alert(`${response.data}`)
}).catch(function (error) {
console.log(`错误信息: ${error}`);
alert("修改失败")
})
}