xinference 0.10.0__py3-none-any.whl → 0.10.1__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.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (76) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +25 -6
  3. xinference/client/oscar/actor_client.py +4 -3
  4. xinference/client/restful/restful_client.py +8 -2
  5. xinference/core/supervisor.py +16 -0
  6. xinference/model/embedding/core.py +1 -2
  7. xinference/model/llm/__init__.py +0 -6
  8. xinference/model/llm/ggml/llamacpp.py +2 -10
  9. xinference/model/llm/llm_family.json +244 -7
  10. xinference/model/llm/llm_family.py +15 -0
  11. xinference/model/llm/llm_family_modelscope.json +100 -0
  12. xinference/model/llm/pytorch/chatglm.py +2 -0
  13. xinference/model/llm/pytorch/core.py +22 -28
  14. xinference/model/llm/pytorch/internlm2.py +2 -0
  15. xinference/model/llm/pytorch/qwen_vl.py +2 -0
  16. xinference/model/llm/pytorch/yi_vl.py +4 -2
  17. xinference/model/llm/utils.py +42 -4
  18. xinference/model/llm/vllm/core.py +51 -6
  19. xinference/model/rerank/core.py +3 -0
  20. xinference/thirdparty/omnilmm/chat.py +1 -1
  21. xinference/types.py +15 -19
  22. xinference/web/ui/build/asset-manifest.json +3 -3
  23. xinference/web/ui/build/index.html +1 -1
  24. xinference/web/ui/build/static/js/main.76ef2b17.js +3 -0
  25. xinference/web/ui/build/static/js/main.76ef2b17.js.map +1 -0
  26. xinference/web/ui/node_modules/.cache/babel-loader/15e2cf8cd8d0989719b6349428ff576f9009ff4c2dcc52378be0bd938e82495e.json +1 -0
  27. xinference/web/ui/node_modules/.cache/babel-loader/35d0e4a317e5582cbb79d901302e9d706520ac53f8a734c2fd8bfde6eb5a4f02.json +1 -0
  28. xinference/web/ui/node_modules/.cache/babel-loader/3c2f277c93c5f1638e08db38df0d0fb4e58d1c5571aea03241a5c04ff4094704.json +1 -0
  29. xinference/web/ui/node_modules/.cache/babel-loader/3fa1f69162f9c6dc0f6a6e21b64d49d6b8e6fa8dfa59a82cf829931c5f97d99f.json +1 -0
  30. xinference/web/ui/node_modules/.cache/babel-loader/44774c783428f952d8e2e4ad0998a9c5bc16a57cd9c68b7c5ff18aaa5a41d65c.json +1 -0
  31. xinference/web/ui/node_modules/.cache/babel-loader/5393569d846332075b93b55656716a34f50e0a8c970be789502d7e6c49755fd7.json +1 -0
  32. xinference/web/ui/node_modules/.cache/babel-loader/59ce49eae0f486af4c5034d4d2f9ca77c3ec3a32ecc560085caf5ef482b5f4c9.json +1 -0
  33. xinference/web/ui/node_modules/.cache/babel-loader/62e257ed9016471035fa1a7da57c9e2a4250974ed566b4d1295873d747c68eb2.json +1 -0
  34. xinference/web/ui/node_modules/.cache/babel-loader/63a4c48f0326d071c7772c46598215c006ae41fd3d4ff3577fe717de66ad6e89.json +1 -0
  35. xinference/web/ui/node_modules/.cache/babel-loader/b9cbcb6d77ba21b22c6950b6fb5b305d23c19cf747f99f7d48b6b046f8f7b1b0.json +1 -0
  36. xinference/web/ui/node_modules/.cache/babel-loader/d06a96a3c9c32e42689094aa3aaad41c8125894e956b8f84a70fadce6e3f65b3.json +1 -0
  37. xinference/web/ui/node_modules/.cache/babel-loader/d076fd56cf3b15ed2433e3744b98c6b4e4410a19903d1db4de5bba0e1a1b3347.json +1 -0
  38. xinference/web/ui/node_modules/.cache/babel-loader/daad8131d91134f6d7aef895a0c9c32e1cb928277cb5aa66c01028126d215be0.json +1 -0
  39. xinference/web/ui/node_modules/.cache/babel-loader/de0299226173b0662b573f49e3992220f6611947073bd66ac079728a8bc8837d.json +1 -0
  40. xinference/web/ui/node_modules/.cache/babel-loader/e606671420d2937102c3c34b4b04056c11736408c1d3347b8cf42dfe61fb394b.json +1 -0
  41. xinference/web/ui/node_modules/.cache/babel-loader/e6eccc9aa641e7da833492e27846dc965f9750281420977dc84654ca6ed221e4.json +1 -0
  42. xinference/web/ui/node_modules/.cache/babel-loader/e9b52d171223bb59fb918316297a051cdfd42dd453e8260fd918e90bc0a4ebdf.json +1 -0
  43. xinference/web/ui/node_modules/.cache/babel-loader/f16aec63602a77bd561d0e67fa00b76469ac54b8033754bba114ec5eb3257964.json +1 -0
  44. {xinference-0.10.0.dist-info → xinference-0.10.1.dist-info}/METADATA +10 -10
  45. {xinference-0.10.0.dist-info → xinference-0.10.1.dist-info}/RECORD +50 -56
  46. xinference/model/llm/ggml/ctransformers.py +0 -281
  47. xinference/model/llm/ggml/ctransformers_util.py +0 -161
  48. xinference/web/ui/build/static/js/main.98516614.js +0 -3
  49. xinference/web/ui/build/static/js/main.98516614.js.map +0 -1
  50. xinference/web/ui/node_modules/.cache/babel-loader/0bd70b1ecf307e2681318e864f4692305b6350c8683863007f4caf2f9ac33b6e.json +0 -1
  51. xinference/web/ui/node_modules/.cache/babel-loader/0db651c046ef908f45cde73af0dbea0a797d3e35bb57f4a0863b481502103a64.json +0 -1
  52. xinference/web/ui/node_modules/.cache/babel-loader/139969fd25258eb7decc9505f30b779089bba50c402bb5c663008477c7bff73b.json +0 -1
  53. xinference/web/ui/node_modules/.cache/babel-loader/18e5d5422e2464abf4a3e6d38164570e2e426e0a921e9a2628bbae81b18da353.json +0 -1
  54. xinference/web/ui/node_modules/.cache/babel-loader/3d93bd9a74a1ab0cec85af40f9baa5f6a8e7384b9e18c409b95a81a7b45bb7e2.json +0 -1
  55. xinference/web/ui/node_modules/.cache/babel-loader/3e055de705e397e1d413d7f429589b1a98dd78ef378b97f0cdb462c5f2487d5e.json +0 -1
  56. xinference/web/ui/node_modules/.cache/babel-loader/3f357ab57b8e7fade54c667f0e0ebf2787566f72bfdca0fea14e395b5c203753.json +0 -1
  57. xinference/web/ui/node_modules/.cache/babel-loader/4fd24800544873512b540544ae54601240a5bfefd9105ff647855c64f8ad828f.json +0 -1
  58. xinference/web/ui/node_modules/.cache/babel-loader/52aa27272b4b9968f62666262b47661cb1992336a2aff3b13994cc36877b3ec3.json +0 -1
  59. xinference/web/ui/node_modules/.cache/babel-loader/60c4b98d8ea7479fb0c94cfd19c8128f17bd7e27a1e73e6dd9adf6e9d88d18eb.json +0 -1
  60. xinference/web/ui/node_modules/.cache/babel-loader/7e094845f611802b024b57439cbf911038169d06cdf6c34a72a7277f35aa71a4.json +0 -1
  61. xinference/web/ui/node_modules/.cache/babel-loader/95c8cc049fadd23085d8623e1d43d70b614a4e52217676f186a417dca894aa09.json +0 -1
  62. xinference/web/ui/node_modules/.cache/babel-loader/98b7ef307f436affe13d75a4f265b27e828ccc2b10ffae6513abe2681bc11971.json +0 -1
  63. xinference/web/ui/node_modules/.cache/babel-loader/9d7c49815d97539207e5aab2fb967591b5fed7791218a0762539efc9491f36af.json +0 -1
  64. xinference/web/ui/node_modules/.cache/babel-loader/a8070ce4b780b4a044218536e158a9e7192a6c80ff593fdc126fee43f46296b5.json +0 -1
  65. xinference/web/ui/node_modules/.cache/babel-loader/b400cfc9db57fa6c70cd2bad055b73c5079fde0ed37974009d898083f6af8cd8.json +0 -1
  66. xinference/web/ui/node_modules/.cache/babel-loader/bd04667474fd9cac2983b03725c218908a6cc0ee9128a5953cd00d26d4877f60.json +0 -1
  67. xinference/web/ui/node_modules/.cache/babel-loader/c230a727b8f68f0e62616a75e14a3d33026dc4164f2e325a9a8072d733850edb.json +0 -1
  68. xinference/web/ui/node_modules/.cache/babel-loader/d0d0b591d9adaf42b83ad6633f8b7c118541a4b80ea957c303d3bf9b86fbad0a.json +0 -1
  69. xinference/web/ui/node_modules/.cache/babel-loader/d44a6eb6106e09082b691a315c9f6ce17fcfe25beb7547810e0d271ce3301cd2.json +0 -1
  70. xinference/web/ui/node_modules/.cache/babel-loader/e1d9b2ae4e1248658704bc6bfc5d6160dcd1a9e771ea4ae8c1fed0aaddeedd29.json +0 -1
  71. xinference/web/ui/node_modules/.cache/babel-loader/fe5db70859503a54cbe71f9637e5a314cda88b1f0eecb733b6e6f837697db1ef.json +0 -1
  72. /xinference/web/ui/build/static/js/{main.98516614.js.LICENSE.txt → main.76ef2b17.js.LICENSE.txt} +0 -0
  73. {xinference-0.10.0.dist-info → xinference-0.10.1.dist-info}/LICENSE +0 -0
  74. {xinference-0.10.0.dist-info → xinference-0.10.1.dist-info}/WHEEL +0 -0
  75. {xinference-0.10.0.dist-info → xinference-0.10.1.dist-info}/entry_points.txt +0 -0
  76. {xinference-0.10.0.dist-info → xinference-0.10.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import{Navigate,useRoutes}from'react-router-dom';import Layout from'../scenes/_layout';import ClusterInfo from'../scenes/cluster_info';import LaunchModel from'../scenes/launch_model';import Login from'../scenes/login/login';import RegisterModel from'../scenes/register_model';import RunningModels from'../scenes/running_models';import{jsx as _jsx}from\"react/jsx-runtime\";var routes=[{path:'/',element:/*#__PURE__*/_jsx(Layout,{}),children:[{path:'/',element:/*#__PURE__*/_jsx(Navigate,{to:\"launch_model/llm\",replace:true})},{path:'launch_model/:Modeltype/:subType?',element:/*#__PURE__*/_jsx(LaunchModel,{})},{path:'running_models/:runningModelType',element:/*#__PURE__*/_jsx(RunningModels,{})},{path:'register_model',element:/*#__PURE__*/_jsx(RegisterModel,{})},{path:'cluster_info',element:/*#__PURE__*/_jsx(ClusterInfo,{})}]},{path:'/login',element:/*#__PURE__*/_jsx(Login,{})},{path:'*',element:/*#__PURE__*/_jsx(Navigate,{to:\"launch_model/llm\",replace:true})}];var WraperRoutes=function WraperRoutes(){var element=useRoutes(routes);return element;};export default WraperRoutes;","map":{"version":3,"names":["Navigate","useRoutes","Layout","ClusterInfo","LaunchModel","Login","RegisterModel","RunningModels","jsx","_jsx","routes","path","element","children","to","replace","WraperRoutes"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/router/index.js"],"sourcesContent":["import { Navigate, useRoutes } from 'react-router-dom'\n\nimport Layout from '../scenes/_layout'\nimport ClusterInfo from '../scenes/cluster_info'\nimport LaunchModel from '../scenes/launch_model'\nimport Login from '../scenes/login/login'\nimport RegisterModel from '../scenes/register_model'\nimport RunningModels from '../scenes/running_models'\n\nconst routes = [\n {\n path: '/',\n element: <Layout />,\n children: [\n {\n path: '/',\n element: <Navigate to=\"launch_model/llm\" replace />,\n },\n {\n path: 'launch_model/:Modeltype/:subType?',\n element: <LaunchModel />,\n },\n {\n path: 'running_models/:runningModelType',\n element: <RunningModels />,\n },\n {\n path: 'register_model',\n element: <RegisterModel />,\n },\n {\n path: 'cluster_info',\n element: <ClusterInfo />,\n },\n ],\n },\n {\n path: '/login',\n element: <Login />,\n },\n {\n path: '*',\n element: <Navigate to=\"launch_model/llm\" replace />,\n },\n]\nconst WraperRoutes = () => {\n let element = useRoutes(routes)\n return element\n}\n\nexport default WraperRoutes\n"],"mappings":"AAAA,OAASA,QAAQ,CAAEC,SAAS,KAAQ,kBAAkB,CAEtD,MAAO,CAAAC,MAAM,KAAM,mBAAmB,CACtC,MAAO,CAAAC,WAAW,KAAM,wBAAwB,CAChD,MAAO,CAAAC,WAAW,KAAM,wBAAwB,CAChD,MAAO,CAAAC,KAAK,KAAM,uBAAuB,CACzC,MAAO,CAAAC,aAAa,KAAM,0BAA0B,CACpD,MAAO,CAAAC,aAAa,KAAM,0BAA0B,QAAAC,GAAA,IAAAC,IAAA,yBAEpD,GAAM,CAAAC,MAAM,CAAG,CACb,CACEC,IAAI,CAAE,GAAG,CACTC,OAAO,cAAEH,IAAA,CAACP,MAAM,GAAE,CAAC,CACnBW,QAAQ,CAAE,CACR,CACEF,IAAI,CAAE,GAAG,CACTC,OAAO,cAAEH,IAAA,CAACT,QAAQ,EAACc,EAAE,CAAC,kBAAkB,CAACC,OAAO,MAAE,CACpD,CAAC,CACD,CACEJ,IAAI,CAAE,mCAAmC,CACzCC,OAAO,cAAEH,IAAA,CAACL,WAAW,GAAE,CACzB,CAAC,CACD,CACEO,IAAI,CAAE,kCAAkC,CACxCC,OAAO,cAAEH,IAAA,CAACF,aAAa,GAAE,CAC3B,CAAC,CACD,CACEI,IAAI,CAAE,gBAAgB,CACtBC,OAAO,cAAEH,IAAA,CAACH,aAAa,GAAE,CAC3B,CAAC,CACD,CACEK,IAAI,CAAE,cAAc,CACpBC,OAAO,cAAEH,IAAA,CAACN,WAAW,GAAE,CACzB,CAAC,CAEL,CAAC,CACD,CACEQ,IAAI,CAAE,QAAQ,CACdC,OAAO,cAAEH,IAAA,CAACJ,KAAK,GAAE,CACnB,CAAC,CACD,CACEM,IAAI,CAAE,GAAG,CACTC,OAAO,cAAEH,IAAA,CAACT,QAAQ,EAACc,EAAE,CAAC,kBAAkB,CAACC,OAAO,MAAE,CACpD,CAAC,CACF,CACD,GAAM,CAAAC,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAS,CACzB,GAAI,CAAAJ,OAAO,CAAGX,SAAS,CAACS,MAAM,CAAC,CAC/B,MAAO,CAAAE,OAAO,CAChB,CAAC,CAED,cAAe,CAAAI,YAAY"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _defineProperty from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{AddCircle,ChatOutlined,EditNoteOutlined,ExpandLess,ExpandMore,HelpCenterOutlined,RocketLaunchOutlined,UndoOutlined}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Alert,Box,Chip,CircularProgress,Collapse,Drawer,FormControl,Grid,IconButton,InputLabel,ListItemButton,ListItemText,MenuItem,Select,Snackbar,Stack,TextField}from'@mui/material';import Paper from'@mui/material/Paper';import React,{useContext,useEffect,useRef,useState}from'react';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import TitleTypography from'../../components/titleTypography';import styles from'./styles/modelCardStyle';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var ModelCard=function ModelCard(_ref){var url=_ref.url,modelData=_ref.modelData,gpuAvailable=_ref.gpuAvailable,modelType=_ref.modelType,_ref$is_custom=_ref.is_custom,is_custom=_ref$is_custom===void 0?false:_ref$is_custom;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),hover=_useState2[0],setHover=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),selected=_useState4[0],setSelected=_useState4[1];var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),requestLimitsAlert=_useState6[0],setRequestLimitsAlert=_useState6[1];var _useState7=useState(false),_useState8=_slicedToArray(_useState7,2),GPUIdxAlert=_useState8[0],setGPUIdxAlert=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isOther=_useState10[0],setIsOther=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isNotUnique=_useState12[0],setisNotUnique=_useState12[1];var _useState13=useState(-1),_useState14=_slicedToArray(_useState13,2),defaultIndex=_useState14[0],setDefaultIndex=_useState14[1];var _useState15=useState(false),_useState16=_slicedToArray(_useState15,2),openSnackbar=_useState16[0],setOpenSnackbar=_useState16[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var navigate=useNavigate();// Model parameter selections\nvar _useState17=useState(''),_useState18=_slicedToArray(_useState17,2),modelUID=_useState18[0],setModelUID=_useState18[1];var _useState19=useState(''),_useState20=_slicedToArray(_useState19,2),modelFormat=_useState20[0],setModelFormat=_useState20[1];var _useState21=useState(''),_useState22=_slicedToArray(_useState21,2),modelSize=_useState22[0],setModelSize=_useState22[1];var _useState23=useState(''),_useState24=_slicedToArray(_useState23,2),quantization=_useState24[0],setQuantization=_useState24[1];var _useState25=useState('auto'),_useState26=_slicedToArray(_useState25,2),nGPU=_useState26[0],setNGPU=_useState26[1];var _useState27=useState(-1),_useState28=_slicedToArray(_useState27,2),nGPULayers=_useState28[0],setNGPULayers=_useState28[1];var _useState29=useState(1),_useState30=_slicedToArray(_useState29,2),replica=_useState30[0],setReplica=_useState30[1];var _useState31=useState(''),_useState32=_slicedToArray(_useState31,2),requestLimits=_useState32[0],setRequestLimits=_useState32[1];var _useState33=useState(''),_useState34=_slicedToArray(_useState33,2),peftModelPath=_useState34[0],setPeftModelPath=_useState34[1];var _useState35=useState(''),_useState36=_slicedToArray(_useState35,2),imageLoraLoadKwargs=_useState36[0],setImageLoraLoadKwargs=_useState36[1];var _useState37=useState(''),_useState38=_slicedToArray(_useState37,2),imageLoraFuseKwargs=_useState38[0],setImageLoraFuseKwargs=_useState38[1];var _useState39=useState(''),_useState40=_slicedToArray(_useState39,2),workerIp=_useState40[0],setWorkerIp=_useState40[1];var _useState41=useState(''),_useState42=_slicedToArray(_useState41,2),GPUIdx=_useState42[0],setGPUIdx=_useState42[1];var _useState43=useState([]),_useState44=_slicedToArray(_useState43,2),formatOptions=_useState44[0],setFormatOptions=_useState44[1];var _useState45=useState([]),_useState46=_slicedToArray(_useState45,2),sizeOptions=_useState46[0],setSizeOptions=_useState46[1];var _useState47=useState([]),_useState48=_slicedToArray(_useState47,2),quantizationOptions=_useState48[0],setQuantizationOptions=_useState48[1];var _useState49=useState(false),_useState50=_slicedToArray(_useState49,2),customDeleted=_useState50[0],setCustomDeleted=_useState50[1];var _useState51=useState([]),_useState52=_slicedToArray(_useState51,2),customParametersArr=_useState52[0],setCustomParametersArr=_useState52[1];var _useState53=useState(0),_useState54=_slicedToArray(_useState53,2),arrId=_useState54[0],setArrId=_useState54[1];var parentRef=useRef(null);var range=function range(start,end){return new Array(end-start+1).fill(undefined).map(function(_,i){return i+start;});};var isCached=function isCached(spec){if(spec.model_format==='pytorch'){return spec.cache_status&&spec.cache_status===true;}else{return spec.cache_status&&spec.cache_status.some(function(cs){return cs;});}};// model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\nvar convertModelSize=function convertModelSize(size){return size.toString().includes('_')?size:parseInt(size,10);};// UseEffects for parameter selection, change options based on previous selections\nuseEffect(function(){if(modelData){if(modelData.model_specs){var modelFamily=modelData.model_specs;var formats=_toConsumableArray(new Set(modelFamily.map(function(spec){return spec.model_format;})));setFormatOptions(formats);}}},[modelData]);useEffect(function(){if(modelFormat&&modelData){var modelFamily=modelData.model_specs;var sizes=_toConsumableArray(new Set(modelFamily.filter(function(spec){return spec.model_format===modelFormat;}).map(function(spec){return spec.model_size_in_billions;})));setSizeOptions(sizes);}},[modelFormat,modelData]);useEffect(function(){if(modelFormat&&modelSize&&modelData){var modelFamily=modelData.model_specs;var quants=_toConsumableArray(new Set(modelFamily.filter(function(spec){return spec.model_format===modelFormat&&spec.model_size_in_billions===convertModelSize(modelSize);}).flatMap(function(spec){return spec.quantizations;})));setQuantizationOptions(quants);}},[modelFormat,modelSize,modelData]);useEffect(function(){if(parentRef.current){parentRef.current.scrollTo({top:parentRef.current.scrollHeight,behavior:'smooth'});}},[customParametersArr]);var getNGPURange=function getNGPURange(){if(gpuAvailable===0){// remain 'auto' for distributed situation\nreturn['auto','CPU'];}return['auto','CPU'].concat(range(1,gpuAvailable));};var launchModel=function launchModel(url){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);var modelDataWithID1={// If user does not fill model_uid, pass null (None) to server and server generates it.\nmodel_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_type:modelType,model_format:modelFormat,model_size_in_billions:convertModelSize(modelSize),quantization:quantization,n_gpu:parseInt(nGPU,10)===0||nGPU==='CPU'?null:nGPU==='auto'?'auto':parseInt(nGPU,10),replica:replica,request_limits:requestLimits.trim()===''?null:Number(requestLimits.trim()),peft_model_path:peftModelPath.trim()===''?null:peftModelPath.trim(),image_lora_load_kwargs:imageLoraLoadKwargs.trim()===''?null:imageLoraLoadKwargs.trim(),image_lora_fuse_kwargs:imageLoraFuseKwargs.trim()===''?null:imageLoraFuseKwargs.trim(),worker_ip:workerIp.trim()===''?null:workerIp.trim(),gpu_idx:GPUIdx.trim()===''?null:handleGPUIdx(GPUIdx.trim())};var modelDataWithID2={model_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_type:modelType};if(nGPULayers>=0){modelDataWithID1.n_gpu_layers=nGPULayers;}if(customParametersArr.length){customParametersArr.forEach(function(item){modelDataWithID1[item.key]=handleValueType(item.value);});}var modelDataWithID=modelType==='LLM'?modelDataWithID1:modelDataWithID2;// First fetcher request to initiate the model\nfetcher(url+'/v1/models',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(modelDataWithID)}).then(function(response){if(!response.ok){// Assuming the server returns error details in JSON format\nresponse.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{navigate(\"/running_models/\".concat(modelType));sessionStorage.setItem('runningModelType',\"/running_models/\".concat(modelType));}setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});};var handleGPUIdx=function handleGPUIdx(data){var arr=[];data.split(',').forEach(function(item){arr.push(Number(item));});return arr;};var handeCustomDelete=function handeCustomDelete(e){e.stopPropagation();fetcher(url+\"/v1/model_registrations/LLM/\".concat(modelData.model_name),{method:'DELETE',headers:{'Content-Type':'application/json'}}).then(function(){setCustomDeleted(true);}).catch(console.error);};var updateCustomParametersArr=function updateCustomParametersArr(index,type,newValue){setCustomParametersArr(customParametersArr.map(function(pair,subIndex){if(subIndex===index){return _objectSpread(_objectSpread({},pair),{},_defineProperty({},type,newValue));}return pair;}));if(type==='key'){setDefaultIndex(-1);setisNotUnique(false);customParametersArr.forEach(function(pair){if(pair.key===newValue){setDefaultIndex(index);setisNotUnique(true);}});}};var judgeCustomParameters=function judgeCustomParameters(){if(customParametersArr.length&&customParametersArr[customParametersArr.length-1].key!==''&&customParametersArr[customParametersArr.length-1].value!==''){return true;}else if(customParametersArr.length===0){return true;}else{return false;}};var handleDeleteCustomParameters=function handleDeleteCustomParameters(index){setDefaultIndex(-1);setCustomParametersArr(customParametersArr.filter(function(pair,subIndex){return index!==subIndex;}));};var handleValueType=function handleValueType(str){if(str.toLowerCase()==='none'){return null;}else if(str.toLowerCase()==='true'){return true;}else if(str.toLowerCase()==='false'){return false;}else if(Number(str)||str!==''&&Number(str)===0){return Number(str);}else{return str;}};// Set two different states based on mouse hover\nreturn/*#__PURE__*/_jsxs(Paper,{style:hover?styles.containerSelected:styles.container,onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);},onClick:function onClick(){if(!selected&&!customDeleted){setSelected(true);}},elevation:hover?24:4,children:[modelType==='LLM'?/*#__PURE__*/_jsxs(Box,{style:styles.descriptionCard,children:[is_custom&&/*#__PURE__*/_jsxs(Stack,{direction:\"row\",spacing:1,useFlexGap:true,children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:handeCustomDelete,disabled:customDeleted,children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),!is_custom&&/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[function(){return modelData.model_lang.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"},v);});}(),function(){if(modelData.model_specs.some(function(spec){return isCached(spec);})){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\"});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{style:styles.p,title:modelData.model_description,children:modelData.model_description}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconRow,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsxs(\"span\",{style:styles.boldIconText,children:[Math.floor(modelData.context_length/1000),\"K\"]}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"context length\"})]}),function(){if(modelData.model_ability.includes('chat')){return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(ChatOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"chat model\"})]});}else if(modelData.model_ability.includes('generate')){return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(EditNoteOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"generate model\"})]});}else{return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(HelpCenterOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"other model\"})]});}}()]})]}):/*#__PURE__*/_jsxs(Box,{style:styles.descriptionCard,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.titleContainer,children:[is_custom&&/*#__PURE__*/_jsxs(Stack,{direction:\"row\",spacing:1,useFlexGap:true,children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:handeCustomDelete,disabled:customDeleted,children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),!is_custom&&/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[function(){if(modelData.language){return modelData.language.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"});});}else if(modelData.model_family){return/*#__PURE__*/_jsx(Chip,{label:modelData.model_family,variant:\"outlined\",size:\"small\"});}}(),function(){if(modelData.cache_status){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\"});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]})]}),modelData.dimensions&&/*#__PURE__*/_jsxs(\"div\",{style:styles.iconRow,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.boldIconText,children:modelData.dimensions}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"dimensions\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.boldIconText,children:modelData.max_tokens}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"max tokens\"})]})]}),!selected&&hover&&/*#__PURE__*/_jsx(\"p\",{style:styles.instructionText,children:\"Click with mouse to launch the model\"})]}),/*#__PURE__*/_jsx(Drawer,{open:selected,onClose:function onClose(){return setSelected(false);},anchor:'right',children:/*#__PURE__*/_jsxs(\"div\",{style:styles.drawerCard,children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),modelType==='LLM'?/*#__PURE__*/_jsx(Box,{ref:parentRef,style:styles.formContainer,display:\"flex\",flexDirection:\"column\",width:\"100%\",mx:\"auto\",children:/*#__PURE__*/_jsxs(Grid,{rowSpacing:0,columnSpacing:1,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelFormat-label\",children:\"Model Format\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelFormat-label\",value:modelFormat,onChange:function onChange(e){return setModelFormat(e.target.value);},label:\"Model Format\",children:formatOptions.map(function(format){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===format;});var cached=specs.some(function(spec){return isCached(spec);});var displayedFormat=cached?format+' (cached)':format;return/*#__PURE__*/_jsx(MenuItem,{value:format,children:displayedFormat},format);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelSize-label\",children:\"Model Size\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelSize-label\",value:modelSize,onChange:function onChange(e){return setModelSize(e.target.value);},label:\"Model Size\",children:sizeOptions.map(function(size){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===size;});var cached=specs.some(function(spec){return isCached(spec);});var displayedSize=cached?size+' (cached)':size;return/*#__PURE__*/_jsx(MenuItem,{value:size,children:displayedSize},size);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"Quantization\"}),/*#__PURE__*/_jsx(Select,{labelId:\"quantization-label\",value:quantization,onChange:function onChange(e){return setQuantization(e.target.value);},label:\"Quantization\",children:quantizationOptions.map(function(quant,index){var _specs$0$cache_status,_specs$,_specs$0$cache_status2,_specs$2,_specs$2$cache_status;var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===convertModelSize(modelSize);});var cached=modelFormat==='pytorch'?(_specs$0$cache_status=(_specs$=specs[0])===null||_specs$===void 0?void 0:_specs$.cache_status)!==null&&_specs$0$cache_status!==void 0?_specs$0$cache_status:false===true:(_specs$0$cache_status2=(_specs$2=specs[0])===null||_specs$2===void 0?void 0:(_specs$2$cache_status=_specs$2.cache_status)===null||_specs$2$cache_status===void 0?void 0:_specs$2$cache_status[index])!==null&&_specs$0$cache_status2!==void 0?_specs$0$cache_status2:false===true;var displayedQuant=cached?quant+' (cached)':quant;return/*#__PURE__*/_jsx(MenuItem,{value:quant,children:displayedQuant},quant);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:modelFormat!=='ggufv2'&&modelFormat!=='ggmlv3'?/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize||!quantization,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"N-GPU\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGPU,onChange:function onChange(e){return setNGPU(e.target.value);},label:\"N-GPU\",children:getNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}):/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",label:\"N GPU Layers\",InputProps:{inputProps:{min:-1}},value:nGPULayers,onChange:function onChange(e){return setNGPULayers(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){return setIsOther(!isOther);},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Optional Configurations\"}),isOther?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]}),/*#__PURE__*/_jsxs(Collapse,{in:isOther,timeout:\"auto\",unmountOnExit:true,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:requestLimits,label:\"(Optional) Request Limits, the number of request limits for this model\\uFF0Cdefault is None\",onChange:function onChange(e){setRequestLimitsAlert(false);setRequestLimits(e.target.value);if(e.target.value!==''&&(!Number(e.target.value)||Number(e.target.value)<1||parseInt(e.target.value)!==parseFloat(e.target.value))){setRequestLimitsAlert(true);}}}),requestLimitsAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0\"})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:peftModelPath,label:\"(Optional) Peft Model Path, PEFT (Parameter-Efficient Fine-Tuning) model path\",onChange:function onChange(e){return setPeftModelPath(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:imageLoraLoadKwargs,label:\"(Optional) Image Lora Load Kwargs, lora load parameters for image model\",onChange:function onChange(e){return setImageLoraLoadKwargs(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:imageLoraFuseKwargs,label:\"(Optional) Image Lora Fuse Kwargs, lora fuse parameters for image model\",onChange:function onChange(e){return setImageLoraFuseKwargs(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"(Optional) GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]})})]}),/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',margin:'10px 0 0 15px'},children:[/*#__PURE__*/_jsx(\"div\",{children:\"Additional parameters passed to the inference engine\"}),/*#__PURE__*/_jsx(IconButton,{color:\"primary\",onClick:function onClick(){setArrId(arrId+1);judgeCustomParameters()?setCustomParametersArr([].concat(_toConsumableArray(customParametersArr),[{id:arrId,key:'',value:''}])):setOpenSnackbar(true);},children:/*#__PURE__*/_jsx(AddCircle,{})})]}),/*#__PURE__*/_jsx(Box,{children:customParametersArr.map(function(item,index){return/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',justifyContent:'space-between',alignItems:'center',marginTop:'10px'},children:[/*#__PURE__*/_jsx(TextField,{label:\"key\",value:item.key,onChange:function onChange(e){updateCustomParametersArr(index,'key',e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(TextField,{label:\"value\",value:item.value,onChange:function onChange(e){updateCustomParametersArr(index,'value',e.target.value);},style:{width:'44%'}}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(){return handleDeleteCustomParameters(index);},style:{marginLeft:'10px'},children:/*#__PURE__*/_jsx(DeleteIcon,{})})]},item.id),isNotUnique&&defaultIndex===index&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"key must be unique\"})]});})})]})]})}):/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}})}),/*#__PURE__*/_jsxs(Box,{style:styles.buttonsContainer,children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch\",style:styles.buttonContainer,onClick:function onClick(){return launchModel(url,modelData);},disabled:modelType==='LLM'&&(isCallingApi||isUpdatingModel||!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))||!judgeCustomParameters()||defaultIndex!==-1||requestLimitsAlert||GPUIdxAlert),children:function(){if(isCallingApi||isUpdatingModel){return/*#__PURE__*/_jsx(Box,{style:_objectSpread(_objectSpread({},styles.buttonItem),{},{backgroundColor:'#f2f2f2'}),children:/*#__PURE__*/_jsx(CircularProgress,{size:\"20px\",sx:{color:'#000000'}})});}else if(!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))){return/*#__PURE__*/_jsx(Box,{style:_objectSpread(_objectSpread({},styles.buttonItem),{},{backgroundColor:'#f2f2f2'}),children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{size:\"20px\"})});}else{return/*#__PURE__*/_jsx(Box,{style:styles.buttonItem,children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{color:\"#000000\",size:\"20px\"})});}}()}),/*#__PURE__*/_jsx(\"button\",{title:\"Go Back\",style:styles.buttonContainer,onClick:function onClick(){return setSelected(false);},children:/*#__PURE__*/_jsx(Box,{style:styles.buttonItem,children:/*#__PURE__*/_jsx(UndoOutlined,{color:\"#000000\",size:\"20px\"})})})]})]})}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:\"Please fill in the added custom parameters completely!\"},'top'+'center')]});};export default ModelCard;","map":{"version":3,"names":["AddCircle","ChatOutlined","EditNoteOutlined","ExpandLess","ExpandMore","HelpCenterOutlined","RocketLaunchOutlined","UndoOutlined","DeleteIcon","Alert","Box","Chip","CircularProgress","Collapse","Drawer","FormControl","Grid","IconButton","InputLabel","ListItemButton","ListItemText","MenuItem","Select","Snackbar","Stack","TextField","Paper","React","useContext","useEffect","useRef","useState","useNavigate","ApiContext","fetcher","TitleTypography","styles","jsx","_jsx","jsxs","_jsxs","ModelCard","_ref","url","modelData","gpuAvailable","modelType","_ref$is_custom","is_custom","_useState","_useState2","_slicedToArray","hover","setHover","_useState3","_useState4","selected","setSelected","_useState5","_useState6","requestLimitsAlert","setRequestLimitsAlert","_useState7","_useState8","GPUIdxAlert","setGPUIdxAlert","_useState9","_useState10","isOther","setIsOther","_useState11","_useState12","isNotUnique","setisNotUnique","_useState13","_useState14","defaultIndex","setDefaultIndex","_useState15","_useState16","openSnackbar","setOpenSnackbar","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","navigate","_useState17","_useState18","modelUID","setModelUID","_useState19","_useState20","modelFormat","setModelFormat","_useState21","_useState22","modelSize","setModelSize","_useState23","_useState24","quantization","setQuantization","_useState25","_useState26","nGPU","setNGPU","_useState27","_useState28","nGPULayers","setNGPULayers","_useState29","_useState30","replica","setReplica","_useState31","_useState32","requestLimits","setRequestLimits","_useState33","_useState34","peftModelPath","setPeftModelPath","_useState35","_useState36","imageLoraLoadKwargs","setImageLoraLoadKwargs","_useState37","_useState38","imageLoraFuseKwargs","setImageLoraFuseKwargs","_useState39","_useState40","workerIp","setWorkerIp","_useState41","_useState42","GPUIdx","setGPUIdx","_useState43","_useState44","formatOptions","setFormatOptions","_useState45","_useState46","sizeOptions","setSizeOptions","_useState47","_useState48","quantizationOptions","setQuantizationOptions","_useState49","_useState50","customDeleted","setCustomDeleted","_useState51","_useState52","customParametersArr","setCustomParametersArr","_useState53","_useState54","arrId","setArrId","parentRef","range","start","end","Array","fill","undefined","map","_","i","isCached","spec","model_format","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","model_specs","modelFamily","formats","_toConsumableArray","Set","sizes","filter","model_size_in_billions","quants","flatMap","quantizations","current","scrollTo","top","scrollHeight","behavior","getNGPURange","concat","launchModel","modelDataWithID1","model_uid","trim","model_name","model_type","n_gpu","request_limits","Number","peft_model_path","image_lora_load_kwargs","image_lora_fuse_kwargs","worker_ip","gpu_idx","handleGPUIdx","modelDataWithID2","n_gpu_layers","length","forEach","item","key","handleValueType","value","modelDataWithID","method","headers","body","JSON","stringify","then","response","ok","json","errorData","status","detail","sessionStorage","setItem","catch","error","console","data","arr","split","push","handeCustomDelete","e","stopPropagation","updateCustomParametersArr","index","type","newValue","pair","subIndex","_objectSpread","_defineProperty","judgeCustomParameters","handleDeleteCustomParameters","str","toLowerCase","style","containerSelected","container","onMouseEnter","onMouseLeave","onClick","elevation","children","descriptionCard","direction","spacing","useFlexGap","disabled","flexWrap","sx","marginLeft","model_lang","v","label","variant","model_description","p","title","iconRow","iconItem","boldIconText","Math","floor","context_length","smallText","model_ability","muiIcon","titleContainer","language","model_family","dimensions","max_tokens","instructionText","open","onClose","anchor","drawerCard","ref","formContainer","display","flexDirection","width","mx","rowSpacing","columnSpacing","xs","margin","fullWidth","id","labelId","onChange","target","format","specs","cached","displayedFormat","displayedSize","quant","_specs$0$cache_status","_specs$","_specs$0$cache_status2","_specs$2","_specs$2$cache_status","displayedQuant","InputProps","inputProps","min","primary","in","timeout","unmountOnExit","parseFloat","severity","regular","test","alignItems","color","justifyContent","marginTop","buttonsContainer","buttonContainer","is_builtin","buttonItem","backgroundColor","anchorOrigin","vertical","horizontal","message"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/modelCard.js"],"sourcesContent":["import {\n AddCircle,\n ChatOutlined,\n EditNoteOutlined,\n ExpandLess,\n ExpandMore,\n HelpCenterOutlined,\n RocketLaunchOutlined,\n UndoOutlined,\n} from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Alert,\n Box,\n Chip,\n CircularProgress,\n Collapse,\n Drawer,\n FormControl,\n Grid,\n IconButton,\n InputLabel,\n ListItemButton,\n ListItemText,\n MenuItem,\n Select,\n Snackbar,\n Stack,\n TextField,\n} from '@mui/material'\nimport Paper from '@mui/material/Paper'\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\nimport TitleTypography from '../../components/titleTypography'\nimport styles from './styles/modelCardStyle'\n\nconst ModelCard = ({\n url,\n modelData,\n gpuAvailable,\n modelType,\n is_custom = false,\n}) => {\n const [hover, setHover] = useState(false)\n const [selected, setSelected] = useState(false)\n const [requestLimitsAlert, setRequestLimitsAlert] = useState(false)\n const [GPUIdxAlert, setGPUIdxAlert] = useState(false)\n const [isOther, setIsOther] = useState(false)\n const [isNotUnique, setisNotUnique] = useState(false)\n const [defaultIndex, setDefaultIndex] = useState(-1)\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const navigate = useNavigate()\n\n // Model parameter selections\n const [modelUID, setModelUID] = useState('')\n const [modelFormat, setModelFormat] = useState('')\n const [modelSize, setModelSize] = useState('')\n const [quantization, setQuantization] = useState('')\n const [nGPU, setNGPU] = useState('auto')\n const [nGPULayers, setNGPULayers] = useState(-1)\n const [replica, setReplica] = useState(1)\n const [requestLimits, setRequestLimits] = useState('')\n const [peftModelPath, setPeftModelPath] = useState('')\n const [imageLoraLoadKwargs, setImageLoraLoadKwargs] = useState('')\n const [imageLoraFuseKwargs, setImageLoraFuseKwargs] = useState('')\n const [workerIp, setWorkerIp] = useState('')\n const [GPUIdx, setGPUIdx] = useState('')\n\n const [formatOptions, setFormatOptions] = useState([])\n const [sizeOptions, setSizeOptions] = useState([])\n const [quantizationOptions, setQuantizationOptions] = useState([])\n const [customDeleted, setCustomDeleted] = useState(false)\n const [customParametersArr, setCustomParametersArr] = useState([])\n const [arrId, setArrId] = useState(0)\n\n const parentRef = useRef(null)\n\n const range = (start, end) => {\n return new Array(end - start + 1).fill(undefined).map((_, i) => i + start)\n }\n\n const isCached = (spec) => {\n if (spec.model_format === 'pytorch') {\n return spec.cache_status && spec.cache_status === true\n } else {\n return spec.cache_status && spec.cache_status.some((cs) => cs)\n }\n }\n\n // model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\n const convertModelSize = (size) => {\n return size.toString().includes('_') ? size : parseInt(size, 10)\n }\n\n // UseEffects for parameter selection, change options based on previous selections\n useEffect(() => {\n if (modelData) {\n if (modelData.model_specs) {\n const modelFamily = modelData.model_specs\n const formats = [\n ...new Set(modelFamily.map((spec) => spec.model_format)),\n ]\n setFormatOptions(formats)\n }\n }\n }, [modelData])\n\n useEffect(() => {\n if (modelFormat && modelData) {\n const modelFamily = modelData.model_specs\n const sizes = [\n ...new Set(\n modelFamily\n .filter((spec) => spec.model_format === modelFormat)\n .map((spec) => spec.model_size_in_billions)\n ),\n ]\n setSizeOptions(sizes)\n }\n }, [modelFormat, modelData])\n\n useEffect(() => {\n if (modelFormat && modelSize && modelData) {\n const modelFamily = modelData.model_specs\n const quants = [\n ...new Set(\n modelFamily\n .filter(\n (spec) =>\n spec.model_format === modelFormat &&\n spec.model_size_in_billions === convertModelSize(modelSize)\n )\n .flatMap((spec) => spec.quantizations)\n ),\n ]\n setQuantizationOptions(quants)\n }\n }, [modelFormat, modelSize, modelData])\n\n useEffect(() => {\n if (parentRef.current) {\n parentRef.current.scrollTo({\n top: parentRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n }, [customParametersArr])\n\n const getNGPURange = () => {\n if (gpuAvailable === 0) {\n // remain 'auto' for distributed situation\n return ['auto', 'CPU']\n }\n return ['auto', 'CPU'].concat(range(1, gpuAvailable))\n }\n\n const launchModel = (url) => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n\n const modelDataWithID1 = {\n // If user does not fill model_uid, pass null (None) to server and server generates it.\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n model_format: modelFormat,\n model_size_in_billions: convertModelSize(modelSize),\n quantization: quantization,\n n_gpu:\n parseInt(nGPU, 10) === 0 || nGPU === 'CPU'\n ? null\n : nGPU === 'auto'\n ? 'auto'\n : parseInt(nGPU, 10),\n replica: replica,\n request_limits:\n requestLimits.trim() === '' ? null : Number(requestLimits.trim()),\n peft_model_path:\n peftModelPath.trim() === '' ? null : peftModelPath.trim(),\n image_lora_load_kwargs:\n imageLoraLoadKwargs.trim() === '' ? null : imageLoraLoadKwargs.trim(),\n image_lora_fuse_kwargs:\n imageLoraFuseKwargs.trim() === '' ? null : imageLoraFuseKwargs.trim(),\n worker_ip: workerIp.trim() === '' ? null : workerIp.trim(),\n gpu_idx: GPUIdx.trim() === '' ? null : handleGPUIdx(GPUIdx.trim()),\n }\n\n const modelDataWithID2 = {\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n }\n\n if (nGPULayers >= 0) {\n modelDataWithID1.n_gpu_layers = nGPULayers\n }\n\n if (customParametersArr.length) {\n customParametersArr.forEach((item) => {\n modelDataWithID1[item.key] = handleValueType(item.value)\n })\n }\n\n const modelDataWithID =\n modelType === 'LLM' ? modelDataWithID1 : modelDataWithID2\n\n // First fetcher request to initiate the model\n fetcher(url + '/v1/models', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(modelDataWithID),\n })\n .then((response) => {\n if (!response.ok) {\n // Assuming the server returns error details in JSON format\n response.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n navigate(`/running_models/${modelType}`)\n sessionStorage.setItem(\n 'runningModelType',\n `/running_models/${modelType}`\n )\n }\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }\n\n const handleGPUIdx = (data) => {\n const arr = []\n data.split(',').forEach((item) => {\n arr.push(Number(item))\n })\n return arr\n }\n\n const handeCustomDelete = (e) => {\n e.stopPropagation()\n fetcher(url + `/v1/model_registrations/LLM/${modelData.model_name}`, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n .then(() => {\n setCustomDeleted(true)\n })\n .catch(console.error)\n }\n\n const updateCustomParametersArr = (index, type, newValue) => {\n setCustomParametersArr(\n customParametersArr.map((pair, subIndex) => {\n if (subIndex === index) {\n return { ...pair, [type]: newValue }\n }\n return pair\n })\n )\n if (type === 'key') {\n setDefaultIndex(-1)\n setisNotUnique(false)\n customParametersArr.forEach((pair) => {\n if (pair.key === newValue) {\n setDefaultIndex(index)\n setisNotUnique(true)\n }\n })\n }\n }\n\n const judgeCustomParameters = () => {\n if (\n customParametersArr.length &&\n customParametersArr[customParametersArr.length - 1].key !== '' &&\n customParametersArr[customParametersArr.length - 1].value !== ''\n ) {\n return true\n } else if (customParametersArr.length === 0) {\n return true\n } else {\n return false\n }\n }\n\n const handleDeleteCustomParameters = (index) => {\n setDefaultIndex(-1)\n setCustomParametersArr(\n customParametersArr.filter((pair, subIndex) => {\n return index !== subIndex\n })\n )\n }\n\n const handleValueType = (str) => {\n if (str.toLowerCase() === 'none') {\n return null\n } else if (str.toLowerCase() === 'true') {\n return true\n } else if (str.toLowerCase() === 'false') {\n return false\n } else if (Number(str) || (str !== '' && Number(str) === 0)) {\n return Number(str)\n } else {\n return str\n }\n }\n\n // Set two different states based on mouse hover\n return (\n <Paper\n style={hover ? styles.containerSelected : styles.container}\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n onClick={() => {\n if (!selected && !customDeleted) {\n setSelected(true)\n }\n }}\n elevation={hover ? 24 : 4}\n >\n {modelType === 'LLM' ? (\n <Box style={styles.descriptionCard}>\n {is_custom && (\n <Stack direction=\"row\" spacing={1} useFlexGap>\n <TitleTypography value={modelData.model_name} />\n <IconButton\n aria-label=\"delete\"\n onClick={handeCustomDelete}\n disabled={customDeleted}\n >\n <DeleteIcon />\n </IconButton>\n </Stack>\n )}\n {!is_custom && <TitleTypography value={modelData.model_name} />}\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {(() => {\n return modelData.model_lang.map((v) => {\n return (\n <Chip key={v} label={v} variant=\"outlined\" size=\"small\" />\n )\n })\n })()}\n {(() => {\n if (modelData.model_specs.some((spec) => isCached(spec))) {\n return <Chip label=\"Cached\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p style={styles.p} title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n\n <div style={styles.iconRow}>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>\n {Math.floor(modelData.context_length / 1000)}K\n </span>\n <small style={styles.smallText}>context length</small>\n </div>\n {(() => {\n if (modelData.model_ability.includes('chat')) {\n return (\n <div style={styles.iconItem}>\n <ChatOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>chat model</small>\n </div>\n )\n } else if (modelData.model_ability.includes('generate')) {\n return (\n <div style={styles.iconItem}>\n <EditNoteOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>generate model</small>\n </div>\n )\n } else {\n return (\n <div style={styles.iconItem}>\n <HelpCenterOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>other model</small>\n </div>\n )\n }\n })()}\n </div>\n </Box>\n ) : (\n <Box style={styles.descriptionCard}>\n <div style={styles.titleContainer}>\n {is_custom && (\n <Stack direction=\"row\" spacing={1} useFlexGap>\n <TitleTypography value={modelData.model_name} />\n <IconButton\n aria-label=\"delete\"\n onClick={handeCustomDelete}\n disabled={customDeleted}\n >\n <DeleteIcon />\n </IconButton>\n </Stack>\n )}\n {!is_custom && <TitleTypography value={modelData.model_name} />}\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {(() => {\n if (modelData.language) {\n return modelData.language.map((v) => {\n return <Chip label={v} variant=\"outlined\" size=\"small\" />\n })\n } else if (modelData.model_family) {\n return (\n <Chip\n label={modelData.model_family}\n variant=\"outlined\"\n size=\"small\"\n />\n )\n }\n })()}\n {(() => {\n if (modelData.cache_status) {\n return <Chip label=\"Cached\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n </div>\n {modelData.dimensions && (\n <div style={styles.iconRow}>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>{modelData.dimensions}</span>\n <small style={styles.smallText}>dimensions</small>\n </div>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>{modelData.max_tokens}</span>\n <small style={styles.smallText}>max tokens</small>\n </div>\n </div>\n )}\n {!selected && hover && (\n <p style={styles.instructionText}>\n Click with mouse to launch the model\n </p>\n )}\n </Box>\n )}\n <Drawer\n open={selected}\n onClose={() => setSelected(false)}\n anchor={'right'}\n >\n <div style={styles.drawerCard}>\n <TitleTypography value={modelData.model_name} />\n {modelType === 'LLM' ? (\n <Box\n ref={parentRef}\n style={styles.formContainer}\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n mx=\"auto\"\n >\n <Grid rowSpacing={0} columnSpacing={1}>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"modelFormat-label\">Model Format</InputLabel>\n <Select\n labelId=\"modelFormat-label\"\n value={modelFormat}\n onChange={(e) => setModelFormat(e.target.value)}\n label=\"Model Format\"\n >\n {formatOptions.map((format) => {\n const specs = modelData.model_specs.filter(\n (spec) => spec.model_format === format\n )\n\n const cached = specs.some((spec) => isCached(spec))\n const displayedFormat = cached\n ? format + ' (cached)'\n : format\n\n return (\n <MenuItem key={format} value={format}>\n {displayedFormat}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat}\n >\n <InputLabel id=\"modelSize-label\">Model Size</InputLabel>\n <Select\n labelId=\"modelSize-label\"\n value={modelSize}\n onChange={(e) => setModelSize(e.target.value)}\n label=\"Model Size\"\n >\n {sizeOptions.map((size) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) => spec.model_size_in_billions === size\n )\n const cached = specs.some((spec) => isCached(spec))\n const displayedSize = cached ? size + ' (cached)' : size\n\n return (\n <MenuItem key={size} value={size}>\n {displayedSize}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize}\n >\n <InputLabel id=\"quantization-label\">\n Quantization\n </InputLabel>\n <Select\n labelId=\"quantization-label\"\n value={quantization}\n onChange={(e) => setQuantization(e.target.value)}\n label=\"Quantization\"\n >\n {quantizationOptions.map((quant, index) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) =>\n spec.model_size_in_billions ===\n convertModelSize(modelSize)\n )\n\n const cached =\n modelFormat === 'pytorch'\n ? specs[0]?.cache_status ?? false === true\n : specs[0]?.cache_status?.[index] ?? false === true\n const displayedQuant = cached\n ? quant + ' (cached)'\n : quant\n\n return (\n <MenuItem key={quant} value={quant}>\n {displayedQuant}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n {modelFormat !== 'ggufv2' && modelFormat !== 'ggmlv3' ? (\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize || !quantization}\n >\n <InputLabel id=\"n-gpu-label\">N-GPU</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGPU}\n onChange={(e) => setNGPU(e.target.value)}\n label=\"N-GPU\"\n >\n {getNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n label=\"N GPU Layers\"\n InputProps={{\n inputProps: {\n min: -1,\n },\n }}\n value={nGPULayers}\n onChange={(e) =>\n setNGPULayers(parseInt(e.target.value, 10))\n }\n />\n </FormControl>\n )}\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n </FormControl>\n </Grid>\n <ListItemButton onClick={() => setIsOther(!isOther)}>\n <ListItemText primary=\"Optional Configurations\" />\n {isOther ? <ExpandLess /> : <ExpandMore />}\n </ListItemButton>\n <Collapse in={isOther} timeout=\"auto\" unmountOnExit>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={requestLimits}\n label=\"(Optional) Request Limits, the number of request limits for this model,default is None\"\n onChange={(e) => {\n setRequestLimitsAlert(false)\n setRequestLimits(e.target.value)\n if (\n e.target.value !== '' &&\n (!Number(e.target.value) ||\n Number(e.target.value) < 1 ||\n parseInt(e.target.value) !==\n parseFloat(e.target.value))\n ) {\n setRequestLimitsAlert(true)\n }\n }}\n />\n {requestLimitsAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={peftModelPath}\n label=\"(Optional) Peft Model Path, PEFT (Parameter-Efficient Fine-Tuning) model path\"\n onChange={(e) => setPeftModelPath(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={imageLoraLoadKwargs}\n label=\"(Optional) Image Lora Load Kwargs, lora load parameters for image model\"\n onChange={(e) => setImageLoraLoadKwargs(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={imageLoraFuseKwargs}\n label=\"(Optional) Image Lora Fuse Kwargs, lora fuse parameters for image model\"\n onChange={(e) => setImageLoraFuseKwargs(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"(Optional) GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n </Grid>\n </Collapse>\n <Box>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n margin: '10px 0 0 15px',\n }}\n >\n <div>\n Additional parameters passed to the inference engine\n </div>\n <IconButton\n color=\"primary\"\n onClick={() => {\n setArrId(arrId + 1)\n judgeCustomParameters()\n ? setCustomParametersArr([\n ...customParametersArr,\n { id: arrId, key: '', value: '' },\n ])\n : setOpenSnackbar(true)\n }}\n >\n <AddCircle />\n </IconButton>\n </div>\n <Box>\n {customParametersArr.map((item, index) => {\n return (\n <Box>\n <div\n key={item.id}\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginTop: '10px',\n }}\n >\n <TextField\n label=\"key\"\n value={item.key}\n onChange={(e) => {\n updateCustomParametersArr(\n index,\n 'key',\n e.target.value\n )\n }}\n style={{ width: '44%' }}\n />\n <TextField\n label=\"value\"\n value={item.value}\n onChange={(e) => {\n updateCustomParametersArr(\n index,\n 'value',\n e.target.value\n )\n }}\n style={{ width: '44%' }}\n />\n <IconButton\n aria-label=\"delete\"\n onClick={() =>\n handleDeleteCustomParameters(index)\n }\n style={{ marginLeft: '10px' }}\n >\n <DeleteIcon />\n </IconButton>\n </div>\n {isNotUnique && defaultIndex === index && (\n <Alert severity=\"error\">key must be unique</Alert>\n )}\n </Box>\n )\n })}\n </Box>\n </Box>\n </Grid>\n </Box>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n </FormControl>\n )}\n <Box style={styles.buttonsContainer}>\n <button\n title=\"Launch\"\n style={styles.buttonContainer}\n onClick={() => launchModel(url, modelData)}\n disabled={\n modelType === 'LLM' &&\n (isCallingApi ||\n isUpdatingModel ||\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n ) ||\n !judgeCustomParameters() ||\n defaultIndex !== -1 ||\n requestLimitsAlert ||\n GPUIdxAlert)\n }\n >\n {(() => {\n if (isCallingApi || isUpdatingModel) {\n return (\n <Box\n style={{\n ...styles.buttonItem,\n backgroundColor: '#f2f2f2',\n }}\n >\n <CircularProgress\n size=\"20px\"\n sx={{\n color: '#000000',\n }}\n />\n </Box>\n )\n } else if (\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n )\n ) {\n return (\n <Box\n style={{\n ...styles.buttonItem,\n backgroundColor: '#f2f2f2',\n }}\n >\n <RocketLaunchOutlined size=\"20px\" />\n </Box>\n )\n } else {\n return (\n <Box style={styles.buttonItem}>\n <RocketLaunchOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n )\n }\n })()}\n </button>\n <button\n title=\"Go Back\"\n style={styles.buttonContainer}\n onClick={() => setSelected(false)}\n >\n <Box style={styles.buttonItem}>\n <UndoOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n </button>\n </Box>\n </div>\n </Drawer>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message=\"Please fill in the added custom parameters completely!\"\n key={'top' + 'center'}\n />\n </Paper>\n )\n}\n\nexport default ModelCard\n"],"mappings":"6jBAAA,OACEA,SAAS,CACTC,YAAY,CACZC,gBAAgB,CAChBC,UAAU,CACVC,UAAU,CACVC,kBAAkB,CAClBC,oBAAoB,CACpBC,YAAY,KACP,qBAAqB,CAC5B,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,KAAK,CACLC,GAAG,CACHC,IAAI,CACJC,gBAAgB,CAChBC,QAAQ,CACRC,MAAM,CACNC,WAAW,CACXC,IAAI,CACJC,UAAU,CACVC,UAAU,CACVC,cAAc,CACdC,YAAY,CACZC,QAAQ,CACRC,MAAM,CACNC,QAAQ,CACRC,KAAK,CACLC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CACtE,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,OAAO,KAAM,0BAA0B,CAC9C,MAAO,CAAAC,eAAe,KAAM,kCAAkC,CAC9D,MAAO,CAAAC,MAAM,KAAM,yBAAyB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE5C,GAAM,CAAAC,SAAS,CAAG,QAAZ,CAAAA,SAASA,CAAAC,IAAA,CAMT,IALJ,CAAAC,GAAG,CAAAD,IAAA,CAAHC,GAAG,CACHC,SAAS,CAAAF,IAAA,CAATE,SAAS,CACTC,YAAY,CAAAH,IAAA,CAAZG,YAAY,CACZC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CAAAC,cAAA,CAAAL,IAAA,CACTM,SAAS,CAATA,SAAS,CAAAD,cAAA,UAAG,KAAK,CAAAA,cAAA,CAEjB,IAAAE,SAAA,CAA0BlB,QAAQ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AAC5B,GAAG,EAAC+P,KAAK,CAAErO,MAAM,CAAC4T,UAAW,CAAAhF,QAAA,cAC5B1O,IAAA,CAAC/B,YAAY,EAACmV,KAAK,CAAC,SAAS,CAACnK,IAAI,CAAC,MAAM,CAAE,CAAC,CACzC,CAAC,CACA,CAAC,EACN,CAAC,EACH,CAAC,CACA,CAAC,cACTjJ,IAAA,CAACf,QAAQ,EACP2U,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDrD,IAAI,CAAE/N,YAAa,CACnBgO,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAA/N,eAAe,CAAC,KAAK,CAAC,EAAC,CACtCoR,OAAO,CAAC,wDAAwD,EAC3D,KAAK,CAAG,QACd,CAAC,EACG,CAAC,CAEZ,CAAC,CAED,cAAe,CAAA5T,SAAS"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"var style={display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'};export default style;","map":{"version":3,"names":["style","display","gridTemplateColumns","paddingLeft","gridGap"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/styles/launchModelStyle.js"],"sourcesContent":["const style = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n}\n\nexport default style\n"],"mappings":"AAAA,GAAM,CAAAA,KAAK,CAAG,CACZC,OAAO,CAAE,MAAM,CACfC,mBAAmB,CAAE,uCAAuC,CAC5DC,WAAW,CAAE,MAAM,CACnBC,OAAO,CAAE,WACX,CAAC,CAED,cAAe,CAAAJ,KAAK"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import ExitToAppIcon from'@mui/icons-material/ExitToApp';import{Box,Stack,Typography}from'@mui/material';import Button from'@mui/material/Button';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{isValidBearerToken}from'./utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Title=function Title(_ref){var title=_ref.title;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],removeCookie=_useCookies2[2];var navigate=useNavigate();var handleLogout=function handleLogout(){removeCookie('token',{path:'/'});sessionStorage.removeItem('token');navigate('/login',{replace:true});};return/*#__PURE__*/_jsx(Box,{mb:\"30px\",children:/*#__PURE__*/_jsxs(Stack,{direction:\"row\",alignItems:\"center\",justifyContent:\"space-between\",children:[/*#__PURE__*/_jsx(Typography,{variant:\"h2\",color:\"#141414\",fontWeight:\"bold\",sx:{m:'0 0 5px 0'},children:title}),isValidBearerToken(cookie.token)&&/*#__PURE__*/_jsx(Button,{variant:\"outlined\",size:\"large\",onClick:handleLogout,startIcon:/*#__PURE__*/_jsx(ExitToAppIcon,{}),children:\"LOG OUT\"})]})});};export default Title;","map":{"version":3,"names":["ExitToAppIcon","Box","Stack","Typography","Button","useCookies","useNavigate","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","Title","_ref","title","_useCookies","_useCookies2","_slicedToArray","cookie","removeCookie","navigate","handleLogout","path","sessionStorage","removeItem","replace","mb","children","direction","alignItems","justifyContent","variant","color","fontWeight","sx","m","token","size","onClick","startIcon"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/Title.js"],"sourcesContent":["import ExitToAppIcon from '@mui/icons-material/ExitToApp'\nimport { Box, Stack, Typography } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { isValidBearerToken } from './utils'\n\nconst Title = ({ title }) => {\n const [cookie, , removeCookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleLogout = () => {\n removeCookie('token', { path: '/' })\n sessionStorage.removeItem('token')\n navigate('/login', { replace: true })\n }\n\n return (\n <Box mb=\"30px\">\n <Stack direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography\n variant=\"h2\"\n color=\"#141414\"\n fontWeight=\"bold\"\n sx={{ m: '0 0 5px 0' }}\n >\n {title}\n </Typography>\n {isValidBearerToken(cookie.token) && (\n <Button\n variant=\"outlined\"\n size=\"large\"\n onClick={handleLogout}\n startIcon={<ExitToAppIcon />}\n >\n LOG OUT\n </Button>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default Title\n"],"mappings":"6IAAA,MAAO,CAAAA,aAAa,KAAM,+BAA+B,CACzD,OAASC,GAAG,CAAEC,KAAK,CAAEC,UAAU,KAAQ,eAAe,CACtD,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,kBAAkB,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE5C,GAAM,CAAAC,KAAK,CAAG,QAAR,CAAAA,KAAKA,CAAAC,IAAA,CAAkB,IAAZ,CAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACpB,IAAAC,WAAA,CAAiCV,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAW,YAAA,CAAAC,cAAA,CAAAF,WAAA,IAA/CG,MAAM,CAAAF,YAAA,IAAIG,YAAY,CAAAH,YAAA,IAC7B,GAAM,CAAAI,QAAQ,CAAGd,WAAW,CAAC,CAAC,CAE9B,GAAM,CAAAe,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAS,CACzBF,YAAY,CAAC,OAAO,CAAE,CAAEG,IAAI,CAAE,GAAI,CAAC,CAAC,CACpCC,cAAc,CAACC,UAAU,CAAC,OAAO,CAAC,CAClCJ,QAAQ,CAAC,QAAQ,CAAE,CAAEK,OAAO,CAAE,IAAK,CAAC,CAAC,CACvC,CAAC,CAED,mBACEhB,IAAA,CAACR,GAAG,EAACyB,EAAE,CAAC,MAAM,CAAAC,QAAA,cACZhB,KAAA,CAACT,KAAK,EAAC0B,SAAS,CAAC,KAAK,CAACC,UAAU,CAAC,QAAQ,CAACC,cAAc,CAAC,eAAe,CAAAH,QAAA,eACvElB,IAAA,CAACN,UAAU,EACT4B,OAAO,CAAC,IAAI,CACZC,KAAK,CAAC,SAAS,CACfC,UAAU,CAAC,MAAM,CACjBC,EAAE,CAAE,CAAEC,CAAC,CAAE,WAAY,CAAE,CAAAR,QAAA,CAEtBb,KAAK,CACI,CAAC,CACZP,kBAAkB,CAACW,MAAM,CAACkB,KAAK,CAAC,eAC/B3B,IAAA,CAACL,MAAM,EACL2B,OAAO,CAAC,UAAU,CAClBM,IAAI,CAAC,OAAO,CACZC,OAAO,CAAEjB,YAAa,CACtBkB,SAAS,cAAE9B,IAAA,CAACT,aAAa,GAAE,CAAE,CAAA2B,QAAA,CAC9B,SAED,CAAQ,CACT,EACI,CAAC,CACL,CAAC,CAEV,CAAC,CAED,cAAe,CAAAf,KAAK"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import{Cookies}from'react-cookie';var cookies=new Cookies();var updateOptions=function updateOptions(url,options){var update=_objectSpread({},options);if(cookies.get('token')!=='no_auth'){update.headers=_objectSpread(_objectSpread({},update.headers),{},{Authorization:'Bearer '+sessionStorage.getItem('token')});}return update;};export default function fetcher(url,options){return fetch(url,updateOptions(url,options)).then(function(res){// For the situation that server has already been restarted, the current token may become invalid,\n// which leads to UI hangs.\nif(res.status==401&&localStorage.getItem('authStatus')!=='401'){localStorage.setItem('authStatus','401');window.dispatchEvent(new Event('auth-status'));}else if(res.status==403&&localStorage.getItem('authStatus')!=='403'){localStorage.setItem('authStatus','403');window.dispatchEvent(new Event('auth-status'));}else{return res;}});}","map":{"version":3,"names":["Cookies","cookies","updateOptions","url","options","update","_objectSpread","get","headers","Authorization","sessionStorage","getItem","fetcher","fetch","then","res","status","localStorage","setItem","window","dispatchEvent","Event"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/fetcher.js"],"sourcesContent":["import { Cookies } from 'react-cookie'\n\nconst cookies = new Cookies()\n\nconst updateOptions = (url, options) => {\n const update = { ...options }\n if (cookies.get('token') !== 'no_auth') {\n update.headers = {\n ...update.headers,\n Authorization: 'Bearer ' + sessionStorage.getItem('token'),\n }\n }\n return update\n}\n\nexport default function fetcher(url, options) {\n return fetch(url, updateOptions(url, options)).then((res) => {\n // For the situation that server has already been restarted, the current token may become invalid,\n // which leads to UI hangs.\n if (res.status == 401 && localStorage.getItem('authStatus') !== '401') {\n localStorage.setItem('authStatus', '401')\n window.dispatchEvent(new Event('auth-status'))\n } else if (\n res.status == 403 &&\n localStorage.getItem('authStatus') !== '403'\n ) {\n localStorage.setItem('authStatus', '403')\n window.dispatchEvent(new Event('auth-status'))\n } else {\n return res\n }\n })\n}\n"],"mappings":"4IAAA,OAASA,OAAO,KAAQ,cAAc,CAEtC,GAAM,CAAAC,OAAO,CAAG,GAAI,CAAAD,OAAO,CAAC,CAAC,CAE7B,GAAM,CAAAE,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAIC,GAAG,CAAEC,OAAO,CAAK,CACtC,GAAM,CAAAC,MAAM,CAAAC,aAAA,IAAQF,OAAO,CAAE,CAC7B,GAAIH,OAAO,CAACM,GAAG,CAAC,OAAO,CAAC,GAAK,SAAS,CAAE,CACtCF,MAAM,CAACG,OAAO,CAAAF,aAAA,CAAAA,aAAA,IACTD,MAAM,CAACG,OAAO,MACjBC,aAAa,CAAE,SAAS,CAAGC,cAAc,CAACC,OAAO,CAAC,OAAO,CAAC,EAC3D,CACH,CACA,MAAO,CAAAN,MAAM,CACf,CAAC,CAED,cAAe,SAAS,CAAAO,OAAOA,CAACT,GAAG,CAAEC,OAAO,CAAE,CAC5C,MAAO,CAAAS,KAAK,CAACV,GAAG,CAAED,aAAa,CAACC,GAAG,CAAEC,OAAO,CAAC,CAAC,CAACU,IAAI,CAAC,SAACC,GAAG,CAAK,CAC3D;AACA;AACA,GAAIA,GAAG,CAACC,MAAM,EAAI,GAAG,EAAIC,YAAY,CAACN,OAAO,CAAC,YAAY,CAAC,GAAK,KAAK,CAAE,CACrEM,YAAY,CAACC,OAAO,CAAC,YAAY,CAAE,KAAK,CAAC,CACzCC,MAAM,CAACC,aAAa,CAAC,GAAI,CAAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAChD,CAAC,IAAM,IACLN,GAAG,CAACC,MAAM,EAAI,GAAG,EACjBC,YAAY,CAACN,OAAO,CAAC,YAAY,CAAC,GAAK,KAAK,CAC5C,CACAM,YAAY,CAACC,OAAO,CAAC,YAAY,CAAE,KAAK,CAAC,CACzCC,MAAM,CAACC,aAAa,CAAC,GAAI,CAAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAChD,CAAC,IAAM,CACL,MAAO,CAAAN,GAAG,CACZ,CACF,CAAC,CAAC,CACJ"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Tab}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import Title from'../../components/Title';import LaunchCustom from'./launchCustom';import LaunchLLM from'./launchLLM';import LaunchModelComponent from'./LaunchModelComponent';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModel=function LaunchModel(){var endPoint=useContext(ApiContext).endPoint;var _React$useState=React.useState(sessionStorage.getItem('modelType')?sessionStorage.getItem('modelType'):'/launch_model/llm'),_React$useState2=_slicedToArray(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];var _useState=useState(-1),_useState2=_slicedToArray(_useState,2),gpuAvailable=_useState2[0],setGPUAvailable=_useState2[1];var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var handleTabChange=function handleTabChange(event,newValue){setValue(newValue);navigate(newValue);sessionStorage.setItem('modelType',newValue);newValue==='/launch_model/custom/llm'?sessionStorage.setItem('subType',newValue):'';};useEffect(function(){if(cookie.token===''||cookie.token===undefined){return;}if(cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});return;}if(gpuAvailable===-1){fetch(endPoint+'/v1/cluster/devices',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(!res.ok){// Usually, if some errors happen here, check if the cluster is available\nres.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){setGPUAvailable(parseInt(data,10));});}});}},[cookie.token]);useEffect(function(){});return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(Title,{title:\"Launch Model\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:value,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:value,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Models\",value:\"/launch_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/launch_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Models\",value:\"/launch_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Models\",value:\"/launch_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Models\",value:\"/launch_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Custom Models\",value:\"/launch_model/custom/llm\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchLLM,{gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'embedding'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'rerank'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'image'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'audio'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/custom/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchCustom,{gpuAvailable:gpuAvailable})})]})]});};export default LaunchModel;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","Tab","React","useContext","useEffect","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","Title","LaunchCustom","LaunchLLM","LaunchModelComponent","jsx","_jsx","jsxs","_jsxs","LaunchModel","endPoint","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","value","setValue","_useState","_useState2","gpuAvailable","setGPUAvailable","_useContext","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","handleTabChange","event","newValue","setItem","token","undefined","replace","fetch","method","headers","then","res","ok","json","errorData","concat","status","detail","data","parseInt","m","children","title","sx","borderBottom","borderColor","onChange","label","padding","modelType"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/index.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport Title from '../../components/Title'\nimport LaunchCustom from './launchCustom'\nimport LaunchLLM from './launchLLM'\nimport LaunchModelComponent from './LaunchModelComponent'\n\nconst LaunchModel = () => {\n let endPoint = useContext(ApiContext).endPoint\n const [value, setValue] = React.useState(\n sessionStorage.getItem('modelType')\n ? sessionStorage.getItem('modelType')\n : '/launch_model/llm'\n )\n const [gpuAvailable, setGPUAvailable] = useState(-1)\n\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleTabChange = (event, newValue) => {\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('modelType', newValue)\n newValue === '/launch_model/custom/llm'\n ? sessionStorage.setItem('subType', newValue)\n : ''\n }\n\n useEffect(() => {\n if (cookie.token === '' || cookie.token === undefined) {\n return\n }\n if (cookie.token !== 'no_auth' && !sessionStorage.getItem('token')) {\n navigate('/login', { replace: true })\n return\n }\n\n if (gpuAvailable === -1) {\n fetch(endPoint + '/v1/cluster/devices', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).then((res) => {\n if (!res.ok) {\n // Usually, if some errors happen here, check if the cluster is available\n res.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n setGPUAvailable(parseInt(data, 10))\n })\n }\n })\n }\n }, [cookie.token])\n\n useEffect(() => {})\n return (\n <Box m=\"20px\">\n <Title title=\"Launch Model\" />\n <ErrorMessageSnackBar />\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab label=\"Language Models\" value=\"/launch_model/llm\" />\n <Tab label=\"Embedding Models\" value=\"/launch_model/embedding\" />\n <Tab label=\"Rerank Models\" value=\"/launch_model/rerank\" />\n <Tab label=\"Image Models\" value=\"/launch_model/image\" />\n <Tab label=\"Audio Models\" value=\"/launch_model/audio\" />\n <Tab label=\"Custom Models\" value=\"/launch_model/custom/llm\" />\n </TabList>\n </Box>\n <TabPanel value=\"/launch_model/llm\" sx={{ padding: 0 }}>\n <LaunchLLM gpuAvailable={gpuAvailable} />\n </TabPanel>\n <TabPanel value=\"/launch_model/embedding\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'embedding'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/rerank\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'rerank'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/image\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'image'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/audio\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'audio'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/custom/llm\" sx={{ padding: 0 }}>\n <LaunchCustom gpuAvailable={gpuAvailable} />\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchModel\n"],"mappings":"6IAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,GAAG,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAA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,cACXd,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,yBAAyB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cAC3D3C,IAAA,CAACF,oBAAoB,EAACqD,SAAS,CAAE,WAAY,CAAE,CAAC,CACxC,CAAC,cACXnD,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,sBAAsB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACxD3C,IAAA,CAACF,oBAAoB,EAACqD,SAAS,CAAE,QAAS,CAAE,CAAC,CACrC,CAAC,cACXnD,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,qBAAqB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvD3C,IAAA,CAACF,oBAAoB,EAACqD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACXnD,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,qBAAqB,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvD3C,IAAA,CAACF,oBAAoB,EAACqD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACXnD,IAAA,CAAChB,QAAQ,EAAC0B,KAAK,CAAC,0BAA0B,CAACmC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cAC5D3C,IAAA,CAACJ,YAAY,EAACkB,YAAY,CAAEA,YAAa,CAAE,CAAC,CACpC,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAX,WAAW"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"var styles={container:{display:'block',position:'relative',width:'300px',height:'300px',borderRadius:'20px'},containerSelected:{cursor:'pointer',display:'block',position:'relative',width:'300px',height:'300px',borderRadius:'20px'},descriptionCard:{position:'relative',top:'-1px',left:'-1px',width:'300px',height:'300px',padding:'20px',borderRadius:'20px'},drawerCard:{position:'relative',padding:'20px 80px 0',minHeight:'100%',width:'60vw'},p:{'display':'-webkit-box','-webkit-line-clamp':'4','-webkit-box-orient':'vertical','overflow':'hidden','textOverflow':'ellipsis','wordBreak':'break-word','fontSize':'14px','padding':'0px 10px'},formContainer:{height:'80%',overflow:'scroll',padding:'0 10px'},buttonsContainer:{position:'absolute',bottom:'50px',left:'100px',right:'100px',display:'flex',justifyContent:'space-between',alignItems:'center'},buttonContainer:{width:'45%',borderWidth:'0px',backgroundColor:'transparent'},buttonItem:{width:'100%',padding:'5px',borderRadius:'4px',border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},instructionText:{fontSize:'12px',color:'#666666',fontStyle:'italic',margin:'30px 0',textAlign:'center'},iconRow:{position:'absolute',bottom:'20px',left:'20px',right:'20px',display:'flex',justifyContent:'space-between',alignItems:'center'},iconItem:{display:'flex',flexDirection:'column',alignItems:'center',margin:'20px'},boldIconText:{fontWeight:'bold',fontSize:'1.2em'},muiIcon:{fontSize:'1.5em'},smallText:{fontSize:'0.8em'}};export default styles;","map":{"version":3,"names":["styles","container","display","position","width","height","borderRadius","containerSelected","cursor","descriptionCard","top","left","padding","drawerCard","minHeight","p","formContainer","overflow","buttonsContainer","bottom","right","justifyContent","alignItems","buttonContainer","borderWidth","backgroundColor","buttonItem","border","borderColor","instructionText","fontSize","color","fontStyle","margin","textAlign","iconRow","iconItem","flexDirection","boldIconText","fontWeight","muiIcon","smallText"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/styles/modelCardStyle.js"],"sourcesContent":["const styles = {\n container: {\n display: 'block',\n position: 'relative',\n width: '300px',\n height: '300px',\n borderRadius: '20px',\n },\n containerSelected: {\n cursor: 'pointer',\n display: 'block',\n position: 'relative',\n width: '300px',\n height: '300px',\n borderRadius: '20px',\n },\n descriptionCard: {\n position: 'relative',\n top: '-1px',\n left: '-1px',\n width: '300px',\n height: '300px',\n padding: '20px',\n borderRadius: '20px',\n },\n drawerCard: {\n position: 'relative',\n padding: '20px 80px 0',\n minHeight: '100%',\n width: '60vw',\n },\n p: {\n 'display': '-webkit-box',\n '-webkit-line-clamp': '4',\n '-webkit-box-orient': 'vertical',\n 'overflow': 'hidden',\n 'textOverflow': 'ellipsis',\n 'wordBreak': 'break-word',\n 'fontSize': '14px',\n 'padding': '0px 10px',\n },\n formContainer: {\n height: '80%',\n overflow: 'scroll',\n padding: '0 10px',\n },\n buttonsContainer: {\n position: 'absolute',\n bottom: '50px',\n left: '100px',\n right: '100px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n buttonContainer: {\n width: '45%',\n borderWidth: '0px',\n backgroundColor: 'transparent',\n },\n buttonItem: {\n width: '100%',\n padding: '5px',\n borderRadius: '4px',\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n },\n instructionText: {\n fontSize: '12px',\n color: '#666666',\n fontStyle: 'italic',\n margin: '30px 0',\n textAlign: 'center',\n },\n iconRow: {\n position: 'absolute',\n bottom: '20px',\n left: '20px',\n right: '20px',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n iconItem: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n margin: '20px',\n },\n boldIconText: {\n fontWeight: 'bold',\n fontSize: '1.2em',\n },\n muiIcon: {\n fontSize: '1.5em',\n },\n smallText: {\n fontSize: '0.8em',\n },\n}\n\nexport default styles\n"],"mappings":"AAAA,GAAM,CAAAA,MAAM,CAAG,CACbC,SAAS,CAAE,CACTC,OAAO,CAAE,OAAO,CAChBC,QAAQ,CAAE,UAAU,CACpBC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,OAAO,CACfC,YAAY,CAAE,MAChB,CAAC,CACDC,iBAAiB,CAAE,CACjBC,MAAM,CAAE,SAAS,CACjBN,OAAO,CAAE,OAAO,CAChB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,CAAE,CACfC,QAAQ,CAAE,MAAM,CAChBC,KAAK,CAAE,SAAS,CAChBC,SAAS,CAAE,QAAQ,CACnBC,MAAM,CAAE,QAAQ,CAChBC,SAAS,CAAE,QACb,CAAC,CACDC,OAAO,CAAE,CACPhC,QAAQ,CAAE,UAAU,CACpBgB,MAAM,CAAE,MAAM,CACdR,IAAI,CAAE,MAAM,CACZS,KAAK,CAAE,MAAM,CACblB,OAAO,CAAE,MAAM,CACfmB,cAAc,CAAE,eAAe,CAC/BC,UAAU,CAAE,QACd,CAAC,CACDc,QAAQ,CAAE,CACRlC,OAAO,CAAE,MAAM,CACfmC,aAAa,CAAE,QAAQ,CACvBf,UAAU,CAAE,QAAQ,CACpBW,MAAM,CAAE,MACV,CAAC,CACDK,YAAY,CAAE,CACZC,UAAU,CAAE,MAAM,CAClBT,QAAQ,CAAE,OACZ,CAAC,CACDU,OAAO,CAAE,CACPV,QAAQ,CAAE,OACZ,CAAC,CACDW,SAAS,CAAE,CACTX,QAAQ,CAAE,OACZ,CACF,CAAC,CAED,cAAe,CAAA9B,MAAM"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{CssBaseline,ThemeProvider}from'@mui/material';import Snackbar from'@mui/material/Snackbar';import React,{useEffect,useState}from'react';import{useCookies}from'react-cookie';import{HashRouter}from'react-router-dom';import{Alert}from'./components/alertComponent';import{ApiContextProvider}from'./components/apiContext';import AuthAlertDialog from'./components/authAlertDialog';import{getEndpoint}from'./components/utils';import WraperRoutes from'./router/index';import{useMode}from'./theme';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";function App(){var _useMode=useMode(),_useMode2=_slicedToArray(_useMode,1),theme=_useMode2[0];var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],setCookie=_useCookies2[1],removeCookie=_useCookies2[2];var _useState=useState(''),_useState2=_slicedToArray(_useState,2),msg=_useState2[0],setMsg=_useState2[1];var endPoint=getEndpoint();useEffect(function(){// token possible value: no_auth / need_auth / <real bearer token>\nfetch(endPoint+'/v1/cluster/auth',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(!res.ok){res.json().then(function(errorData){setMsg(\"Server error: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){if(!data.auth&&cookie.token!=='no_auth'){setCookie('token','no_auth',{path:'/'});}else if(data.auth&&!sessionStorage.getItem('token')){removeCookie('token',{path:'/'});}});}});},[]);var handleClose=function handleClose(event,reason){if(reason==='clickaway'){return;}setMsg('');};return/*#__PURE__*/_jsxs(\"div\",{className:\"app\",children:[/*#__PURE__*/_jsx(Snackbar,{open:msg!=='',autoHideDuration:10000,anchorOrigin:{vertical:'top',horizontal:'center'},onClose:handleClose,children:/*#__PURE__*/_jsx(Alert,{severity:\"error\",onClose:handleClose,sx:{width:'100%'},children:msg})}),/*#__PURE__*/_jsx(HashRouter,{children:/*#__PURE__*/_jsx(ThemeProvider,{theme:theme,children:/*#__PURE__*/_jsxs(ApiContextProvider,{children:[/*#__PURE__*/_jsx(CssBaseline,{}),/*#__PURE__*/_jsx(AuthAlertDialog,{}),/*#__PURE__*/_jsx(WraperRoutes,{})]})})})]});}export default App;","map":{"version":3,"names":["CssBaseline","ThemeProvider","Snackbar","React","useEffect","useState","useCookies","HashRouter","Alert","ApiContextProvider","AuthAlertDialog","getEndpoint","WraperRoutes","useMode","jsx","_jsx","jsxs","_jsxs","App","_useMode","_useMode2","_slicedToArray","theme","_useCookies","_useCookies2","cookie","setCookie","removeCookie","_useState","_useState2","msg","setMsg","endPoint","fetch","method","headers","then","res","ok","json","errorData","concat","status","detail","data","auth","token","path","sessionStorage","getItem","handleClose","event","reason","className","children","open","autoHideDuration","anchorOrigin","vertical","horizontal","onClose","severity","sx","width"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/App.js"],"sourcesContent":["import { CssBaseline, ThemeProvider } from '@mui/material'\nimport Snackbar from '@mui/material/Snackbar'\nimport React, { useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { HashRouter } from 'react-router-dom'\n\nimport { Alert } from './components/alertComponent'\nimport { ApiContextProvider } from './components/apiContext'\nimport AuthAlertDialog from './components/authAlertDialog'\nimport { getEndpoint } from './components/utils'\nimport WraperRoutes from './router/index'\nimport { useMode } from './theme'\n\nfunction App() {\n const [theme] = useMode()\n const [cookie, setCookie, removeCookie] = useCookies(['token'])\n const [msg, setMsg] = useState('')\n\n const endPoint = getEndpoint()\n\n useEffect(() => {\n // token possible value: no_auth / need_auth / <real bearer token>\n fetch(endPoint + '/v1/cluster/auth', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).then((res) => {\n if (!res.ok) {\n res.json().then((errorData) => {\n setMsg(\n `Server error: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n if (!data.auth && cookie.token !== 'no_auth') {\n setCookie('token', 'no_auth', { path: '/' })\n } else if (data.auth && !sessionStorage.getItem('token')) {\n removeCookie('token', { path: '/' })\n }\n })\n }\n })\n }, [])\n\n const handleClose = (event, reason) => {\n if (reason === 'clickaway') {\n return\n }\n setMsg('')\n }\n\n return (\n <div className=\"app\">\n <Snackbar\n open={msg !== ''}\n autoHideDuration={10000}\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n onClose={handleClose}\n >\n <Alert severity=\"error\" onClose={handleClose} sx={{ width: '100%' }}>\n {msg}\n </Alert>\n </Snackbar>\n <HashRouter>\n <ThemeProvider theme={theme}>\n <ApiContextProvider>\n <CssBaseline />\n <AuthAlertDialog />\n <WraperRoutes />\n </ApiContextProvider>\n </ThemeProvider>\n </HashRouter>\n </div>\n )\n}\n\nexport default App\n"],"mappings":"6IAAA,OAASA,WAAW,CAAEC,aAAa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AAEV,WAAY,CAACY,EAAE,CAAE,CAAEC,KAAK,CAAE,MAAO,CAAE,CAAAT,QAAA,CACjExB,GAAG,CACC,CAAC,CACA,CAAC,cACXf,IAAA,CAACR,UAAU,EAAA+C,QAAA,cACTvC,IAAA,CAACd,aAAa,EAACqB,KAAK,CAAEA,KAAM,CAAAgC,QAAA,cAC1BrC,KAAA,CAACR,kBAAkB,EAAA6C,QAAA,eACjBvC,IAAA,CAACf,WAAW,GAAE,CAAC,cACfe,IAAA,CAACL,eAAe,GAAE,CAAC,cACnBK,IAAA,CAACH,YAAY,GAAE,CAAC,EACE,CAAC,CACR,CAAC,CACN,CAAC,EACV,CAAC,CAEV,CAEA,cAAe,CAAAM,GAAG"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,Checkbox,FormControl,FormControlLabel}from'@mui/material';import Alert from'@mui/material/Alert';import AlertTitle from'@mui/material/AlertTitle';import Button from'@mui/material/Button';import TextField from'@mui/material/TextField';import React,{useContext,useState}from'react';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import{useMode}from'../../theme';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var SUPPORTED_LANGUAGES_DICT={en:'English',zh:'Chinese'};// Convert dictionary of supported languages into list\nvar SUPPORTED_LANGUAGES=Object.keys(SUPPORTED_LANGUAGES_DICT);var RegisterRerankModel=function RegisterRerankModel(){var ERROR_COLOR=useMode();var endPoint=useContext(ApiContext).endPoint;var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var _useState=useState(''),_useState2=_slicedToArray(_useState,2),successMsg=_useState2[0],setSuccessMsg=_useState2[1];var navigate=useNavigate();var _useState3=useState({model_name:'custom-rerank',language:['en'],model_uri:'/path/to/rerank-model'}),_useState4=_slicedToArray(_useState3,2),formData=_useState4[0],setFormData=_useState4[1];var errorModelName=formData.model_name.trim().length<=0;var errorLanguage=formData.language===undefined||formData.language.length===0;var handleClick=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var errorAny,response,errorData;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:errorAny=errorModelName||errorLanguage;if(!errorAny){_context.next=4;break;}setErrorMsg('Please fill in valid value for all fields');return _context.abrupt(\"return\");case 4:_context.prev=4;_context.next=7;return fetcher(endPoint+'/v1/model_registrations/rerank',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model:JSON.stringify(formData),persist:true})});case 7:response=_context.sent;if(response.ok){_context.next=15;break;}_context.next=11;return response.json();case 11:errorData=_context.sent;// Assuming the server returns error details in JSON format\nsetErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));_context.next=19;break;case 15:setSuccessMsg('Model has been registered successfully! Navigate to launch model page to proceed.');navigate('/launch_model/custom/rerank');sessionStorage.setItem('modelType','/launch_model/custom/llm');sessionStorage.setItem('subType','/launch_model/custom/rerank');case 19:_context.next=25;break;case 21:_context.prev=21;_context.t0=_context[\"catch\"](4);console.error('There was a problem with the fetch operation:',_context.t0);setErrorMsg(_context.t0.message||'An unexpected error occurred.');case 25:case\"end\":return _context.stop();}},_callee,null,[[4,21]]);}));return function handleClick(){return _ref.apply(this,arguments);};}();var toggleLanguage=function toggleLanguage(lang){if(formData.language.includes(lang)){setFormData(_objectSpread(_objectSpread({},formData),{},{language:formData.language.filter(function(l){return l!==lang;})}));}else{setFormData(_objectSpread(_objectSpread({},formData),{},{language:[].concat(_toConsumableArray(formData.language),[lang])}));}};return/*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(Box,{padding:\"20px\"}),/*#__PURE__*/_jsxs(FormControl,{sx:styles.baseFormControl,children:[/*#__PURE__*/_jsx(TextField,{label:\"Model Name\",error:errorModelName,defaultValue:formData.model_name,size:\"small\",helperText:\"Alphanumeric characters with properly placed hyphens and underscores. Must not match any built-in model names.\",onChange:function onChange(event){return setFormData(_objectSpread(_objectSpread({},formData),{},{model_name:event.target.value}));}}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),/*#__PURE__*/_jsx(TextField,{label:\"Model Path\",size:\"small\",value:formData.model_uri,onChange:function onChange(e){setFormData(_objectSpread(_objectSpread({},formData),{},{model_uri:e.target.value}));},helperText:\"Provide the model directory path.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5,color:errorLanguage?ERROR_COLOR:'inherit'},children:\"Model Languages\"}),/*#__PURE__*/_jsx(Box,{sx:styles.checkboxWrapper,children:SUPPORTED_LANGUAGES.map(function(lang){return/*#__PURE__*/_jsx(Box,{sx:{marginRight:'10px'},children:/*#__PURE__*/_jsx(FormControlLabel,{control:/*#__PURE__*/_jsx(Checkbox,{checked:formData.language.includes(lang),onChange:function onChange(){return toggleLanguage(lang);},name:lang,sx:errorLanguage?{'color':ERROR_COLOR,'&.Mui-checked':{color:ERROR_COLOR}}:{}}),label:SUPPORTED_LANGUAGES_DICT[lang],style:{paddingLeft:10,color:errorLanguage?ERROR_COLOR:'inherit'}})},lang);})}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),/*#__PURE__*/_jsxs(Box,{width:'100%',children:[successMsg!==''&&/*#__PURE__*/_jsxs(Alert,{severity:\"success\",children:[/*#__PURE__*/_jsx(AlertTitle,{children:\"Success\"}),successMsg]}),/*#__PURE__*/_jsx(Button,{variant:\"contained\",color:\"primary\",type:\"submit\",onClick:handleClick,children:\"Register Model\"})]})]});};export default RegisterRerankModel;var styles={baseFormControl:{width:'100%',margin:'normal',size:'small'},checkboxWrapper:{display:'flex',flexWrap:'wrap',maxWidth:'80%'},labelPaddingLeft:{paddingLeft:5},formControlLabelPaddingLeft:{paddingLeft:10},buttonBox:{width:'100%',margin:'20px'},error:{fontWeight:'bold',margin:'5px 0',padding:'1px',borderRadius:'5px'}};","map":{"version":3,"names":["Box","Checkbox","FormControl","FormControlLabel","Alert","AlertTitle","Button","TextField","React","useContext","useState","useNavigate","ApiContext","fetcher","useMode","jsx","_jsx","jsxs","_jsxs","SUPPORTED_LANGUAGES_DICT","en","zh","SUPPORTED_LANGUAGES","Object","keys","RegisterRerankModel","ERROR_COLOR","endPoint","_useContext","setErrorMsg","_useState","_useState2","_slicedToArray","successMsg","setSuccessMsg","navigate","_useState3","model_name","language","model_uri","_useState4","formData","setFormData","errorModelName","trim","length","errorLanguage","undefined","handleClick","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","errorAny","response","errorData","wrap","_callee$","_context","prev","next","abrupt","method","headers","body","JSON","stringify","model","persist","sent","ok","json","concat","status","detail","sessionStorage","setItem","t0","console","error","message","stop","apply","arguments","toggleLanguage","lang","includes","_objectSpread","filter","l","_toConsumableArray","Fragment","children","padding","sx","styles","baseFormControl","label","defaultValue","size","helperText","onChange","event","target","value","e","style","paddingLeft","color","checkboxWrapper","map","marginRight","control","checked","name","width","severity","variant","type","onClick","margin","display","flexWrap","maxWidth","labelPaddingLeft","formControlLabelPaddingLeft","buttonBox","fontWeight","borderRadius"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/register_model/register_rerank.js"],"sourcesContent":["import { Box, Checkbox, FormControl, FormControlLabel } from '@mui/material'\nimport Alert from '@mui/material/Alert'\nimport AlertTitle from '@mui/material/AlertTitle'\nimport Button from '@mui/material/Button'\nimport TextField from '@mui/material/TextField'\nimport React, { useContext, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\nimport { useMode } from '../../theme'\n\nconst SUPPORTED_LANGUAGES_DICT = { en: 'English', zh: 'Chinese' }\n// Convert dictionary of supported languages into list\nconst SUPPORTED_LANGUAGES = Object.keys(SUPPORTED_LANGUAGES_DICT)\n\nconst RegisterRerankModel = () => {\n const ERROR_COLOR = useMode()\n const endPoint = useContext(ApiContext).endPoint\n const { setErrorMsg } = useContext(ApiContext)\n const [successMsg, setSuccessMsg] = useState('')\n const navigate = useNavigate()\n const [formData, setFormData] = useState({\n model_name: 'custom-rerank',\n language: ['en'],\n model_uri: '/path/to/rerank-model',\n })\n\n const errorModelName = formData.model_name.trim().length <= 0\n const errorLanguage =\n formData.language === undefined || formData.language.length === 0\n\n const handleClick = async () => {\n const errorAny = errorModelName || errorLanguage\n\n if (errorAny) {\n setErrorMsg('Please fill in valid value for all fields')\n return\n }\n\n try {\n const response = await fetcher(\n endPoint + '/v1/model_registrations/rerank',\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model: JSON.stringify(formData),\n persist: true,\n }),\n }\n )\n if (!response.ok) {\n const errorData = await response.json() // Assuming the server returns error details in JSON format\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n } else {\n setSuccessMsg(\n 'Model has been registered successfully! Navigate to launch model page to proceed.'\n )\n navigate('/launch_model/custom/rerank')\n sessionStorage.setItem('modelType', '/launch_model/custom/llm')\n sessionStorage.setItem('subType', '/launch_model/custom/rerank')\n }\n } catch (error) {\n console.error('There was a problem with the fetch operation:', error)\n setErrorMsg(error.message || 'An unexpected error occurred.')\n }\n }\n\n const toggleLanguage = (lang) => {\n if (formData.language.includes(lang)) {\n setFormData({\n ...formData,\n language: formData.language.filter((l) => l !== lang),\n })\n } else {\n setFormData({\n ...formData,\n language: [...formData.language, lang],\n })\n }\n }\n\n return (\n <React.Fragment>\n <Box padding=\"20px\"></Box>\n {/* Base Information */}\n <FormControl sx={styles.baseFormControl}>\n <TextField\n label=\"Model Name\"\n error={errorModelName}\n defaultValue={formData.model_name}\n size=\"small\"\n helperText=\"Alphanumeric characters with properly placed hyphens and underscores. Must not match any built-in model names.\"\n onChange={(event) =>\n setFormData({ ...formData, model_name: event.target.value })\n }\n />\n <Box padding=\"15px\"></Box>\n\n <TextField\n label=\"Model Path\"\n size=\"small\"\n value={formData.model_uri}\n onChange={(e) => {\n setFormData({\n ...formData,\n model_uri: e.target.value,\n })\n }}\n helperText=\"Provide the model directory path.\"\n />\n <Box padding=\"15px\"></Box>\n\n <label\n style={{\n paddingLeft: 5,\n color: errorLanguage ? ERROR_COLOR : 'inherit',\n }}\n >\n Model Languages\n </label>\n <Box sx={styles.checkboxWrapper}>\n {SUPPORTED_LANGUAGES.map((lang) => (\n <Box key={lang} sx={{ marginRight: '10px' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={formData.language.includes(lang)}\n onChange={() => toggleLanguage(lang)}\n name={lang}\n sx={\n errorLanguage\n ? {\n 'color': ERROR_COLOR,\n '&.Mui-checked': {\n color: ERROR_COLOR,\n },\n }\n : {}\n }\n />\n }\n label={SUPPORTED_LANGUAGES_DICT[lang]}\n style={{\n paddingLeft: 10,\n color: errorLanguage ? ERROR_COLOR : 'inherit',\n }}\n />\n </Box>\n ))}\n </Box>\n <Box padding=\"15px\"></Box>\n </FormControl>\n\n <Box width={'100%'}>\n {successMsg !== '' && (\n <Alert severity=\"success\">\n <AlertTitle>Success</AlertTitle>\n {successMsg}\n </Alert>\n )}\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n onClick={handleClick}\n >\n Register Model\n </Button>\n </Box>\n </React.Fragment>\n )\n}\n\nexport default RegisterRerankModel\n\nconst styles = {\n baseFormControl: {\n width: '100%',\n margin: 'normal',\n size: 'small',\n },\n checkboxWrapper: {\n display: 'flex',\n flexWrap: 'wrap',\n maxWidth: '80%',\n },\n labelPaddingLeft: {\n paddingLeft: 5,\n },\n formControlLabelPaddingLeft: {\n paddingLeft: 10,\n },\n buttonBox: {\n width: '100%',\n margin: '20px',\n },\n error: {\n fontWeight: 'bold',\n margin: '5px 0',\n padding: '1px',\n borderRadius: '5px',\n },\n}\n"],"mappings":"wtBAAA,OAASA,GAAG,CAAEC,QAAQ,CAAEC,WAAW,CAAEC,gBAAgB,KAAQ,eAAe,CAC5E,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,QAAQ,KAAQ,OAAO,CACnD,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,OAAO,KAAM,0BAA0B,CAC9C,OAASC,OAAO,KAAQ,aAAa,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAErC,GAAM,CAAAC,wBAAwB,CAAG,CAAEC,EAAE,CAAE,SAAS,CAAEC,EAAE,CAAE,SAAU,CAAC,CACjE;AACA,GAAM,CAAAC,mBAAmB,CAAGC,MAAM,CAACC,IAAI,CAACL,wBAAwB,CAAC,CAEjE,GAAM,CAAAM,mBAAmB,CAAG,QAAtB,CAAAA,mBAAmBA,CAAA,CAAS,CAChC,GAAM,CAAAC,WAAW,CAAGZ,OAAO,CAAC,CAAC,CAC7B,GAAM,CAAAa,QAAQ,CAAGlB,UAAU,CAACG,UAAU,CAAC,CAACe,QAAQ,CAChD,IAAAC,WAAA,CAAwBnB,UAAU,CAACG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,IAAA,CAAChB,GAAG,EAAC8F,OAAO,CAAC,MAAM,CAAM,CAAC,EACf,CAAC,cAEd5E,KAAA,CAAClB,GAAG,EAACoH,KAAK,CAAE,MAAO,CAAAvB,QAAA,EAChB5D,UAAU,GAAK,EAAE,eAChBf,KAAA,CAACd,KAAK,EAACiH,QAAQ,CAAC,SAAS,CAAAxB,QAAA,eACvB7E,IAAA,CAACX,UAAU,EAAAwF,QAAA,CAAC,SAAO,CAAY,CAAC,CAC/B5D,UAAU,EACN,CACR,cACDjB,IAAA,CAACV,MAAM,EACLgH,OAAO,CAAC,WAAW,CACnBT,KAAK,CAAC,SAAS,CACfU,IAAI,CAAC,QAAQ,CACbC,OAAO,CAAExE,WAAY,CAAA6C,QAAA,CACtB,gBAED,CAAQ,CAAC,EACN,CAAC,EACQ,CAAC,CAErB,CAAC,CAED,cAAe,CAAApE,mBAAmB,CAElC,GAAM,CAAAuE,MAAM,CAAG,CACbC,eAAe,CAAE,CACfmB,KAAK,CAAE,MAAM,CACbK,MAAM,CAAE,QAAQ,CAChBrB,IAAI,CAAE,OACR,CAAC,CACDU,eAAe,CAAE,CACfY,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,MAAM,CAChBC,QAAQ,CAAE,KACZ,CAAC,CACDC,gBAAgB,CAAE,CAChBjB,WAAW,CAAE,CACf,CAAC,CACDkB,2BAA2B,CAAE,CAC3BlB,WAAW,CAAE,EACf,CAAC,CACDmB,SAAS,CAAE,CACTX,KAAK,CAAE,MAAM,CACbK,MAAM,CAAE,MACV,CAAC,CACDzC,KAAK,CAAE,CACLgD,UAAU,CAAE,MAAM,CAClBP,MAAM,CAAE,OAAO,CACf3B,OAAO,CAAE,KAAK,CACdmC,YAAY,CAAE,KAChB,CACF,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box}from'@mui/material';import Button from'@mui/material/Button';import Container from'@mui/material/Container';import TextField from'@mui/material/TextField';import Typography from'@mui/material/Typography';import*as React from'react';import{Fragment,useContext,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import{getEndpoint}from'../../components/utils';import Header from'./header';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";function Login(){var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,2),setCookie=_useCookies2[1];var navigate=useNavigate();var _useState=useState(''),_useState2=_slicedToArray(_useState,2),username=_useState2[0],setUsername=_useState2[1];var _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),password=_useState4[0],setPassword=_useState4[1];var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var endpoint=getEndpoint();var handleSubmit=function handleSubmit(){fetch(endpoint+'/token',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({username:username,password:password})}).then(function(res){if(!res.ok){res.json().then(function(errorData){setErrorMsg(\"Login failed: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){setCookie('token',data['access_token'],{path:'/'});sessionStorage.setItem('token',data['access_token']);navigate('/launch_model/llm');});}});};return/*#__PURE__*/_jsxs(Fragment,{children:[/*#__PURE__*/_jsx(Header,{}),/*#__PURE__*/_jsxs(Container,{component:\"main\",maxWidth:\"xl\",sx:{marginTop:20},children:[/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(Box,{sx:{marginTop:8,display:'flex',flexDirection:'column',alignItems:'center'},children:[/*#__PURE__*/_jsx(Typography,{component:\"h1\",variant:\"h5\",children:\"LOGIN\"}),/*#__PURE__*/_jsxs(Box,{component:\"main\",noValidate:true,sx:{mt:1},children:[/*#__PURE__*/_jsx(TextField,{margin:\"normal\",required:true,fullWidth:true,id:\"username\",label:\"Username\",name:\"username\",value:username,onChange:function onChange(e){setUsername(e.target.value);},autoFocus:true}),/*#__PURE__*/_jsx(TextField,{margin:\"normal\",required:true,fullWidth:true,name:\"password\",label:\"Password\",type:\"password\",id:\"password\",autoComplete:\"current-password\",value:password,onChange:function onChange(e){setPassword(e.target.value);}}),/*#__PURE__*/_jsx(Button,{type:\"submit\",fullWidth:true,variant:\"contained\",sx:{mt:3,mb:2},onClick:handleSubmit,children:\"Sign In\"})]})]})]})]});}export default Login;","map":{"version":3,"names":["Box","Button","Container","TextField","Typography","React","Fragment","useContext","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","getEndpoint","Header","jsx","_jsx","jsxs","_jsxs","Login","_useCookies","_useCookies2","_slicedToArray","setCookie","navigate","_useState","_useState2","username","setUsername","_useState3","_useState4","password","setPassword","_useContext","setErrorMsg","endpoint","handleSubmit","fetch","method","headers","body","JSON","stringify","then","res","ok","json","errorData","concat","status","detail","data","path","sessionStorage","setItem","children","component","maxWidth","sx","marginTop","display","flexDirection","alignItems","variant","noValidate","mt","margin","required","fullWidth","id","label","name","value","onChange","e","target","autoFocus","type","autoComplete","mb","onClick"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/login/login.js"],"sourcesContent":["import { Box } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport Container from '@mui/material/Container'\nimport TextField from '@mui/material/TextField'\nimport Typography from '@mui/material/Typography'\nimport * as React from 'react'\nimport { Fragment, useContext, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport { getEndpoint } from '../../components/utils'\nimport Header from './header'\n\nfunction Login() {\n const [, setCookie] = useCookies(['token'])\n const navigate = useNavigate()\n const [username, setUsername] = useState('')\n const [password, setPassword] = useState('')\n const { setErrorMsg } = useContext(ApiContext)\n const endpoint = getEndpoint()\n\n const handleSubmit = () => {\n fetch(endpoint + '/token', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n username: username,\n password: password,\n }),\n }).then((res) => {\n if (!res.ok) {\n res.json().then((errorData) => {\n setErrorMsg(\n `Login failed: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n setCookie('token', data['access_token'], { path: '/' })\n sessionStorage.setItem('token', data['access_token'])\n navigate('/launch_model/llm')\n })\n }\n })\n }\n\n return (\n <Fragment>\n <Header />\n <Container component=\"main\" maxWidth=\"xl\" sx={{ marginTop: 20 }}>\n <ErrorMessageSnackBar />\n <Box\n sx={{\n marginTop: 8,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n }}\n >\n <Typography component=\"h1\" variant=\"h5\">\n LOGIN\n </Typography>\n <Box component=\"main\" noValidate sx={{ mt: 1 }}>\n <TextField\n margin=\"normal\"\n required\n fullWidth\n id=\"username\"\n label=\"Username\"\n name=\"username\"\n value={username}\n onChange={(e) => {\n setUsername(e.target.value)\n }}\n autoFocus\n />\n <TextField\n margin=\"normal\"\n required\n fullWidth\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n id=\"password\"\n autoComplete=\"current-password\"\n value={password}\n onChange={(e) => {\n setPassword(e.target.value)\n }}\n />\n <Button\n type=\"submit\"\n fullWidth\n variant=\"contained\"\n sx={{ mt: 3, mb: 2 }}\n onClick={handleSubmit}\n >\n Sign In\n </Button>\n </Box>\n </Box>\n </Container>\n </Fragment>\n )\n}\n\nexport default Login\n"],"mappings":"6IAAA,OAASA,GAAG,KAAQ,eAAe,CACnC,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,GAAK,CAAAC,KAAK,KAAM,OAAO,CAC9B,OAASC,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C,OAExC,CAAY,CAAC,cACbrC,KAAA,CAAClB,GAAG,EAACwD,SAAS,CAAC,MAAM,CAACQ,UAAU,MAACN,EAAE,CAAE,CAAEO,EAAE,CAAE,CAAE,CAAE,CAAAV,QAAA,eAC7CvC,IAAA,CAACb,SAAS,EACR+D,MAAM,CAAC,QAAQ,CACfC,QAAQ,MACRC,SAAS,MACTC,EAAE,CAAC,UAAU,CACbC,KAAK,CAAC,UAAU,CAChBC,IAAI,CAAC,UAAU,CACfC,KAAK,CAAE7C,QAAS,CAChB8C,QAAQ,CAAE,SAAAA,SAACC,CAAC,CAAK,CACf9C,WAAW,CAAC8C,CAAC,CAACC,MAAM,CAACH,KAAK,CAAC,CAC7B,CAAE,CACFI,SAAS,MACV,CAAC,cACF5D,IAAA,CAACb,SAAS,EACR+D,MAAM,CAAC,QAAQ,CACfC,QAAQ,MACRC,SAAS,MACTG,IAAI,CAAC,UAAU,CACfD,KAAK,CAAC,UAAU,CAChBO,IAAI,CAAC,UAAU,CACfR,EAAE,CAAC,UAAU,CACbS,YAAY,CAAC,kBAAkB,CAC/BN,KAAK,CAAEzC,QAAS,CAChB0C,QAAQ,CAAE,SAAAA,SAACC,CAAC,CAAK,CACf1C,WAAW,CAAC0C,CAAC,CAACC,MAAM,CAACH,KAAK,CAAC,CAC7B,CAAE,CACH,CAAC,cACFxD,IAAA,CAACf,MAAM,EACL4E,IAAI,CAAC,QAAQ,CACbT,SAAS,MACTL,OAAO,CAAC,WAAW,CACnBL,EAAE,CAAE,CAAEO,EAAE,CAAE,CAAC,CAAEc,EAAE,CAAE,CAAE,CAAE,CACrBC,OAAO,CAAE5C,YAAa,CAAAmB,QAAA,CACvB,SAED,CAAQ,CAAC,EACN,CAAC,EACH,CAAC,EACG,CAAC,EACJ,CAAC,CAEf,CAEA,cAAe,CAAApC,KAAK"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Button,Dialog,DialogActions,DialogContent,DialogContentText,DialogTitle}from'@mui/material';import*as React from'react';import{useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";export default function AuthAlertDialog(){var navigate=useNavigate();var _useState=useState(''),_useState2=_slicedToArray(_useState,2),authStatus=_useState2[0],setAuthStatus=_useState2[1];var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),removeCookie=_useCookies2[2];var handleAuthStatus=function handleAuthStatus(){var status=localStorage.getItem('authStatus');if(status){setAuthStatus(status);}else{setAuthStatus('');}};useEffect(function(){localStorage.removeItem('authStatus');window.addEventListener('auth-status',handleAuthStatus);return function(){window.removeEventListener('auth-status',handleAuthStatus);};},[]);var handleClose=function handleClose(){// trigger first\nvar code=localStorage.getItem('authStatus');localStorage.removeItem('authStatus');setAuthStatus('');if(code==='401'){removeCookie('token',{path:'/'});navigate('/login',{replace:true});}};var handleDialogClose=function handleDialogClose(event,reason){if(reason&&reason==='backdropClick'){return;}localStorage.removeItem('authStatus');setAuthStatus('');};return/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsxs(Dialog,{fullWidth:true,maxWidth:\"md\",open:authStatus==='401'||authStatus==='403',onClose:handleDialogClose,\"aria-labelledby\":\"alert-dialog-title\",\"aria-describedby\":\"alert-dialog-description\",children:[authStatus==='403'&&/*#__PURE__*/_jsx(DialogTitle,{id:\"alert-dialog-title\",children:'Permission Error'}),authStatus==='401'&&/*#__PURE__*/_jsx(DialogTitle,{id:\"alert-dialog-title\",children:'Authentication Error'}),/*#__PURE__*/_jsxs(DialogContent,{children:[authStatus==='403'&&/*#__PURE__*/_jsx(DialogContentText,{id:\"alert-dialog-description\",children:'You do not have permissions to do this!'}),authStatus==='401'&&/*#__PURE__*/_jsx(DialogContentText,{id:\"alert-dialog-description\",children:'Invalid credentials! Please login.'})]}),/*#__PURE__*/_jsx(DialogActions,{children:/*#__PURE__*/_jsx(Button,{onClick:handleClose,children:\"CONFIRMED\"})})]})});}","map":{"version":3,"names":["Button","Dialog","DialogActions","DialogContent","DialogContentText","DialogTitle","React","useEffect","useState","useCookies","useNavigate","jsx","_jsx","jsxs","_jsxs","AuthAlertDialog","navigate","_useState","_useState2","_slicedToArray","authStatus","setAuthStatus","_useCookies","_useCookies2","removeCookie","handleAuthStatus","status","localStorage","getItem","removeItem","window","addEventListener","removeEventListener","handleClose","code","path","replace","handleDialogClose","event","reason","Fragment","children","fullWidth","maxWidth","open","onClose","id","onClick"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/authAlertDialog.js"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n} from '@mui/material'\nimport * as React from 'react'\nimport { useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nexport default function AuthAlertDialog() {\n const navigate = useNavigate()\n const [authStatus, setAuthStatus] = useState('')\n const [, , removeCookie] = useCookies(['token'])\n\n const handleAuthStatus = () => {\n const status = localStorage.getItem('authStatus')\n if (status) {\n setAuthStatus(status)\n } else {\n setAuthStatus('')\n }\n }\n\n useEffect(() => {\n localStorage.removeItem('authStatus')\n window.addEventListener('auth-status', handleAuthStatus)\n\n return () => {\n window.removeEventListener('auth-status', handleAuthStatus)\n }\n }, [])\n\n const handleClose = () => {\n // trigger first\n const code = localStorage.getItem('authStatus')\n localStorage.removeItem('authStatus')\n setAuthStatus('')\n if (code === '401') {\n removeCookie('token', { path: '/' })\n navigate('/login', { replace: true })\n }\n }\n\n const handleDialogClose = (event, reason) => {\n if (reason && reason === 'backdropClick') {\n return\n }\n localStorage.removeItem('authStatus')\n setAuthStatus('')\n }\n\n return (\n <React.Fragment>\n <Dialog\n fullWidth\n maxWidth=\"md\"\n open={authStatus === '401' || authStatus === '403'}\n onClose={handleDialogClose}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n {authStatus === '403' && (\n <DialogTitle id=\"alert-dialog-title\">\n {'Permission Error'}\n </DialogTitle>\n )}\n {authStatus === '401' && (\n <DialogTitle id=\"alert-dialog-title\">\n {'Authentication Error'}\n </DialogTitle>\n )}\n <DialogContent>\n {authStatus === '403' && (\n <DialogContentText id=\"alert-dialog-description\">\n {'You do not have permissions to do this!'}\n </DialogContentText>\n )}\n {authStatus === '401' && (\n <DialogContentText id=\"alert-dialog-description\">\n {'Invalid credentials! Please login.'}\n </DialogContentText>\n )}\n </DialogContent>\n <DialogActions>\n <Button onClick={handleClose}>CONFIRMED</Button>\n </DialogActions>\n </Dialog>\n </React.Fragment>\n )\n}\n"],"mappings":"6IAAA,OACEA,MAAM,CACNC,MAAM,CACNC,aAAa,CACbC,aAAa,CACbC,iBAAiB,CACjBC,WAAW,KACN,eAAe,CACtB,MAAO,GAAK,CAAAC,KAAK,KAAM,OAAO,CAC9B,OAASC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC3C,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,cAAe,SAAS,CAAAC,eAAeA,CAAA,CAAG,CACxC,GAAM,CAAAC,QAAQ,CAAGN,WAAW,CAAC,CAAC,CAC9B,IAAAO,SAAA,CAAoCT,QAAQ,CAAC,EAAE,CAAC,CAAAU,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAzCG,UAAU,CAAAF,UAAA,IAAEG,aAAa,CAAAH,UAAA,IAChC,IAAAI,WAAA,CAA2Bb,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAc,YAAA,CAAAJ,cAAA,CAAAG,WAAA,IAArCE,YAAY,CAAAD,YAAA,IAEvB,GAAM,CAAAE,gBAAgB,CAAG,QA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AC,IAAI,CACbC,IAAI,CAAExB,UAAU,GAAK,KAAK,EAAIA,UAAU,GAAK,KAAM,CACnDyB,OAAO,CAAER,iBAAkB,CAC3B,kBAAgB,oBAAoB,CACpC,mBAAiB,0BAA0B,CAAAI,QAAA,EAE1CrB,UAAU,GAAK,KAAK,eACnBR,IAAA,CAACP,WAAW,EAACyC,EAAE,CAAC,oBAAoB,CAAAL,QAAA,CACjC,kBAAkB,CACR,CACd,CACArB,UAAU,GAAK,KAAK,eACnBR,IAAA,CAACP,WAAW,EAACyC,EAAE,CAAC,oBAAoB,CAAAL,QAAA,CACjC,sBAAsB,CACZ,CACd,cACD3B,KAAA,CAACX,aAAa,EAAAsC,QAAA,EACXrB,UAAU,GAAK,KAAK,eACnBR,IAAA,CAACR,iBAAiB,EAAC0C,EAAE,CAAC,0BAA0B,CAAAL,QAAA,CAC7C,yCAAyC,CACzB,CACpB,CACArB,UAAU,GAAK,KAAK,eACnBR,IAAA,CAACR,iBAAiB,EAAC0C,EAAE,CAAC,0BAA0B,CAAAL,QAAA,CAC7C,oCAAoC,CACpB,CACpB,EACY,CAAC,cAChB7B,IAAA,CAACV,aAAa,EAAAuC,QAAA,cACZ7B,IAAA,CAACZ,MAAM,EAAC+C,OAAO,CAAEd,WAAY,CAAAQ,QAAA,CAAC,WAAS,CAAQ,CAAC,CACnC,CAAC,EACV,CAAC,CACK,CAAC,CAErB"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,FormControl,TextField}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import ModelCard from'./modelCard';import style from'./styles/launchModelStyle';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModelComponent=function LaunchModelComponent(_ref){var modelType=_ref.modelType;var endPoint=useContext(ApiContext).endPoint;var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];var _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var handleChange=function handleChange(e){setSearchTerm(e.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';return modelName.includes(searchTerm.toLowerCase());};var update=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var response,registrations,builtinModels;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context.next=2;break;}return _context.abrupt(\"return\");case 2:_context.prev=2;setIsCallingApi(true);_context.next=6;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/\").concat(modelType,\"?detailed=true\"),{method:'GET'});case 6:response=_context.sent;_context.next=9;return response.json();case 9:registrations=_context.sent;builtinModels=registrations.filter(function(v){return v.is_builtin;});setRegistrationData(builtinModels);_context.next=17;break;case 14:_context.prev=14;_context.t0=_context[\"catch\"](2);console.error('Error:',_context.t0);case 17:_context.prev=17;setIsCallingApi(false);return _context.finish(17);case 20:case\"end\":return _context.stop();}},_callee,null,[[2,14,17,20]]);}));return function update(){return _ref2.apply(this,arguments);};}();useEffect(function(){update();},[]);return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'1fr',margin:'30px 2rem'},children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(TextField,{id:\"search\",type:\"search\",label:\"Search for \".concat(modelType,\" model name\"),value:searchTerm,onChange:handleChange,size:\"small\"})})}),/*#__PURE__*/_jsx(\"div\",{style:style,children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,modelType:modelType},filteredRegistration.model_name);})})]});};export default LaunchModelComponent;","map":{"version":3,"names":["Box","FormControl","TextField","React","useContext","useEffect","useState","ApiContext","fetcher","ModelCard","style","jsx","_jsx","jsxs","_jsxs","LaunchModelComponent","_ref","modelType","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","handleChange","e","target","value","filter","registration","modelName","model_name","toLowerCase","includes","update","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","registrations","builtinModels","wrap","_callee$","_context","prev","next","abrupt","concat","method","sent","json","v","is_builtin","t0","console","error","finish","stop","apply","arguments","m","children","display","gridTemplateColumns","margin","variant","id","type","label","onChange","size","map","filteredRegistration","url","modelData"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/LaunchModelComponent.js"],"sourcesContent":["import { Box, FormControl, TextField } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\nimport ModelCard from './modelCard'\nimport style from './styles/launchModelStyle'\n\nconst LaunchModelComponent = ({ modelType }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const [searchTerm, setSearchTerm] = useState('')\n\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n const handleChange = (e) => {\n setSearchTerm(e.target.value)\n }\n\n const filter = (registration) => {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n return modelName.includes(searchTerm.toLowerCase())\n }\n\n const update = async () => {\n if (isCallingApi || isUpdatingModel) return\n\n try {\n setIsCallingApi(true)\n\n const response = await fetcher(\n `${endPoint}/v1/model_registrations/${modelType}?detailed=true`,\n {\n method: 'GET',\n }\n )\n\n const registrations = await response.json()\n\n const builtinModels = registrations.filter((v) => {\n return v.is_builtin\n })\n setRegistrationData(builtinModels)\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [])\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '1fr',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <TextField\n id=\"search\"\n type=\"search\"\n label={`Search for ${modelType} model name`}\n value={searchTerm}\n onChange={handleChange}\n size=\"small\"\n />\n </FormControl>\n </div>\n <div style={style}>\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n modelType={modelType}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchModelComponent\n"],"mappings":"ubAAA,OAASA,GAAG,CAAEC,WAAW,CAAEC,SAAS,KAAQ,eAAe,CAC3D,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAE9D,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,OAAO,KAAM,0BAA0B,CAC9C,MAAO,CAAAC,SAAS,KAAM,aAAa,CACnC,MAAO,CAAAC,KAAK,KAAM,2BAA2B,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,I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