PageSourceSearch

https://app.queryloop.ai/assets/RetrievalOptimizationToolbar-DTclB9gu.js

js queryloop.ai collected 2026-10-05 13:40:07 UTC 16,398 bytes, 1 lines download raw bytes

1import{W as To,X as Fo,a as J,r as f,c as h,j as o,B as P,f as d,a5 as l,_ as b,aK as _o,bA as Do,bQ as Io,bR as Z,t as k,am as Wo,aH as y,an as Po,a6 as Bo,T as Eo,ao as $o,N as jo,aF as Uo,ga as Yo,aO as Go,d as No,ec as Oo,aL as Mo}from"./index-BjwUcugN.js";import{h as Qo,R as Ho,I as Vo}from"./InvalidDeploymentsPanel-DfgK6j1e.js";import{R as Ko,T as Xo}from"./RetrievalOptimization-l_94yhbH.js";import{T as qo}from"./Tune-C71PchOE.js";import{N as Jo}from"./NotStarted-CPlFGC-D.js";import{P as Zo}from"./PlayArrow-CYJdUNW7.js";import{S as Lo}from"./Stop-E1ZRtiDY.js";import{A as Ro}from"./ArrowForward-i7ahj0eF.js";import"./Refresh-3I9j3YML.js";import"./PostGridStyles-C9QqzoEX.js";import"./DetailsView-Qv1aO0Yp.js";import"./AgentVerboseTracing-n-Mkq0Y7.js";import"./Feedback-DJ74O1e8.js";import"./Code-YnnHFRk-.js";import"./Sync-DbCiUHpp.js";import"./Psychology-DNw-k-_S.js";import"./index-DgbxAZUV.js";import"./Build-BinXKKUl.js";import"./Error-IK_3SnFK.js";import"./AccessTime-DjrllxXE.js";import"./MessageItem-B9yaK651.js";import"./Check-yyTx0iG5.js";import"./ContentCopy-BR5iyVPd.js";import"./SpiderChart-Cgp1eIBd.js";import"./generateCategoricalChart-CbIfLzOs.js";import"./index-deJRG_oC.js";import"./FileDownload-DWXj9waw.js";import"./ComparisonDetailsView-DpDFUnRV.js";const Ao=To(Fo.jsx("path",{d:"m17.66 9.53-7.07 7.07-4.24-4.24 1.41-1.41 2.83 2.83 5.66-5.66zM4 12c0-2.33 1.02-4.42 2.62-5.88L9 8.5v-6H3l2.2 2.2C3.24 6.52 2 9.11 2 12c0 5.19 3.95 9.45 9 9.95v-2.02c-3.94-.49-7-3.86-7-7.93m18 0c0-5.19-3.95-9.45-9-9.95v2.02c3.94.49 7 3.86 7 7.93 0 2.33-1.02 4.42-2.62 5.88L15 15.5v6h6l-2.2-2.2c1.96-1.82 3.2-4.41 3.2-7.3"}),"PublishedWithChanges"),$i=({currentApp:r,setCurrentApp:L,loading:v,calculateInitCostAndTime:R,combinationStatusCompleteCount:oi,handleOpenDialog:A,RetRunSelected:t,setDatasetChangeDialogContent:ii,setDatasetChangeDialogOpen:ei,comparisonLoadingDialog:oo,selectedCompletedCombinations:B,setLoading:x,setLoading_message:p,navigate:F,dispatch:m,handleCheckEmbFT:io,getFinetuningCombinations:eo,user_id:ro,setInitMessage:E,showSnackbar:n,setIsRunSelectedDialogOpen:_,setCompletedCombinations:ao,setSelectedCompletedCombinations:to,setDisabledCombinations:$,currentlyRunningCombination:C,setCurrentlyRunningCombination:j,setRetRunSelected:D,bot_id:I,isRunSelectedDialogOpen:lo,completedCombinations:U,handleAbortRuns:no,disabledCombinations:so,setOpenTestChat:ri,loadingTestBtn:ai,setCurrentRunningCombination:Y,toggleFilters:bo,showFilters:ti,viewMode:G,setViewMode:po,handleApplyFilters:N,libraryView:co,selectedIterationsForCompare:w,openToolMetadata:go,setOpenToolMetadata:xo,selectedInvalidCombinations:O})=>{const a=J(e=>e.chatbot),M=J(e=>e.organization),[ho,Q]=f.useState(""),[mo,H]=f.useState(""),[uo,fo]=f.useState(!1),[vo,z]=f.useState(!1),S=a?.chatbots?.combinations?.find(e=>e?._id?.$oid===I),ko=Qo(S);f.useEffect(()=>{const e=a?.combinations?.some(i=>i.embedding_model==="fine-tuned"&&r?.initialised_finetune!=="initialised"&&r?.initialised?.toLowerCase()!=="not started");fo(e)},[a?.combinations,r]);const yo=()=>{N()},T=t.some(e=>a?.combinations?.some(i=>i._id.$oid===e&&i.validility==="invalid")),W=r?.golden_responses&&r.golden_responses.length>0,V=a?.generatingQnABotId===I;f.useEffect(()=>{const e=K();to(e)},[t]);const Co=async()=>{p("Updating Initialization Status. Hang tight!"),x(!0);const i=(await m(Go({toolId:r.tools.retrieval[0].$oid,toolType:"retrieval"})))?.payload?.retrieval;i&&i?.initialised!=="initialising"&&E(""),i&&i?.initialised!=="partially_initialized"&&(E(""),a.combinationUsed,await N()),L(c=>({...c,initialised:i.initialised})),p(""),x(!1)},K=()=>a?.combinations?.filter(i=>t.includes(i._id.$oid)&&i.completed===!0)?.map(i=>i._id.$oid)||[],X=async()=>{x(!0),p("Testing selected Retrieval combinations with golden responses. Please stay on this tab until the process is complete."),$(i=>[...i,...t]),D(i=>i.filter(c=>!t.includes(c)));const e=M?.organization?._id.$oid;Y(t);for(const i of t){if(localStorage.getItem("abortStatus")==="true"){x(!1),p(""),n("Aborted all selected combinations.","warning"),localStorage.removeItem("abortStatus");break}try{p("Testing selected Retrieval combinations with golden responses. Please stay on this tab until the process is complete."),j(i),(await m(Oo({orgId:e,user_id:ro,bot_id:I,retrieval_id:r.tools.retrieval[0].$oid,combination_id:i}))).type.includes("rejected")&&n("Error running evaluation.","error")}catch(g){console.error("Error running evaluation:",g),n("Error running evaluation. Please try again.","error")}finally{$(u=>u.filter(s=>s!==i)),Y(u=>u.filter(s=>s!==i)),j(null),D([]);const g=a?.defaultCombination?.retrieval_0;Mo(m,a,g,"retrieval_0")}}x(!1),p("")},wo=async()=>
1{if(M?.organization?.credit<=0){n("You don't have enough credits to run combinations. Goto 'Settings -> Usage' to purchase more credits.","warning",o(No,{sx:{textTransform:"none",bgcolor:l.primaryBlue,color:l.extremeWhite,whiteSpace:"nowrap","&:hover":{bgcolor:l.secondaryBlue}},onClick:()=>F("/settings/usage"),children:"Purchase More Credits"}));return}const e=K();if(e.length>0){_(!0),ao(e);return}else X()},zo=e=>{let i;e?i=t:(i=t.filter(c=>!U.some(g=>g===c)),D(i)),i.length>0?X():n("Selected list cleared as selected combinations have been evaluated.","info"),_(!1)},So=async e=>{const i=r.tools.retrieval[0].$oid,c="retrieval",g=a?.defaultCombination.retrieval_0||a?.defaultCombination.retrieval_1,u=G==="grid"&&Array.isArray(t)&&t.length===1?t[0]:g;if(!u){n("Please select a combination using the checkbox or press Select on a row.","error");return}try{const s=await m(Yo({tool_id:i,tool_type:c,name:e.name,description:e.description,default_combination:u}));if(s.payload==="Error"||s.error){if(typeof s.payload=="string"){n(s.payload,"error");return}n("Error has occured while saving this tool to library! Please try again.","error");return}n("Tool saved to library","success"),q()}catch(s){console.error("Error while saving tool to library: ",s),n("Error has occured while saving this tool to library!","error")}},q=()=>{H(""),Q("")};return h(P,{sx:{display:"flex",justifyContent:"space-between",py:0,borderRadius:"4px",width:"100%",alignItems:"center",gap:2,mb:2,pr:2},children:[o(Ko,{isRunSelectedDialogOpen:lo,setIsRunSelectedDialogOpen:_,completedCombinations:U,handleDialogConfirm:zo}),o(Xo,{onClose:()=>{q(),xo(!1)},open:go,onSave:So,setToolDescription:H,toolDescription:mo,setToolName:Q,toolName:ho}),h(P,{sx:{display:"flex",width:"50%",justifyContent:"flex-start",alignItems:"center",gap:1},children:[o(b,{title:"Filters",placement:"top",children:o(d,{onClick:bo,sx:{fontSize:"14px",background:"rgba(59, 130, 246, 0.12)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 130, 246, 0.2)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"32px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},size:"small",children:o(qo,{fontSize:"small"})})}),(r?.initialised==="not started"||r?.initialised==="unsuccessful"||r?.initialised==="partially_initialised"||r?.initialised==="initialised"&&T)&&o(b,{title:T?"Re-try invalid combinations initialization":r?.initialised==="partially_initialised"?"Resume initialization":"Initialize Combinations",children:o("span",{children:o(d,{sx:{fontSize:"14px",background:"rgba(47, 115, 224, 0.3)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 131, 246, 0.46)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"32px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},size:"small",disabled:v||a?.isLoading,onClick:R,children:o(Jo,{fontSize:"small"})})})}),(r?.initialised==="initialising"||r?.initialised==="unsuccessful")&&o(b,{title:"Check Initializing Status",children:o("span",{children:o(d,{sx:{fontSize:"14px",background:"rgba(47, 115, 224, 0.3)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 131, 246, 0.46)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"32px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},size:"small",disabled:v||a?.isLoading,onClick:Co,children:o(Ao,{fontSize:"small"})})})}
1),a?.combinations?.length>0&&(C===null||C.length===0)&&(r?.initialised==="initialised"||r?.initialised==="partially_initialised")&&o(b,{title:O?.length>0||T?"De-select invalid combinations to run.":!W&&V?"Golden QnA are being generated. Please wait.":!W&&!V?"Please go to Settings and add golden QnA to run combinations.":"Run Selected Combinations",children:o("span",{children:o(d,{sx:{fontSize:"14px",background:"rgba(47, 115, 224, 0.3)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 131, 246, 0.46)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"32px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},disabled:v||a.isLoading||t.length<1||O?.length>0||T||!W,onClick:wo,children:o(Zo,{fontSize:"small"})})})}),r?.initialised==="initialised"&&C&&C.length>0&&o(b,{title:"Abort Experiments",children:o("span",{children:o(d,{size:"small",sx:{fontSize:"14px",background:"rgba(47, 115, 224, 0.3)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 131, 246, 0.46)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"32px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},onClick:no,disabled:so.length<1,children:o(Lo,{fontSize:"small"})})})}),uo&&o(b,{title:"Check Finetuning Status",children:o("span",{children:o(d,{sx:_o,size:"small",onClick:io,disabled:v||a.isLoading,children:o(Do,{fontSize:"small"})})})}),h(Io,{size:"small",exclusive:!0,value:G,onChange:(e,i)=>i!==null&&po(i),sx:{background:"rgba(255, 255, 255, 0.05)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 130, 246, 0.2)",borderRadius:"10px",padding:"4px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2)",height:"32px"},children:[o(Z,{value:"grid",sx:{color:l.extremeWhite,border:"none",height:"23px",borderRadius:"8px",textTransform:"none",fontSize:"0.875rem",fontWeight:500,padding:"6px 8px",transition:"all 0.3s ease","&.Mui-selected":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",color:l.extremeWhite,boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 15px rgba(59, 130, 246, 0.1)","&:hover":{background:"rgba(59, 130, 246, 0.3)"}},"&:hover":{background:"rgba(59, 130, 246, 0.15)"}},onClick:()=>{yo()},children:"Grid View"}),o(Z,{value:"1doptimization",sx:{height:"23px",color:l.extremeWhite,border:"none",borderRadius:"8px",textTransform:"none",fontSize:"0.875rem",fontWeight:500,padding:"6px 8px",transition:"all 0.3s ease","&.Mui-selected":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",color:l.extremeWhite,boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 15px rgba(59, 130, 246, 0.1)","&:hover":{background:"rgba(59, 130, 246, 0.3)"}},"&:hover":{background:"rgba(59, 130, 246, 0.15)"}},children:"1-D Optimization"})]}),ko&&o(b,{title:"Invalid hyperparameter configuration detected for the Deployed Version",children:o(d,{onClick:()=>z(!0),sx:{ml:1,width:"32px",height:"32px",color:k.colors.warning,backgroundColor:`${k.colors.warning}20`,border:`1px solid ${k.colors.warning}55`,borderRadius:"8px",transition:"all 0.2s ease","&:hover":{backgroundColor:`${k.colors.warning}35`,borderColor:k.colors.warning,transform:"translateY(-1px)"}},children:o(Ho,{sx:{fontSize:"18px"}})})})]}),h(Wo,{open:vo,onClose:()=>z(!1),maxWidth:"md",fullWidth:!0,PaperProps:{sx:y.dialogRoot},children:[h(Po,{sx:{...y.dialogTitle,mb:2},children:[o(d,{onClick:()=>z(!1),sx:y.dialogCloseIcon,children:o(Bo,{})}),h(Eo,{sx:y.dialogTitleText,children:["Deployment Issues",S?.name?` — ${S.name}`:""]})]}),o($o,{sx:y.dialogContent,children:o(Vo,{application:S,onReplaced:()=>z(!1),showSnackbar:n})})]}),h(P,{sx:{display:"flex",flexDirection:"row",width:"25%",justifyContent:"flex-end"},children:[o(b,{title:w&&w.length===2?"Compare Selected Iterations":B.length!==2?"Select exactly two combinations or iterations to compare":"Compare Combinations",children:o("span",{children:o(d,{sx:{fontSize:"14px",mr:1,background:"rgba(59, 130, 246, 0.12)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 130, 246, 0.2)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"70px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},size:"small",onClick:A,disabled:w&&w.length===2?!1:t.length!==2||B.length!==2,children:oo?o(jo,{size:12,thickness:4,color:"inherit"}):"Compare"})})}),!v&&!co&&o(b,{title:"Next",children:o("span",{children:o(d,{disabled:!(a?.defaultCombination?.retrieval_0||a?.defaultCombination?.retrieval_1),size:"small",sx:{background:"rgba(59, 130, 246, 0.12)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 130, 246, 0.2)",borderRadius:"8px",color:l.extremeWhite,padding:"8px",width:"70px",height:"32px",boxShadow:"0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.15)",transition:"all 0.3s ease","&:hover":{background:"rgba(59, 130, 246, 0.25)",backdropFilter:"blur(15px)",border:"1px solid rgba(59, 130, 246, 0.4)",boxShadow:"0 4px 12px rgba(59, 130, 246, 0.1), 0 0 12px rgba(59, 130, 246, 0.1)",transform:"translateY(-2px)"},"&:disabled":{background:"rgba(255, 255, 255, 0.03)",color:"rgba(255, 255, 255, 0.3)",border:"1px solid rgba(255, 255, 255, 0.05)",backdropFilter:"blur(5px)"}},onClick:async()=>
1{if(r?.tools?.generation?.length>0||r?.tools?.finetune?.length>0){r?.tools?.finetune?.length>0&&m(eo(a?.combinationUsed)),r?.tools?.generation?.length>0&&(x(!0),p("Fetching Generation combinations for the selected application. Please wait."),await m(Uo(r?.tools.generation[0].$oid)));const e=a.combinationUsed;F(`/myBots/${e}/generation`),x(!1),p("")}else{const e=a.combinationUsed;F(`/myBots/${e}/test-deploy`)}},children:o(Ro,{fontSize:"small"})})})})]})]})};export{$i as default};

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.