Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

FIX - Removed usage of eval components in the FE (#184)

Tahier Hussain29364aec7673
diff --git a/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx b/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx
index 434423853..27a4b83c6 100644
--- a/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx
+++ b/frontend/src/components/custom-tools/prompt-card/PromptCard.jsx
@@ -48,22 +48,12 @@ import { useExceptionHandler } from "../../../hooks/useExceptionHandler";
import { useSocketCustomToolStore } from "../../../store/socket-custom-tool";
import { TokenCount } from "../token-count/TokenCount";
-let EvalBtn = null;
-let EvalMetrics = null;
-let EvalModal = null;
-let getEvalMetrics = (param1, param2) => {
+const EvalBtn = null;
+const EvalMetrics = null;
+const EvalModal = null;
+const getEvalMetrics = (param1, param2) => {
return [];
};
-try {
- EvalBtn = require("../../../plugins/eval-btn/EvalBtn").EvalBtn;
- EvalMetrics =
- require("../../../plugins/eval-metrics/EvalMetrics").EvalMetrics;
- EvalModal = require("../../../plugins/eval-modal/EvalModal").EvalModal;
- getEvalMetrics =
- require("../../../plugins/eval-helper/EvalHelper").getEvalMetrics;
-} catch {
- // The components will remain null of it is not available
-}
function PromptCard({
promptDetails,
diff --git a/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx b/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx
index d6e6411b1..c46f2163a 100644
--- a/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx
+++ b/frontend/src/components/custom-tools/settings-modal/SettingsModal.jsx
@@ -18,13 +18,11 @@ import { PreAndPostAmbleModal } from "../pre-and-post-amble-modal/PreAndPostAmbl
import "./SettingsModal.css";
let SummarizeManager = null;
-let EvaluationManager = null;
+const EvaluationManager = null;
let ChallengeManager = null;
try {
SummarizeManager =
require("../../../plugins/summarize-manager/SummarizeManager").SummarizeManager;
- EvaluationManager =
- require("../../../plugins/evaluation-manager/EvaluationManager").EvaluationManager;
ChallengeManager =
require("../../../plugins/challenge-manager/ChallengeManager").ChallengeManager;
} catch {
@@ -62,16 +60,12 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {
),
};
- if (SummarizeManager && EvaluationManager && ChallengeManager) {
- // Add Summary Manager menu item to the existing list
+ let position = 1;
+ if (SummarizeManager) {
items.splice(
- 1,
+ position,
0,
- ...[
- getMenuItem("Summary Manager", 2, <FileTextOutlined />),
- getMenuItem("Evaluation Manager", 3, <FileTextOutlined />),
- getMenuItem("Challenge Manager", 4, <FileTextOutlined />),
- ]
+ getMenuItem("Summary Manager", 2, <FileTextOutlined />)
);
listOfComponents[2] = (
<SummarizeManager
@@ -79,9 +73,27 @@ function SettingsModal({ open, setOpen, handleUpdateTool }) {
handleUpdateTool={handleUpdateTool}
/>
);
+ position++;
+ }
+
+ if (EvaluationManager) {
+ items.splice(
+ position,
+ 0,
+ getMenuItem("Evaluation Manager", 3, <FileTextOutlined />)
+ );
listOfComponents[3] = (
<EvaluationManager handleUpdateTool={handleUpdateTool} />
);
+ position++;
+ }
+
+ if (ChallengeManager) {
+ items.splice(
+ position,
+ 0,
+ getMenuItem("Challenge Manager", 4, <FileTextOutlined />)
+ );
listOfComponents[4] = (
<ChallengeManager handleUpdateTool={handleUpdateTool} />
);