fixed bug for chat context not work for chating with image

This commit is contained in:
RockYang
2024-11-12 18:23:27 +08:00
parent 9e8f1ed6bf
commit 97e81a7dcc
5 changed files with 18 additions and 21 deletions

View File

@@ -169,9 +169,9 @@
</el-button>
</el-tooltip>
<el-popover placement="right" :width="400" trigger="click" :visible="popoverVisible">
<el-popover placement="right" :width="400" trigger="click">
<template #reference>
<el-button type="primary" circle size="small" class="icon-btn" @click="popoverVisible = true">
<el-button type="primary" circle size="small" class="icon-btn">
<i class="iconfont icon-linggan"></i>
</el-button>
</template>
@@ -392,13 +392,11 @@ const uploadImg = (file) => {
}
const isGenerating = ref(false)
const popoverVisible = ref(false)
const metaPrompt = ref("")
const generatePrompt = (row) => {
if (metaPrompt.value === "") {
return showMessageError("请输入元提示词")
}
popoverVisible.value = false
isGenerating.value = true
httpPost("/api/prompt/meta", {prompt: metaPrompt.value}).then(res => {
row.content = res.data