search-api-webui 0.2.2__py3-none-any.whl → 0.2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- search_api_webui/providers.yaml +1 -0
- search_api_webui/static/assets/{index-CEkM4WD5.js → index-BFKfJqMP.js} +1 -1
- search_api_webui/static/index.html +1 -1
- {search_api_webui-0.2.2.dist-info → search_api_webui-0.2.3.dist-info}/METADATA +1 -1
- {search_api_webui-0.2.2.dist-info → search_api_webui-0.2.3.dist-info}/RECORD +8 -8
- {search_api_webui-0.2.2.dist-info → search_api_webui-0.2.3.dist-info}/WHEEL +0 -0
- {search_api_webui-0.2.2.dist-info → search_api_webui-0.2.3.dist-info}/entry_points.txt +0 -0
- {search_api_webui-0.2.2.dist-info → search_api_webui-0.2.3.dist-info}/licenses/LICENSE +0 -0
search_api_webui/providers.yaml
CHANGED
|
@@ -11,4 +11,4 @@ Error generating stack: `+o.message+`
|
|
|
11
11
|
rounded-md border border-gray-200 bg-white px-3 py-2
|
|
12
12
|
text-sm focus:outline-none focus:ring-2
|
|
13
13
|
focus:ring-blue-600`,children:s.map(F=>p.jsx("option",{value:F.name,children:F.name},F.name))})]}),p.jsx("div",{className:"border-t border-gray-100 my-4"}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("label",{className:"text-sm font-medium flex items-center gap-2 text-gray-700",children:[p.jsx(Ym,{className:"w-4 h-4"}),"API Key"]}),y?p.jsxs("div",{className:`flex items-center justify-between bg-green-50 border
|
|
14
|
-
border-green-200 rounded-md px-3 py-2`,children:[p.jsxs("div",{className:"flex items-center gap-2 text-green-800 font-mono text-sm",children:[p.jsx("span",{children:"********************"}),p.jsx(no,{className:"bg-green-200 text-green-800 hover:bg-green-300 border-0",children:"Configured"})]}),p.jsxs(At,{variant:"ghost",size:"sm",onClick:We,className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8",children:[p.jsx(uh,{className:"w-4 h-4 mr-1"})," Remove"]})]}):p.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"No API key configured. Please enter one below."}),p.jsx(on,{type:"password",placeholder:y?"Enter API Key to update...":`Enter API Key for ${d}`,value:w,onChange:F=>_(F.target.value),className:"font-mono"})]}),p.jsx("div",{className:"border-t border-gray-100 my-4"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2 text-gray-900",children:[p.jsx(oh,{className:"w-4 h-4"}),"Advanced Settings"]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2 col-span-2",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"API Base URL (Optional)"}),p.jsx(on,{placeholder:"https://api.example.com/v1/search",value:M,onChange:F=>E(F.target.value),className:"font-mono text-sm"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Result Limit"}),p.jsx(on,{type:"number",placeholder:"10",value:I,onChange:F=>Z(F.target.value)})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Language Code"}),p.jsx(on,{placeholder:"e.g., en-US",value:G,onChange:F=>A(F.target.value)})]})]}),p.jsxs("div",{className:"space-y-3 pt-4 border-t border-gray-100",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",id:"use-proxy",checked:T,onChange:F=>K(F.target.checked),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),p.jsx("label",{htmlFor:"use-proxy",className:"text-sm font-medium text-gray-700",children:"Use Proxy"})]}),T&&p.jsxs("div",{className:"space-y-2 pl-6",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Proxy URL"}),p.jsx(on,{placeholder:"http://proxy.example.com:8080",value:le,onChange:F=>oe(F.target.value),className:"font-mono text-sm"}),p.jsx("p",{className:"text-xs text-gray-500",children:"Example: http://
|
|
14
|
+
border-green-200 rounded-md px-3 py-2`,children:[p.jsxs("div",{className:"flex items-center gap-2 text-green-800 font-mono text-sm",children:[p.jsx("span",{children:"********************"}),p.jsx(no,{className:"bg-green-200 text-green-800 hover:bg-green-300 border-0",children:"Configured"})]}),p.jsxs(At,{variant:"ghost",size:"sm",onClick:We,className:"text-red-600 hover:text-red-700 hover:bg-red-50 h-8",children:[p.jsx(uh,{className:"w-4 h-4 mr-1"})," Remove"]})]}):p.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"No API key configured. Please enter one below."}),p.jsx(on,{type:"password",placeholder:y?"Enter API Key to update...":`Enter API Key for ${d}`,value:w,onChange:F=>_(F.target.value),className:"font-mono"})]}),p.jsx("div",{className:"border-t border-gray-100 my-4"}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2 text-gray-900",children:[p.jsx(oh,{className:"w-4 h-4"}),"Advanced Settings"]}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2 col-span-2",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"API Base URL (Optional)"}),p.jsx(on,{placeholder:"https://api.example.com/v1/search",value:M,onChange:F=>E(F.target.value),className:"font-mono text-sm"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Result Limit"}),p.jsx(on,{type:"number",placeholder:"10",value:I,onChange:F=>Z(F.target.value)})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Language Code"}),p.jsx(on,{placeholder:"e.g., en-US",value:G,onChange:F=>A(F.target.value)})]})]}),p.jsxs("div",{className:"space-y-3 pt-4 border-t border-gray-100",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",id:"use-proxy",checked:T,onChange:F=>K(F.target.checked),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),p.jsx("label",{htmlFor:"use-proxy",className:"text-sm font-medium text-gray-700",children:"Use Proxy"})]}),T&&p.jsxs("div",{className:"space-y-2 pl-6",children:[p.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Proxy URL"}),p.jsx(on,{placeholder:"http://proxy.example.com:8080",value:le,onChange:F=>oe(F.target.value),className:"font-mono text-sm"}),p.jsx("p",{className:"text-xs text-gray-500",children:"Example: http://127.0.0.1:8891"})]})]}),p.jsxs("div",{className:"space-y-3 pt-4 border-t border-gray-100",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",id:"skip-warmup",checked:ae,onChange:F=>de(F.target.checked),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),p.jsx("label",{htmlFor:"skip-warmup",className:"text-sm font-medium text-gray-700",children:"Skip Connection Warmup"})]}),p.jsx("p",{className:"text-xs text-gray-500 pl-6",children:"Disable pre-connection HEAD request. Enable this if using proxy or experiencing timeout issues."})]})]}),p.jsx("div",{className:"pt-4",children:p.jsxs(At,{onClick:Me,disabled:H,className:"w-full md:w-auto",children:[p.jsx(qm,{className:"w-4 h-4 mr-2"}),H?"Saving Configuration...":"Save Configuration"]})}),p.jsxs("div",{className:"border-t pt-6 mt-6",children:[p.jsx("div",{className:"flex items-center justify-between mb-4",children:p.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2 text-gray-900",children:[p.jsx(Wm,{className:"w-4 h-4"}),"Provider Specs (Read-only)"]})}),p.jsx("div",{className:"bg-gray-900 rounded-lg p-4 overflow-x-auto shadow-inner",children:ge?p.jsx("pre",{className:"text-xs text-gray-300 font-mono leading-relaxed",children:JSON.stringify(ge,null,2)}):p.jsx("p",{className:"text-gray-500 text-sm",children:"No details available"})})]})]})]})]})})}function ig(){const i=ao(),[u,s]=L.useState([]),[c,d]=L.useState(""),[g,y]=L.useState(""),[N,w]=L.useState(""),[_,M]=L.useState(!1),[E,I]=L.useState(null),[Z,G]=L.useState(null);L.useEffect(()=>{fetch("/api/providers").then(K=>K.json()).then(K=>{s(K),K.length>=2?(d(K[0].name),y(K[1].name)):K.length===1&&(d(K[0].name),y(K[0].name))}).catch(console.error)},[]);const A=async(K,le)=>{try{const oe=performance.now(),de=await(await fetch("/api/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:le,provider:K})})).json(),ge=performance.now(),xe=Math.round(ge-oe);return de.error?{error:de.error}:{results:de.results||[],metrics:{latency_ms:de.metrics?.latency_ms||xe,server_latency_ms:de.metrics?.server_latency_ms||null,size_bytes:de.metrics?.size_bytes||0}}}catch{return{error:"Network Error"}}},T=async K=>{if(K.preventDefault(),!N.trim())return;M(!0),I(null),G(null);const[le,oe]=await Promise.all([A(c,N),A(g,N)]);I(le),G(oe),M(!1)};return p.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[p.jsx("div",{className:"bg-white border-b sticky top-0 z-10",children:p.jsxs("div",{className:"max-w-7xl mx-auto px-4 h-16 flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx(At,{variant:"ghost",size:"icon",onClick:()=>i("/"),children:p.jsx(rd,{className:"w-5 h-5 text-gray-600"})}),p.jsxs("h1",{className:"text-xl font-bold bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent flex items-center gap-2",children:[p.jsx(dh,{className:"w-6 h-6 text-purple-600"}),"API Arena"]})]}),p.jsxs("form",{onSubmit:T,className:"flex-1 max-w-2xl mx-4 flex gap-2",children:[p.jsx(on,{value:N,onChange:K=>w(K.target.value),placeholder:"Enter a query to compare providers...",className:"h-10"}),p.jsx(At,{type:"submit",disabled:_,className:"bg-purple-600 hover:bg-purple-700",children:_?p.jsx(ks,{className:"w-4 h-4 animate-spin"}):"Fight!"})]})]})}),p.jsxs("div",{className:"flex-1 max-w-7xl mx-auto w-full p-4 grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.jsx($c,{side:"Left",providers:u,selected:c,onSelect:d,result:E,opponentResult:Z,loading:_}),p.jsx($c,{side:"Right",providers:u,selected:g,onSelect:y,result:Z,opponentResult:E,loading:_})]})]})}function $c({side:i,providers:u,selected:s,onSelect:c,result:d,opponentResult:g,loading:y}){const N=d?.metrics&&g?.metrics&&d.metrics.latency_ms<g.metrics.latency_ms;return d?.metrics&&g?.metrics&&d.metrics.size_bytes>g.metrics.size_bytes,p.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[p.jsxs(uo,{className:"p-4 border-t-4 border-t-transparent data-[side=Left]:border-t-blue-500 data-[side=Right]:border-t-orange-500","data-side":i,children:[p.jsx("select",{className:"w-full h-10 rounded-md border border-gray-300 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-purple-500",value:s,onChange:w=>c(w.target.value),children:u.map(w=>p.jsx("option",{value:w.name,children:w.name},w.name))}),d&&!d.error&&p.jsxs("div",{className:"mt-4 space-y-3",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsxs("div",{className:"flex justify-between text-xs",children:[p.jsxs("span",{className:"flex items-center gap-1 text-gray-600",children:[p.jsx(od,{className:"w-3 h-3"})," Client Latency"]}),p.jsxs("span",{className:Ke("font-mono font-bold",N?"text-green-600":"text-gray-900"),children:[d.metrics.latency_ms,"ms"]})]}),p.jsx("div",{className:"h-2 w-full bg-gray-100 rounded-full overflow-hidden",children:p.jsx("div",{className:Ke("h-full rounded-full transition-all duration-500",N?"bg-green-500":"bg-gray-400"),style:{width:"100%"}})})]}),d.metrics.server_latency_ms!==null&&p.jsx("div",{className:"space-y-1",children:p.jsxs("div",{className:"flex justify-between text-xs",children:[p.jsxs("span",{className:"flex items-center gap-1 text-gray-600",children:[p.jsx(sd,{className:"w-3 h-3"})," Server Latency"]}),p.jsxs("span",{className:"font-mono font-bold text-blue-600",children:[d.metrics.server_latency_ms,"ms"]})]})}),p.jsx("div",{className:"space-y-1",children:p.jsxs("div",{className:"flex justify-between text-xs",children:[p.jsxs("span",{className:"flex items-center gap-1 text-gray-600",children:[p.jsx(id,{className:"w-3 h-3"})," Payload"]}),p.jsxs("span",{className:"font-mono text-gray-900",children:[d.metrics.size_bytes," B"]})]})})]})]}),p.jsx("div",{className:"flex-1 bg-gray-100/50 rounded-lg p-2 overflow-y-auto min-h-[500px] border border-dashed border-gray-200",children:y?p.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400 gap-2",children:[p.jsx(ks,{className:"w-8 h-8 animate-spin"}),p.jsx("span",{className:"text-sm",children:"Fetching results..."})]}):d?.error?p.jsxs("div",{className:"p-4 bg-red-50 text-red-600 rounded-md flex items-center gap-2 text-sm",children:[p.jsx(ld,{className:"w-4 h-4"})," ",d.error]}):d?.results?p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"text-xs text-gray-400 text-center uppercase tracking-widest py-2",children:[d.results.length," Results Found"]}),d.results.map((w,_)=>p.jsx(Sd,{item:w,compact:!0},_))]}):p.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Ready to compare"})})]})}function sg(){return p.jsx(jm,{children:p.jsxs(Nm,{children:[p.jsx(to,{path:"/",element:p.jsx(lg,{})}),p.jsx(to,{path:"/config",element:p.jsx(og,{})}),p.jsx(to,{path:"/arena",element:p.jsx(ig,{})})]})})}Rp.createRoot(document.getElementById("root")).render(p.jsx(lo.StrictMode,{children:p.jsx(sg,{})}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
7
7
|
<title>Search API WebUI</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BFKfJqMP.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-BWsitD55.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: search-api-webui
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: A Search API WebUI for testing and comparing Querit, You, and other search providers.
|
|
5
5
|
Project-URL: Homepage, https://github.com/querit-ai/search-api-webui
|
|
6
6
|
Project-URL: Repository, https://github.com/querit-ai/search-api-webui.git
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
search_api_webui/__init__.py,sha256=8lqDjWnBOwF_NhSK9_JZDg19zxwal21cOaN-hqBZNLE,1101
|
|
2
2
|
search_api_webui/app.py,sha256=k23YqnBtnNoqsLtZNLZNx0a4pOsccY1MLze6LkQl7Mc,11997
|
|
3
|
-
search_api_webui/providers.yaml,sha256=
|
|
3
|
+
search_api_webui/providers.yaml,sha256=pVl1O2t8Owfs50mDPde2e-pwXQl7DShgOzg4otw7MQ8,3450
|
|
4
4
|
search_api_webui/ruff.toml,sha256=4XrS5KAylffZi6_DL8i0rvDVxZtfDgFLmltmTc8XXF8,608
|
|
5
5
|
search_api_webui/providers/__init__.py,sha256=bvCGjIyFzEFpj4gwMMhjcVz5FINkHg06HTfcI8Wt1BA,2185
|
|
6
6
|
search_api_webui/providers/base.py,sha256=1pOirPROqSpWrOJucQADv8xG65eVCplSs1OsDdVq1c0,5167
|
|
@@ -9,11 +9,11 @@ search_api_webui/providers/querit.py,sha256=XC6CdRqxvsixqMmDh94CGD-982x_Tn5OIp-x
|
|
|
9
9
|
search_api_webui/static/AppIcon.icns,sha256=oQLr-jHi7RkzJoz0JIAQFyW9A4YMPsOdLh7sEtYbOT8,470797
|
|
10
10
|
search_api_webui/static/AppIcon.ico,sha256=xnHL8bRN41mJi_yredfLol8R4V30ijXwTha3AmMznpI,59929
|
|
11
11
|
search_api_webui/static/favicon.ico,sha256=U_7TbOXM0jf963y9j0jogM0rBpKNr72HVVOofnBNAVQ,15086
|
|
12
|
-
search_api_webui/static/index.html,sha256=
|
|
12
|
+
search_api_webui/static/index.html,sha256=cL5SZRNHamu46JG4KDnJs7stk8wwgA7ZIHkLCh6EFh4,465
|
|
13
|
+
search_api_webui/static/assets/index-BFKfJqMP.js,sha256=T-5jyNGiG1-d7JuF9CK5M0WKPxxDrlbqUvw_pGD2NR4,217993
|
|
13
14
|
search_api_webui/static/assets/index-BWsitD55.css,sha256=4Cd91W8ogAPJdpt1aFPxXazB7RcPPeMlartV7fMc2E4,20841
|
|
14
|
-
search_api_webui
|
|
15
|
-
search_api_webui-0.2.
|
|
16
|
-
search_api_webui-0.2.
|
|
17
|
-
search_api_webui-0.2.
|
|
18
|
-
search_api_webui-0.2.
|
|
19
|
-
search_api_webui-0.2.2.dist-info/RECORD,,
|
|
15
|
+
search_api_webui-0.2.3.dist-info/METADATA,sha256=XKSP4lOSXXUcYEhXcdqrh_WWoJZMfSeh_mtb7VYrUrg,6846
|
|
16
|
+
search_api_webui-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
search_api_webui-0.2.3.dist-info/entry_points.txt,sha256=ogYy3eeonZ_oQlrEZC-4JBWfYdB7kkkdqXUUmX0xgMs,63
|
|
18
|
+
search_api_webui-0.2.3.dist-info/licenses/LICENSE,sha256=B7n2gauZcaVVVdE-zvx3mABAgGzgzVKu7x1a94ZeuPU,1074
|
|
19
|
+
search_api_webui-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|