提交 ae981e76 作者: 毛细亚

优化AI聊天组件上下文清除功能

上级 1e78ce8c
......@@ -213,6 +213,7 @@ export default {
this.getWelcomeMsg()
console.log(this.chatUserInfo, 'this.chatUserInfo')
this.initanswerItem()
this.clearContext(false)
},
methods: {
async getWelcomeMsg() {
......@@ -241,18 +242,21 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
const res = await corp_beta_question_session_clearTag()
if (res.status_code === 1) {
this.$message.success('清除上下文成功')
}
} catch (error) {
this.$message.error('清除上下文失败')
}
this.clearContext(true)
}).catch(() => {
this.$message.info('取消清除上下文')
})
},
async clearContext(showMsg) {
try {
const res = await corp_beta_question_session_clearTag()
if (res.status_code === 1) {
showMsg ? this.$message.success('清除上下文成功') : ''
}
} catch (error) {
showMsg ? this.$message.error('清除上下文失败') : ''
}
},
async getAiArgenInfo() {
const res = await corp_beta_question_config({
user: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论