From 232c7c7733c015b859db4666f6b0adf5cb2ae06b Mon Sep 17 00:00:00 2001 From: deep1401 <gandhi0869@gmail.com> Date: Fri, 31 Jan 2025 14:50:38 -0800 Subject: [PATCH] Remove commerical api key in name in evals name --- src/renderer/components/Experiment/Eval/Eval.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/Experiment/Eval/Eval.tsx b/src/renderer/components/Experiment/Eval/Eval.tsx index 8471e8b0..c146336d 100644 --- a/src/renderer/components/Experiment/Eval/Eval.tsx +++ b/src/renderer/components/Experiment/Eval/Eval.tsx @@ -103,10 +103,10 @@ export default function Eval({ isLoading: pluginsIsLoading, } = useSWR( experimentInfo?.id && - chatAPI.Endpoints.Experiment.ListScriptsOfType( - experimentInfo?.id, - 'evaluator' - ), + chatAPI.Endpoints.Experiment.ListScriptsOfType( + experimentInfo?.id, + 'evaluator' + ), fetcher ); @@ -138,7 +138,7 @@ export default function Eval({ method: 'POST', body: value, } - ).then(() => {}); + ).then(() => { }); } } @@ -232,8 +232,11 @@ export default function Eval({ /* The way evals are defined right now, they need a unique name. This is a hack until we have a better solution */ + /* Adding a hack to not store the commercial_api_key in the evaluation name if there is one */ + const formJsonCopy = { ...formJson } + delete formJsonCopy.commercial_api_key; const nameOfThisEvaluation = - selectedPlugin + '_' + JSON.stringify(formJson); + selectedPlugin + '_' + JSON.stringify(formJsonCopy); addEvaluation(selectedPlugin, nameOfThisEvaluation, formJson); setOpen(false); }} -- GitLab