1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3460,5243],{4995:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(22222).A)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},5157:(e,t,a)=>{"use strict";a.d(t,{q:()=>c});var r=a(73154),s=a(11021),l=a(53524),n=a(82145);let o=()=>{var e;let t="".concat(null!=(e=n._.NEXT_PUBLIC_BASE_PATH)?e:"","/assets/ragas-logo.png");return(0,r.jsx)("div",{className:"flex items-center","data-sentry-component":"RagasLogoIcon","data-sentry-source-file":"ragas-logo.tsx",children:(0,r.jsx)("img",{src:t,alt:"Ragas Logo",width:12,height:12})})};var i=a(21520);function d(e){let{maintainer:t}=e;return t.includes("Ragas")?(0,r.jsx)(o,{}):t.includes("Langfuse")?(0,r.jsx)(s.h,{size:16}):(0,r.jsx)(i.A,{className:"h-4 w-4"})}function c(e){let{maintainer:t}=e;return(0,r.jsxs)(l.m_,{"data-sentry-element":"Tooltip","data-sentry-component":"MaintainerTooltip","data-sentry-source-file":"maintainer-tooltip.tsx",children:[(0,r.jsx)(l.k$,{"data-sentry-element":"TooltipTrigger","data-sentry-source-file":"maintainer-tooltip.tsx",children:(0,r.jsx)(d,{maintainer:t,"data-sentry-element":"MaintainerIcon","data-sentry-source-file":"maintainer-tooltip.tsx"})}),(0,r.jsx)(l.ZI,{"data-sentry-element":"TooltipContent","data-sentry-source-file":"maintainer-tooltip.tsx",children:t})]})}},5746:(e,t,a)=>{"use strict";a.d(t,{B8:()=>A,UC:()=>R,bL:()=>T,l9:()=>_});var r=a(96810),s=a(29950),l=a(80111),n=a(43166),o=a(7737),i=a(99297),d=a(94570),c=a(11810),u=a(12566),m=a(73154),x="Tabs",[p,h]=(0,l.A)(x,[n.RG]),f=(0,n.RG)(),[v,j]=p(x),g=r.forwardRef((e,t)=>{let{__scopeTabs:a,value:r,onValueChange:s,defaultValue:l,orientation:n="horizontal",dir:o,activationMode:p="automatic",...h}=e,f=(0,d.jH)(o),[j,g]=(0,c.i)({prop:r,onChange:s,defaultProp:l??"",caller:x});return(0,m.jsx)(v,{scope:a,baseId:(0,u.B)(),value:j,onValueChange:g,orientation:n,dir:f,activationMode:p,children:(0,m.jsx)(i.sG.div,{dir:f,"data-orientation":n,...h,ref:t})})});g.displayName=x;var y="TabsList",w=r.forwardRef((e,t)=>{let{__scopeTabs:a,loop:r=!0,...s}=e,l=j(y,a),o=f(a);return(0,m.jsx)(n.bL,{asChild:!0,...o,orientation:l.orientation,dir:l.dir,loop:r,children:(0,m.jsx)(i.sG.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:t})})});w.displayName=y;var b="TabsTrigger",N=r.forwardRef((e,t)=>{let{__scopeTabs:a,value:r,disabled:l=!1,...o}=e,d=j(b,a),c=f(a),u=E(d.baseId,r),x=I(d.baseId,r),p=r===d.value;return(0,m.jsx)(n.q7,{asChild:!0,...c,focusable:!l,active:p,children:(0,m.jsx)(i.sG.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":x,"data-state":p?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:u,...o,ref:t,onMouseDown:(0,s.mK)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(r)}),onKeyDown:(0,s.mK)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(r)}),onFocus:(0,s.mK)(e.onFocus,()=>{let e="manual"!==d.activationMode;p||l||!e||d.onValueChange(r)})})})});N.displayName=b;var C="TabsContent",k=r.forwardRef((e,t)=>{let{__scopeTabs:a,value:s,forceMount:l,children:n,...d}=e,c=j(C,a),u=E(c.baseId,s),x=I(c.baseId,s),p=s===c.value,h=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(o.C,{present:l||p,children:({present:a})=>(0,m.jsx)(i.sG.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!a,id:x,tabIndex:0,...d,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:a&&n})})});function E(e,t){return`${e}-trigger-${t}`}function I(e,t){return`${e}-content-${t}`}k.displayName=C;var T=g,A=w,_=N,R=k},12953:(e,t,a)=>{"use strict";a.d(t,{C1:()=>N,bL:()=>w});var r=a(96810),s=a(92905),l=a(80111),n=a(29950),o=a(11810),i=a(41434),d=a(7954),c=a(7737),u=a(99297),m=a(73154),x="Checkbox",[p,h]=(0,l.A)(x),[f,v]=p(x);function j(e){let{__scopeCheckbox:t,checked:a,children:s,defaultChecked:l,disabled:n,form:i,name:d,onCheckedChange:c,required:u,value:p="on",internal_do_not_use_render:h}=e,[v,j]=(0,o.i)({prop:a,defaultProp:l??!1,onChange:c,caller:x}),[g,y]=r.useState(null),[w,b]=r.useState(null),N=r.useRef(!1),C=!g||!!i||!!g.closest("form"),k={checked:v,disabled:n,setChecked:j,control:g,setControl:y,name:d,form:i,value:p,hasConsumerStoppedPropagationRef:N,required:u,defaultChecked:!E(l)&&l,is
1FormControl:C,bubbleInput:w,setBubbleInput:b};return(0,m.jsx)(f,{scope:t,...k,children:"function"==typeof h?h(k):s})}var g="CheckboxTrigger",y=r.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:a,...l},o)=>{let{control:i,value:d,disabled:c,checked:x,required:p,setControl:h,setChecked:f,hasConsumerStoppedPropagationRef:j,isFormControl:y,bubbleInput:w}=v(g,e),b=(0,s.s)(o,h),N=r.useRef(x);return r.useEffect(()=>{let e=i?.form;if(e){let t=()=>f(N.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[i,f]),(0,m.jsx)(u.sG.button,{type:"button",role:"checkbox","aria-checked":E(x)?"mixed":x,"aria-required":p,"data-state":I(x),"data-disabled":c?"":void 0,disabled:c,value:d,...l,ref:b,onKeyDown:(0,n.mK)(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,n.mK)(a,e=>{f(e=>!!E(e)||!e),w&&y&&(j.current=e.isPropagationStopped(),j.current||e.stopPropagation())})})});y.displayName=g;var w=r.forwardRef((e,t)=>{let{__scopeCheckbox:a,name:r,checked:s,defaultChecked:l,required:n,disabled:o,value:i,onCheckedChange:d,form:c,...u}=e;return(0,m.jsx)(j,{__scopeCheckbox:a,checked:s,defaultChecked:l,disabled:o,required:n,onCheckedChange:d,name:r,form:c,value:i,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(y,{...u,ref:t,__scopeCheckbox:a}),e&&(0,m.jsx)(k,{__scopeCheckbox:a})]})})});w.displayName=x;var b="CheckboxIndicator",N=r.forwardRef((e,t)=>{let{__scopeCheckbox:a,forceMount:r,...s}=e,l=v(b,a);return(0,m.jsx)(c.C,{present:r||E(l.checked)||!0===l.checked,children:(0,m.jsx)(u.sG.span,{"data-state":I(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});N.displayName=b;var C="CheckboxBubbleInput",k=r.forwardRef(({__scopeCheckbox:e,...t},a)=>{let{control:l,hasConsumerStoppedPropagationRef:n,checked:o,defaultChecked:c,required:x,disabled:p,name:h,value:f,form:j,bubbleInput:g,setBubbleInput:y}=v(C,e),w=(0,s.s)(a,y),b=(0,i.Z)(o),N=(0,d.X)(l);r.useEffect(()=>{if(!g)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!n.current;if(b!==o&&e){let a=new Event("click",{bubbles:t});g.indeterminate=E(o),e.call(g,!E(o)&&o),g.dispatchEvent(a)}},[g,b,o,n]);let k=r.useRef(!E(o)&&o);return(0,m.jsx)(u.sG.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??k.current,required:x,disabled:p,name:h,value:f,form:j,...t,tabIndex:-1,ref:w,style:{...t.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function E(e){return"indeterminate"===e}function I(e){return E(e)?"indeterminate":e?"checked":"unchecked"}k.displayName=C},21520:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(22222).A)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},33362:(e,t,a)=>{"use strict";a.d(t,{G:()=>o});var r=a(73154),s=a(61871),l=a(75755),n=a(84750);let o=e=>{var t,a,o,i,d;let c=(0,l.o)(e.projectId),u=null!=(o=null==(t=e.existingEvaluator)?void 0:t.evalTemplate)?o:e.evalTemplates.find(t=>t.id===e.templateId);return u?(0,r.jsx)(r.Fragment,{children:c.isLoading?(0,r.jsx)(n.E,{className:"h-[30dvh] w-full"}):(0,r.jsx)(s.W,{projectId:e.projectId,disabled:e.disabled,existingEvaluator:e.existingEvaluator,evalTemplate:null!=(i=null==(a=e.existingEvaluator)?void 0:a.evalTemplate)?i:u,onFormSuccess:e.onFormSuccess,shouldWrapVariables:e.shouldWrapVariables,hideTargetSection:e.hideTargetSection,hideTargetSelection:e.hideTargetSelection,mode:e.mode,preventRedirect:null==(d=e.preventRedirect)||d,preprocessFormValues:e.preprocessFormValues,useDialog:e.useDialog,evalCapabilities:c,defaultRunOnLive:e.defaultRunOnLive,hidePreviewTable:e.hidePreviewTable})}):null}},40263:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>T});var r=a(73154),s=a(26159),l=a(60520),n=a(92273),o=a(81509),i=a(39156),d=a(96810),c=a(93367),u=a(14183),m=a(86843),x=a(65295),p=a(58459),h=a(64656),f=a(62583),v=a(25277),j=a(51776);function g(e){let{projectId:t}=e;return(0,r.jsx)(v.Zp,{className:"mt-2 border-dark-yellow bg-light-yellow","data-sentry-element":"Card","data-sentry-component":"SetupDefaultEvalModelCard","data-sentry-source-file":"set-up-default-eval-model-card.tsx",children:(0,r.jsxs)(v.Wu,{className:"mt-2 flex flex-col gap-1","data-sentry-element":"CardContent","data-sentry-source-file":"set-up-default-eval-model-card.tsx",children:[(0,r.jsx)(j.k,{projectId:t,setUpMessage:"Set up default evaluation model to use this evaluator",variant:"color-coded","data-sentry-element":"ManageDefaultEvalModel","data-sentry-source-file":"set-up-default-eval-model-card.tsx"}),(0,r.jsx)("p",{className:"text-xs text-dark-yellow/70",children:"This evaluator expects to use the default evaluation model for your project."})]})})}
1var y=a(84750);function w(e){var t,a;let{projectId:s}=e,l=(0,i.useRouter)(),[n,o]=(0,d.useState)(!1),{isSelectionValid:j,selectedTemplate:w,setSelectedTemplate:b}=function(e){let{projectId:t,onValidSelection:a}=e,[r,s]=(0,d.useState)(null),[l,n]=(0,d.useState)(!0),o=c.FH.defaultLlmModel.fetchDefaultModel.useQuery({projectId:t});return(0,d.useEffect)(()=>{if(r){var e,t;if(!(r.provider||(null==(e=o.data)?void 0:e.provider))||!(r.model||(null==(t=o.data)?void 0:t.model)))return void n(!1);n(!0),null==a||a(r)}},[null==r?void 0:r.id,a]),{isSelectionValid:l,selectedTemplate:r,setSelectedTemplate:s}}({projectId:s,onValidSelection:e=>{l.push("/project/".concat(s,"/evals/new?evaluator=").concat(e.id))}}),N=c.FH.evals.allTemplates.useQuery({projectId:s},{enabled:!!s}),C=c.FH.useUtils();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v.Zp,{className:"grid max-h-[90vh] grid-rows-[auto_1fr_auto] overflow-hidden p-3","data-sentry-element":"Card","data-sentry-source-file":"select-evaluator-list.tsx",children:[(0,r.jsx)("div",{className:"flex flex-col overflow-hidden",children:N.isLoading?(0,r.jsx)(y.E,{className:"h-full w-full"}):N.isError?(0,r.jsxs)("div",{className:"py-8 text-center text-destructive",children:["Error: ",N.error.message]}):(null==(t=N.data)?void 0:t.templates.length)===0?(0,r.jsx)("div",{className:"py-8 text-center text-muted-foreground",children:"No evaluators found. Create a new evaluator to get started."}):(0,r.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,r.jsx)(p.B,{projectId:s,evalTemplates:(null==(a=N.data)?void 0:a.templates)||[],selectedTemplateId:(null==w?void 0:w.id)||void 0,onTemplateSelect:e=>(e=>{var t;let a=null==(t=N.data)?void 0:t.templates.find(t=>t.id===e);a&&b(a)})(e)})})}),!j&&(0,r.jsx)("div",{className:"px-4",children:(0,r.jsx)(g,{projectId:s})})]}),(0,r.jsx)("div",{className:"mt-2 flex flex-row justify-end",children:(0,r.jsx)("div",{className:"flex justify-end gap-2",children:(0,r.jsxs)(m.$,{onClick:()=>{o(!0)},"data-sentry-element":"Button","data-sentry-source-file":"select-evaluator-list.tsx",children:[(0,r.jsx)(x.A,{className:"mr-2 h-4 w-4","data-sentry-element":"PlusIcon","data-sentry-source-file":"select-evaluator-list.tsx"}),"Create Custom Evaluator"]})})}),(0,r.jsx)(u.lG,{open:n,onOpenChange:o,"data-sentry-element":"Dialog","data-sentry-source-file":"select-evaluator-list.tsx",children:(0,r.jsxs)(u.Cf,{className:"max-h-[90vh] max-w-screen-md overflow-y-auto","data-sentry-element":"DialogContent","data-sentry-source-file":"select-evaluator-list.tsx",children:[(0,r.jsx)(u.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"select-evaluator-list.tsx",children:(0,r.jsx)(u.L3,{"data-sentry-element":"DialogTitle","data-sentry-source-file":"select-evaluator-list.tsx",children:"Create new evaluator"})}),(0,r.jsx)(h.h,{projectId:s,preventRedirect:!0,isEditing:!0,useDialog:!0,onFormSuccess:e=>{o(!1),C.evals.allTemplates.invalidate(),e&&b(e),(0,f.G)({title:"Evaluator created successfully",description:"You can now use this evaluator."})},"data-sentry-element":"EvalTemplateForm","data-sentry-source-file":"select-evaluator-list.tsx"})]})})]})}var b=a(33362);function N(e){let{projectId:t,evaluatorId:a,evalTemplates:s}=e;return(0,r.jsx)(v.Zp,{className:"grid max-h-[90vh] overflow-y-auto p-3","data-sentry-element":"Card","data-sentry-component":"RunEvaluatorForm","data-sentry-source-file":"run-evaluator-form.tsx",children:(0,r.jsx)(b.G,{projectId:t,evalTemplates:s,templateId:a,preventRedirect:!1,useDialog:!1,"data-sentry-element":"EvaluatorForm","data-sentry-source-file":"run-evaluator-form.tsx"})})}var C=a(18799),k=a(4672),E=a(5157),I=a(70890);function T(){var e,t,a;let d=(0,i.useRouter)(),u=d.query.projectId,m=d.query.evaluator,x=(0,C.lp)({projectId:u,scope:"evalDefaultModel:read"}),{data:p}=c.FH.defaultLlmModel.fetchDefaultModel.useQuery({projectId:u},{enabled:x&&!!u}),h=!!p,f=h?m?2:1:0,v=(0,C.lp)({projectId:u,scope:"evalTemplate:CUD"}),g=c.FH.evals.allTemplates.useQuery({projectId:u,limit:500,page:0},{enabled:v}),y=null==(e=g.data)?void 0:e.templates.find(e=>e.id===m);return v?(0,r.jsxs)(s.A,{withPadding:!0,headerProps:{title:"Set up evaluator",breadcrumb:[{name:"Running Evaluators",href:"/project/".concat(u,"/evals")}],actionButtonsRight:(0,r.jsx)(j.k,{projectId:u})},"data-sentry-element":"Page","data-sentry-component":"NewEvaluatorPage","data-sentry-source-file":"new-evaluator.tsx",children:[(0,r.jsx)(l.Qp,{className:"mb-3","data-sentry-element":"Breadcrumb","data-sentry-source-file":"new-evaluator.tsx",children:(0,r.jsxs)(l.AB,{"data-sentry-element":"BreadcrumbList","data-sentry-source-file":"new-evaluator.tsx",children:[!h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.J5,{children:(0,r.jsxs)(l.tJ,{className:(0,o.cn)(0!==f?"text-muted-foreground":"font-semibold text-foreground"),children:["0. Set up default model",f>0&&(0,r.jsx)(n.A,{className:"ml-1 inline-block h-3 w-3"})]})}),(0,r.jsx)(l.tH,{})]}),(0,r.jsx)(l.J5,{className:"hover:cursor-pointer",onClick:()=>d.push("/project/".concat(u,"/evals/new")),"data-sentry-element":"BreadcrumbItem","data-sentry-source-file":"new-evaluator.tsx",children:(0,r.jsxs)(l.tJ,{className:(0,o.cn)(1!==f?"text-muted-foreground":"font-semibold text-foreground"),"data-sentry-element":"BreadcrumbPage","data-sentry-source-file":"new-evaluator.tsx",children:["1. Select Evaluator",f>1&&(0,r.jsx)(n.A,{className:"ml-1 inline-block h-3 w-3"})]})}),(0,r.jsx)(l.tH,{"data-sentry-element":"BreadcrumbSeparator","data-sentry-source-file":"new-evaluator.tsx"}),(0,r.jsx)(l.J5,{"data-sentry-element":"BreadcrumbItem","data-sentry-source-file":"new-evaluator.tsx",children:(0,r.jsx)(l.tJ,{className:(0,o.cn)(2!==f?"text-muted-foreground":"font-semibold text-foreground"),"data-sentry-element":"BreadcrumbPage","data-sentry-source-file":"new-evaluator.tsx",children:(0,r.jsxs)("div",{className:"flex flex-row",children:["2. Run Evaluator",y&&(0,r.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,r.jsx)("span",{children:y.name?": ".concat(y.name):""}),(0,r.jsx)(E.q,{maintainer:(0,k.Lb)(y)})]})]})})})]})}),0===f&&u&&(0,r.jsx)(I.c,{projectId:u}),1===f&&u&&(0,r.jsx)(w,{projectId:u}),2===f&&m&&u&&(0,r.jsx)(N,{projectId:u,evaluatorId:m,evalTemplates:null!=(a=null==(t=g.data)?void 0:t.templates)?a:[]})]}):(0,r.jsx)("div",{children:"You do not have access to this page."})}},58459:(e,t,a)=>{"use strict";a.d(t,{B:()=>f});var r=a(73154),s=a(36932),l=a(72459),n=a(92273),o=a(11341),i=a(96810),d=a(81509),c=a(53524),u=a(87802),m=a(4672),x=a(5157),p=a(68389),h=a.n(p);function f(e){let{projectId:t,evalTemplates:a,selectedTemplateId:p,onTemplateSelect:f,onCreateNew:v}=e,[j,g]=(0,i.useState)(""),y=a.reduce((e,t)=>
1{let a=t.projectId?"custom":"langfuse";return e[a][t.name]||(e[a][t.name]=[]),e[a][t.name].push(t),e},{langfuse:{},custom:{}}),w=e=>e.sort((e,t)=>e.createdAt.getTime()-t.createdAt.getTime());Object.values(y.custom).forEach(w),Object.values(y.langfuse).forEach(w);let b={langfuse:Object.entries(y.langfuse).filter(e=>{let[t]=e;return t.toLowerCase().includes(j.toLowerCase())}).sort((e,t)=>{var a,r;let[s,l]=e,[n,o]=t,i=null==(a=l[0])?void 0:a.partner,d=null==(r=o[0])?void 0:r.partner;return!i&&d?-1:i&&!d?1:s.localeCompare(n)}),custom:Object.entries(y.custom).filter(e=>{let[t]=e;return t.toLowerCase().includes(j.toLowerCase())}).sort((e,t)=>{let[a]=e,[r]=t;return a.localeCompare(r)})},N=b.langfuse.length>0||b.custom.length>0,{isTemplateInvalid:C}=(0,u.r)({projectId:t});return(0,r.jsxs)(o.wJ,{className:"flex h-full flex-col border-none","data-sentry-element":"InputCommand","data-sentry-component":"EvaluatorSelector","data-sentry-source-file":"evaluator-selector.tsx",children:[(0,r.jsx)(o.g1,{placeholder:"Search evaluators...",className:"h-9 px-0",value:j,onValueChange:g,variant:"bottom","data-sentry-element":"InputCommandInput","data-sentry-source-file":"evaluator-selector.tsx"}),(0,r.jsxs)(o.S2,{className:"max-h-full flex-1 overflow-y-auto","data-sentry-element":"InputCommandList","data-sentry-source-file":"evaluator-selector.tsx",children:[!N&&(0,r.jsx)(o.TD,{children:"No evaluator found."}),b.custom.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Jf,{heading:"Custom evaluators",children:b.custom.map(e=>{let[a,i]=e,u=i[i.length-1],m=C(u);return(0,r.jsxs)(o.tZ,{disabled:m,onSelect:()=>
1{f(u.id,a,u.version)},className:(0,d.cn)("group",i.some(e=>e.id===p)&&"bg-secondary"),children:[(0,r.jsxs)(c.m_,{children:[(0,r.jsx)(c.k$,{asChild:!0,children:(0,r.jsx)("span",{children:a})}),(0,r.jsxs)(c.ZI,{side:"right",className:"max-h-[300px] max-w-[400px] overflow-y-auto",children:[(0,r.jsx)("p",{className:"mb-1 font-medium",children:"Evaluation prompt"}),(0,r.jsx)("pre",{className:"whitespace-pre-wrap break-words text-xs text-muted-foreground",children:u.prompt})]})]}),m&&(0,r.jsxs)(c.m_,{children:[(0,r.jsx)(c.k$,{asChild:!0,children:(0,r.jsx)(s.A,{className:"ml-1 h-4 w-4 text-yellow-500"})}),(0,r.jsxs)(c.ZI,{className:"max-h-[50dvh] overflow-y-auto whitespace-normal break-normal text-sm",children:[(0,r.jsx)("p",{children:"Requires project-level evaluation model"}),(0,r.jsxs)(h(),{href:"/project/".concat(t,"/evals/default-model"),className:"mt-2 flex items-center gap-1 text-blue-600 hover:underline",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(l.A,{className:"h-3 w-3"}),"Configure default model"]})]})]}),i.some(e=>e.id===p)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h(),{href:"/project/".concat(t,"/evals/templates/").concat(u.id),target:"_blank",className:"ml-auto opacity-0 hover:opacity-100 group-hover:opacity-100",onClick:e=>{e.stopPropagation()},children:(0,r.jsx)(l.A,{className:"h-4 w-4"})}),(0,r.jsx)(n.A,{className:(0,d.cn)("ml-2 h-4 w-4")})]}):(0,r.jsx)(h(),{href:"/project/".concat(t,"/evals/templates/").concat(u.id),target:"_blank",className:"ml-auto opacity-0 hover:opacity-100 group-hover:opacity-100",onClick:e=>{e.stopPropagation()},children:(0,r.jsx)(l.A,{className:"h-4 w-4"})})]},"custom-".concat(a))})}),b.custom.length>0&&(0,r.jsx)(o.xP,{})]}),b.langfuse.length>0&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.Jf,{heading:"Langfuse managed evaluators",children:b.langfuse.map(e=>{let[a,i]=e,u=i[i.length-1],v=C(u);return(0,r.jsxs)(o.tZ,{disabled:v,onSelect:()=>
1{f(u.id,a,u.version)},className:(0,d.cn)("group",i.some(e=>e.id===p)&&"bg-secondary"),children:[(0,r.jsxs)(c.m_,{children:[(0,r.jsx)(c.k$,{asChild:!0,children:(0,r.jsx)("div",{className:"mr-1",children:a})}),(0,r.jsxs)(c.ZI,{side:"right",className:"max-h-[300px] max-w-[400px] overflow-y-auto",children:[(0,r.jsx)("p",{className:"mb-1 font-medium",children:"Evaluation prompt"}),(0,r.jsx)("pre",{className:"whitespace-pre-wrap break-words text-xs text-muted-foreground",children:u.prompt})]})]}),(0,r.jsx)(x.q,{maintainer:(0,m.Lb)(u)}),v&&(0,r.jsxs)(c.m_,{children:[(0,r.jsx)(c.k$,{asChild:!0,children:(0,r.jsx)(s.A,{className:"ml-1 h-4 w-4 text-yellow-500"})}),(0,r.jsxs)(c.ZI,{className:"max-h-[50dvh] overflow-y-auto whitespace-normal break-normal text-sm",children:[(0,r.jsx)("p",{children:"Requires project-level evaluation model"}),(0,r.jsxs)(h(),{href:"/project/".concat(t,"/evals/default-model"),className:"mt-2 flex items-center gap-1 text-blue-600 hover:underline",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(l.A,{className:"h-3 w-3"}),"Configure default model"]})]})]}),i.some(e=>e.id===p)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h(),{href:"/project/".concat(t,"/evals/templates/").concat(u.id),target:"_blank",className:"ml-auto opacity-0 hover:opacity-100 group-hover:opacity-100",onClick:e=>{e.stopPropagation()},children:(0,r.jsx)(l.A,{className:"h-4 w-4"})}),(0,r.jsx)(n.A,{className:(0,d.cn)("ml-2 h-4 w-4")})]}):(0,r.jsx)(h(),{href:"/project/".concat(t,"/evals/templates/").concat(u.id),target:"_blank",className:"ml-auto opacity-0 hover:opacity-100 group-hover:opacity-100",onClick:e=>{e.stopPropagation()},children:(0,r.jsx)(l.A,{className:"h-4 w-4"})})]},"langfuse-".concat(a))})})}),v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xP,{alwaysRender:!0}),(0,r.jsx)(o.Jf,{forceMount:!0,children:(0,r.jsxs)(o.tZ,{onSelect:v,children:["Create custom evaluator",(0,r.jsx)(l.A,{className:"ml-auto h-4 w-4"})]})})]})]})]})}},77585:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(22222).A)("between-horizontal-start",[["rect",{width:"13",height:"7",x:"8",y:"3",rx:"1",key:"pkso9a"}],["path",{d:"m2 9 3 3-3 3",key:"1agib5"}],["rect",{width:"13",height:"7",x:"8",y:"14",rx:"1",key:"1q5fc1"}]])},87802:(e,t,a)=>{"use strict";a.d(t,{r:()=>s});var r=a(93367);function s(e){let{projectId:t}=e,{data:a}=r.FH.defaultLlmModel.fetchDefaultModel.useQuery({projectId:t});return{isTemplateInvalid:e=>(!e.provider||!e.model)&&!a}}},90783:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/project/[projectId]/evals/new",function(){return a(40263)}])}},e=>{e.O(0,[789,202,9110,1454,531,7020,9225,9825,8780,1857,2911,894,5582,1555,540,9594,8252,2441,2348,8503,8204,4656,9578,636,6593,8792],()=>e(e.s=90783)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.