Skip to content

Commit

Permalink
fix: Fix new chat cannot load document_image
Browse files Browse the repository at this point in the history
--bug=1051402 --user=刘瑞斌 【github#2008】【应用编排】应用演示页面新建对话后再次上传文档,无法读取文档内容 https://www.tapd.cn/57709429/s/1648617
  • Loading branch information
liuruibin committed Jan 21, 2025
1 parent cc7990f commit 18d404c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/src/components/ai-chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ const openChatId: () => Promise<string> = () => {
/**
* 对话
*/
function getChartOpenId(chat?: any) {
function getChartOpenId(chat?: any, problem?: string, re_chat?: boolean, other_params_data?: any) {
return openChatId().then(() => {
chatMessage(chat)
chatMessage(chat, problem, re_chat, other_params_data)
})
}
Expand Down Expand Up @@ -278,6 +278,7 @@ const errorWrite = (chat: any, message?: string) => {
// 保存上传文件列表
function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_params_data?: any) {
console.log(other_params_data)
loading.value = true
if (!chat) {
chat = reactive({
Expand Down Expand Up @@ -317,7 +318,7 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_para
ChatManagement.write(chat.id)
}
if (!chartOpenId.value) {
getChartOpenId(chat).catch(() => {
getChartOpenId(chat, problem, re_chat, other_params_data).catch(() => {
errorWrite(chat)
})
} else {
Expand Down

0 comments on commit 18d404c

Please sign in to comment.