From e358723baaf96276d727eb236cc620992feee324 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Tue, 9 Jul 2024 21:55:54 +0530 Subject: [PATCH] Fix image rendering and unique key for pending message? --- src/interface/web/app/chat/page.tsx | 2 +- src/interface/web/app/components/chatHistory/chatHistory.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface/web/app/chat/page.tsx b/src/interface/web/app/chat/page.tsx index 53fb2d91..4cfe1f5e 100644 --- a/src/interface/web/app/chat/page.tsx +++ b/src/interface/web/app/chat/page.tsx @@ -417,7 +417,7 @@ export default function Chat() { const contentType = chunk["content-type"]; if (contentType === "application/json") { try { - if (chunk.image && chunk.detail) { + if (chunk.image || chunk.detail) { let responseWithReference = handleImageResponse(chunk); console.log("Image response", responseWithReference); if (responseWithReference.response) currentMessage.rawResponse = responseWithReference.response; diff --git a/src/interface/web/app/components/chatHistory/chatHistory.tsx b/src/interface/web/app/components/chatHistory/chatHistory.tsx index 56f1f157..0dc39173 100644 --- a/src/interface/web/app/components/chatHistory/chatHistory.tsx +++ b/src/interface/web/app/components/chatHistory/chatHistory.tsx @@ -292,7 +292,7 @@ export default function ChatHistory(props: ChatHistoryProps) { { props.pendingMessage &&