diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index ac0def17f9..695e7e7b56 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -464,6 +464,9 @@ annotation: { ...(message?.annotation ?? {}), ...(rating !== null ? { rating: rating } : {}), + ...(rating !== null && rating !== message?.annotation?.rating + ? { reason: null, details: null } + : {}), ...(details ? details : {}) } }; @@ -1610,15 +1613,17 @@ {#if message.done && showRateComment} - { - await feedbackHandler(null, { - ...e.detail - }); - }} - /> + {#key message?.annotation?.rating} + { + await feedbackHandler(null, { + ...e.detail + }); + }} + /> + {/key} {/if} {#if (isLastMessage || ($settings?.keepFollowUpPrompts ?? false)) && message.done && !readOnly && (message?.followUps ?? []).length > 0}