diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx
index 7a913b96277..1d568441719 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx
@@ -1,5 +1,5 @@
import React, { memo } from "react";
-import { Warning } from "@phosphor-icons/react";
+import { Info, Warning } from "@phosphor-icons/react";
import UserIcon from "../../../../UserIcon";
import Actions from "./Actions";
import renderMarkdown from "@/utils/chat/markdown";
@@ -16,6 +16,10 @@ import {
THOUGHT_REGEX_OPEN,
ThoughtChainComponent,
} from "../ThoughtContainer";
+import paths from "@/utils/paths";
+import { useTranslation } from "react-i18next";
+import { Link } from "react-router-dom";
+import { chatQueryRefusalResponse } from "@/utils/chat";
const HistoricalMessage = ({
uuid = v4(),
@@ -34,6 +38,7 @@ const HistoricalMessage = ({
metrics = {},
alignmentCls = "",
}) => {
+ const { t } = useTranslation();
const { isEditing } = useEditMessage({ chatId, role });
const { isDeleted, completeDelete, onEndAnimation } = useWatchDeleteMessage({
chatId,
@@ -45,6 +50,9 @@ const HistoricalMessage = ({
element.style.height = element.scrollHeight + "px";
};
+ const isRefusalMessage =
+ role === "assistant" && message === chatQueryRefusalResponse(workspace);
+
if (!!error) {
return (
+ {isRefusalMessage && (
+
+
+
+
+ {t("chat.refusal.tooltip-title")}
+
+
+
+ )}
)}
diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatTooltips/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatTooltips/index.jsx
index 97fc0c5c628..de1b1234525 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatTooltips/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatTooltips/index.jsx
@@ -72,6 +72,12 @@ export function ChatTooltips() {
delayShow={500}
className="tooltip !text-xs"
/>
+
>
);
diff --git a/frontend/src/locales/ar/common.js b/frontend/src/locales/ar/common.js
index 5ccb766bfc8..2e681b422e6 100644
--- a/frontend/src/locales/ar/common.js
+++ b/frontend/src/locales/ar/common.js
@@ -249,6 +249,8 @@ const TRANSLATIONS = {
query: "استعلام",
"desc-end":
"وضعٍية ترغب في إرجاع رفض آخر مناسب عندما لا يتم العثور على السياق.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "حرارة نموذج التعلم العميق",
diff --git a/frontend/src/locales/da/common.js b/frontend/src/locales/da/common.js
index 9c33feb8f4d..d57308b7cc1 100644
--- a/frontend/src/locales/da/common.js
+++ b/frontend/src/locales/da/common.js
@@ -250,6 +250,8 @@ const TRANSLATIONS = {
query: "forespørgsels-tilstand",
"desc-end":
"tilstand, kan du vælge at returnere et brugerdefineret afvisningssvar, når der ikke findes nogen kontekst.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM-temperatur",
diff --git a/frontend/src/locales/de/common.js b/frontend/src/locales/de/common.js
index 1751cd097c2..3a368216135 100644
--- a/frontend/src/locales/de/common.js
+++ b/frontend/src/locales/de/common.js
@@ -338,6 +338,8 @@ const TRANSLATIONS = {
query: "Abfrage",
"desc-end":
"modus, möchten Sie vielleicht eine benutzerdefinierte Ablehnungsantwort zurückgeben, wenn kein Kontext gefunden wird.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM-Temperatur",
diff --git a/frontend/src/locales/en/common.js b/frontend/src/locales/en/common.js
index 665a45a05d0..36845c37efd 100644
--- a/frontend/src/locales/en/common.js
+++ b/frontend/src/locales/en/common.js
@@ -348,6 +348,9 @@ const TRANSLATIONS = {
query: "query",
"desc-end":
"mode, you may want to return a custom refusal response when no context is found.",
+ "tooltip-title": "Why am I seeing this?",
+ "tooltip-description":
+ "You are in query mode, which only uses information from your documents. Switch to chat mode for more flexible conversations, or click here to visit our documentation to learn more about chat modes.",
},
temperature: {
title: "LLM Temperature",
diff --git a/frontend/src/locales/es/common.js b/frontend/src/locales/es/common.js
index 7a4b690a168..8439623d866 100644
--- a/frontend/src/locales/es/common.js
+++ b/frontend/src/locales/es/common.js
@@ -244,6 +244,8 @@ const TRANSLATIONS = {
query: "consulta",
"desc-end":
"modo, es posible que desees devolver una respuesta de rechazo personalizada cuando no se encuentre contexto.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "Temperatura de LLM",
diff --git a/frontend/src/locales/et/common.js b/frontend/src/locales/et/common.js
index 2bb8c3a7093..3c1781414f3 100644
--- a/frontend/src/locales/et/common.js
+++ b/frontend/src/locales/et/common.js
@@ -327,6 +327,8 @@ const TRANSLATIONS = {
query: "päringu",
"desc-end":
"režiimis, võib määrata kohandatud vastuse, kui konteksti ei leita.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM-i temperatuur",
diff --git a/frontend/src/locales/fa/common.js b/frontend/src/locales/fa/common.js
index 83610af9ff4..8615ef518f8 100644
--- a/frontend/src/locales/fa/common.js
+++ b/frontend/src/locales/fa/common.js
@@ -240,6 +240,8 @@ const TRANSLATIONS = {
query: "پرسوجو",
"desc-end":
"ممکن است بخواهید هنگامی که هیچ محتوایی یافت نمیشود، یک پاسخ رد سفارشی برگردانید.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "دمای LLM",
diff --git a/frontend/src/locales/fr/common.js b/frontend/src/locales/fr/common.js
index f5202619917..0cfee9192a7 100644
--- a/frontend/src/locales/fr/common.js
+++ b/frontend/src/locales/fr/common.js
@@ -245,6 +245,8 @@ const TRANSLATIONS = {
query: "requête",
"desc-end":
", vous pouvez souhaiter retourner une réponse de refus personnalisée lorsque aucun contexte n'est trouvé.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "Température LLM",
diff --git a/frontend/src/locales/he/common.js b/frontend/src/locales/he/common.js
index c680046fc45..83f9fb78f07 100644
--- a/frontend/src/locales/he/common.js
+++ b/frontend/src/locales/he/common.js
@@ -238,6 +238,8 @@ const TRANSLATIONS = {
query: "שאילתה",
"desc-end":
"אתה עשוי לרצות להחזיר תגובת סירוב מותאמת אישית כאשר לא נמצא הקשר.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "טמפרטורה של LLM",
diff --git a/frontend/src/locales/it/common.js b/frontend/src/locales/it/common.js
index f7a63d99736..26acc0eac7a 100644
--- a/frontend/src/locales/it/common.js
+++ b/frontend/src/locales/it/common.js
@@ -243,6 +243,8 @@ const TRANSLATIONS = {
query: "query",
"desc-end":
"è attiva, potresti voler restituire una risposta di rifiuto personalizzata quando non viene trovato alcun contesto.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "Temperatura LLM",
diff --git a/frontend/src/locales/ja/common.js b/frontend/src/locales/ja/common.js
index d7c1820c92b..e874a9c84d6 100644
--- a/frontend/src/locales/ja/common.js
+++ b/frontend/src/locales/ja/common.js
@@ -249,6 +249,8 @@ const TRANSLATIONS = {
query: "クエリ",
"desc-end":
"の場合、コンテキストが見つからないときにカスタム拒否応答を返すことができます。",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM温度",
diff --git a/frontend/src/locales/ko/common.js b/frontend/src/locales/ko/common.js
index 032c227bd0c..5b0cce45a28 100644
--- a/frontend/src/locales/ko/common.js
+++ b/frontend/src/locales/ko/common.js
@@ -237,6 +237,8 @@ const TRANSLATIONS = {
"desc-start": "쿼리 모드에서",
query: "응답에 사용할 수 있는",
"desc-end": "컨텍스트를 찾을 수 없을 때 거부 응답 내용을 작성합니다.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM 온도",
diff --git a/frontend/src/locales/lv/common.js b/frontend/src/locales/lv/common.js
index 863fa12eb21..1284ec832bc 100644
--- a/frontend/src/locales/lv/common.js
+++ b/frontend/src/locales/lv/common.js
@@ -334,6 +334,8 @@ const TRANSLATIONS = {
query: "vaicājuma",
"desc-end":
"režīmā, jūs varētu vēlēties atgriezt pielāgotu atteikuma atbildi, kad konteksts nav atrasts.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM Temperatūra",
diff --git a/frontend/src/locales/nl/common.js b/frontend/src/locales/nl/common.js
index bd7626e7929..7028d768e9a 100644
--- a/frontend/src/locales/nl/common.js
+++ b/frontend/src/locales/nl/common.js
@@ -242,6 +242,8 @@ const TRANSLATIONS = {
query: "query",
"desc-end":
"modus, wil je wellicht een aangepaste afwijzingsreactie geven wanneer er geen context wordt gevonden.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM Temperatuur",
diff --git a/frontend/src/locales/pt_BR/common.js b/frontend/src/locales/pt_BR/common.js
index c65a70b0619..ecc0d277106 100644
--- a/frontend/src/locales/pt_BR/common.js
+++ b/frontend/src/locales/pt_BR/common.js
@@ -331,6 +331,8 @@ const TRANSLATIONS = {
query: "consulta",
"desc-end":
"modo, você pode definir uma resposta personalizada quando nenhum contexto for encontrado.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "Temperatura do LLM",
diff --git a/frontend/src/locales/ru/common.js b/frontend/src/locales/ru/common.js
index 1a3f73a4376..440728d6e95 100644
--- a/frontend/src/locales/ru/common.js
+++ b/frontend/src/locales/ru/common.js
@@ -251,6 +251,8 @@ const TRANSLATIONS = {
query: "запроса",
"desc-end":
"вы можете вернуть пользовательский ответ об отказе, если контекст не найден.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "Температура LLM",
diff --git a/frontend/src/locales/tr/common.js b/frontend/src/locales/tr/common.js
index 22e5da9ae9c..9dc41367128 100644
--- a/frontend/src/locales/tr/common.js
+++ b/frontend/src/locales/tr/common.js
@@ -242,6 +242,8 @@ const TRANSLATIONS = {
query: "sorgu",
"desc-end":
"modunda bağlam bulunamazsa, özel bir ret yanıtı döndürmek isteyebilirsiniz.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM Sıcaklığı",
diff --git a/frontend/src/locales/vn/common.js b/frontend/src/locales/vn/common.js
index 06839550c30..889c121c1db 100644
--- a/frontend/src/locales/vn/common.js
+++ b/frontend/src/locales/vn/common.js
@@ -241,6 +241,8 @@ const TRANSLATIONS = {
query: "query",
"desc-end":
"mode, you may want to return a custom refusal response when no context is found.",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM Temperature",
diff --git a/frontend/src/locales/zh/common.js b/frontend/src/locales/zh/common.js
index acef3d9cb24..d453383b87e 100644
--- a/frontend/src/locales/zh/common.js
+++ b/frontend/src/locales/zh/common.js
@@ -320,6 +320,8 @@ const TRANSLATIONS = {
"desc-start": "当处于",
query: "查询",
"desc-end": "模式时,当未找到上下文时,你可能希望返回自定义拒绝响应。",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM 温度",
diff --git a/frontend/src/locales/zh_TW/common.js b/frontend/src/locales/zh_TW/common.js
index d94c62c2db4..74ad08b9af1 100644
--- a/frontend/src/locales/zh_TW/common.js
+++ b/frontend/src/locales/zh_TW/common.js
@@ -238,6 +238,8 @@ const TRANSLATIONS = {
"desc-start": "在",
query: "查詢",
"desc-end": "模式下,當找不到內容時,您可能需要傳回自訂的拒絕回應。",
+ "tooltip-title": null,
+ "tooltip-description": null,
},
temperature: {
title: "LLM 溫度值",
diff --git a/frontend/src/utils/paths.js b/frontend/src/utils/paths.js
index 1639e536cd3..f89be1e4755 100644
--- a/frontend/src/utils/paths.js
+++ b/frontend/src/utils/paths.js
@@ -58,6 +58,9 @@ export default {
docs: () => {
return "https://docs.anythingllm.com";
},
+ chatModes: () => {
+ return "https://docs.anythingllm.com/features/chat-modes";
+ },
mailToMintplex: () => {
return "mailto:team@mintplexlabs.com";
},