Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat: move evals to own main menu (#1734)

Max Deichmann817554f1c9f1
diff --git a/web/src/components/Slider.tsx b/web/src/components/Slider.tsx
new file mode 100644
index 0000000000..e599e3f8d6
--- /dev/null
+++ b/web/src/components/Slider.tsx
@@ -0,0 +1,33 @@
+import * as React from "react";
+import { Switch } from "@headlessui/react";
+import { cn } from "@/src/utils/tailwind";
+
+export const Slider = (props: {
+ disabled: boolean; // whether the slider is clickable in the UI
+ loading?: boolean;
+ onChecked?: (checked: boolean) => void;
+ isChecked?: boolean; // whether the slider is active
+}) => {
+ console.log("props", props);
+
+ return (
+ <Switch
+ checked={props.isChecked}
+ disabled={props.loading || props.disabled}
+ onChange={props.onChecked}
+ className={cn(
+ props.isChecked ? "bg-black" : "bg-gray-200",
+ "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2",
+ )}
+ >
+ <span className="sr-only">Use setting</span>
+ <span
+ aria-hidden="true"
+ className={cn(
+ props.isChecked ? "translate-x-5" : "translate-x-0",
+ "pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",
+ )}
+ />
+ </Switch>
+ );
+};
diff --git a/web/src/components/layouts/routes.ts b/web/src/components/layouts/routes.ts
index 7369d4db3b..58b16b8bf5 100644
--- a/web/src/components/layouts/routes.ts
+++ b/web/src/components/layouts/routes.ts
@@ -11,6 +11,7 @@ import {
PenSquareIcon,
LibraryBig,
TerminalIcon,
+ Lightbulb,
} from "lucide-react";
export type Route = {
@@ -56,6 +57,14 @@ export const ROUTES: Route[] = [
name: "Models",
pathname: `/project/[projectId]/models`,
},
+ ],
+ },
+ {
+ name: "Evaluation",
+ icon: Lightbulb,
+ cloudOnly: true,
+ featureFlag: "evals",
+ children: [
{
name: "Templates",
pathname: `/project/[projectId]/evals/templates`,