xinference 0.12.3__py3-none-any.whl → 0.13.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 (101) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +56 -8
  3. xinference/client/restful/restful_client.py +49 -4
  4. xinference/core/model.py +36 -4
  5. xinference/core/scheduler.py +2 -0
  6. xinference/core/supervisor.py +132 -15
  7. xinference/core/worker.py +239 -53
  8. xinference/deploy/cmdline.py +5 -0
  9. xinference/deploy/utils.py +33 -2
  10. xinference/model/audio/chattts.py +6 -6
  11. xinference/model/audio/core.py +23 -15
  12. xinference/model/core.py +12 -3
  13. xinference/model/embedding/core.py +25 -16
  14. xinference/model/flexible/__init__.py +40 -0
  15. xinference/model/flexible/core.py +228 -0
  16. xinference/model/flexible/launchers/__init__.py +15 -0
  17. xinference/model/flexible/launchers/transformers_launcher.py +63 -0
  18. xinference/model/flexible/utils.py +33 -0
  19. xinference/model/image/core.py +18 -14
  20. xinference/model/image/custom.py +1 -1
  21. xinference/model/llm/__init__.py +5 -2
  22. xinference/model/llm/core.py +3 -2
  23. xinference/model/llm/ggml/llamacpp.py +1 -10
  24. xinference/model/llm/llm_family.json +292 -36
  25. xinference/model/llm/llm_family.py +102 -53
  26. xinference/model/llm/llm_family_modelscope.json +247 -27
  27. xinference/model/llm/mlx/__init__.py +13 -0
  28. xinference/model/llm/mlx/core.py +408 -0
  29. xinference/model/llm/pytorch/chatglm.py +2 -9
  30. xinference/model/llm/pytorch/cogvlm2.py +206 -21
  31. xinference/model/llm/pytorch/core.py +213 -120
  32. xinference/model/llm/pytorch/glm4v.py +171 -15
  33. xinference/model/llm/pytorch/qwen_vl.py +168 -7
  34. xinference/model/llm/pytorch/utils.py +53 -62
  35. xinference/model/llm/utils.py +28 -7
  36. xinference/model/rerank/core.py +29 -25
  37. xinference/thirdparty/deepseek_vl/serve/__init__.py +13 -0
  38. xinference/thirdparty/deepseek_vl/serve/app_deepseek.py +510 -0
  39. xinference/thirdparty/deepseek_vl/serve/app_modules/__init__.py +13 -0
  40. xinference/thirdparty/deepseek_vl/serve/app_modules/gradio_utils.py +94 -0
  41. xinference/thirdparty/deepseek_vl/serve/app_modules/overwrites.py +81 -0
  42. xinference/thirdparty/deepseek_vl/serve/app_modules/presets.py +96 -0
  43. xinference/thirdparty/deepseek_vl/serve/app_modules/utils.py +229 -0
  44. xinference/thirdparty/deepseek_vl/serve/inference.py +170 -0
  45. xinference/types.py +0 -1
  46. xinference/web/ui/build/asset-manifest.json +3 -3
  47. xinference/web/ui/build/index.html +1 -1
  48. xinference/web/ui/build/static/js/main.95c1d652.js +3 -0
  49. xinference/web/ui/build/static/js/main.95c1d652.js.map +1 -0
  50. xinference/web/ui/node_modules/.cache/babel-loader/07ce9e632e6aff24d7aa3ad8e48224433bbfeb0d633fca723453f1fcae0c9f1c.json +1 -0
  51. xinference/web/ui/node_modules/.cache/babel-loader/1130403f9e46f5738a23b45ac59b57de8f360c908c713e2c0670c2cce9bd367a.json +1 -0
  52. xinference/web/ui/node_modules/.cache/babel-loader/1444c41a4d04494f1cbc2d8c1537df107b451cb569cb2c1fbf5159f3a4841a5f.json +1 -0
  53. xinference/web/ui/node_modules/.cache/babel-loader/2c63090c842376cdd368c3ded88a333ef40d94785747651343040a6f7872a223.json +1 -0
  54. xinference/web/ui/node_modules/.cache/babel-loader/40f17338fc75ae095de7d2b4d8eae0d5ca0193a7e2bcece4ee745b22a7a2f4b7.json +1 -0
  55. xinference/web/ui/node_modules/.cache/babel-loader/5262556baf9207738bf6a8ba141ec6599d0a636345c245d61fdf88d3171998cb.json +1 -0
  56. xinference/web/ui/node_modules/.cache/babel-loader/6450605fac003812485f6251b9f0caafbf2e5bfc3bbe2f000050d9e2fdb8dcd3.json +1 -0
  57. xinference/web/ui/node_modules/.cache/babel-loader/709711edada3f1596b309d571285fd31f1c364d66f4425bc28723d0088cc351a.json +1 -0
  58. xinference/web/ui/node_modules/.cache/babel-loader/70fa8c07463a5fe57c68bf92502910105a8f647371836fe8c3a7408246ca7ba0.json +1 -0
  59. xinference/web/ui/node_modules/.cache/babel-loader/8a9742ddd8ba8546ef42dc14caca443f2b4524fabed7bf269e0eff3b7b64ee7d.json +1 -0
  60. xinference/web/ui/node_modules/.cache/babel-loader/9375a35b05d56989b2755bf72161fa707c92f28569d33765a75f91a568fda6e9.json +1 -0
  61. xinference/web/ui/node_modules/.cache/babel-loader/d6c643278a0b28320e6f33a60f5fb64c053997cbdc39a60e53ccc574688ade9e.json +1 -0
  62. xinference/web/ui/node_modules/.cache/babel-loader/d93730e2b5d7e8c957b4d0965d2ed1dac9045a649adbd47c220d11f255d4b1e0.json +1 -0
  63. xinference/web/ui/node_modules/.cache/babel-loader/e656dc00b4d8b387f0a81ba8fc558767df1601c66369e2eb86a5ef27cf080572.json +1 -0
  64. xinference/web/ui/node_modules/.cache/babel-loader/f3e02274cb1964e99b1fe69cbb6db233d3d8d7dd05d50ebcdb8e66d50b224b7b.json +1 -0
  65. {xinference-0.12.3.dist-info → xinference-0.13.1.dist-info}/METADATA +10 -11
  66. {xinference-0.12.3.dist-info → xinference-0.13.1.dist-info}/RECORD +71 -69
  67. xinference/model/llm/ggml/chatglm.py +0 -457
  68. xinference/thirdparty/ChatTTS/__init__.py +0 -1
  69. xinference/thirdparty/ChatTTS/core.py +0 -200
  70. xinference/thirdparty/ChatTTS/experimental/__init__.py +0 -0
  71. xinference/thirdparty/ChatTTS/experimental/llm.py +0 -40
  72. xinference/thirdparty/ChatTTS/infer/__init__.py +0 -0
  73. xinference/thirdparty/ChatTTS/infer/api.py +0 -125
  74. xinference/thirdparty/ChatTTS/model/__init__.py +0 -0
  75. xinference/thirdparty/ChatTTS/model/dvae.py +0 -155
  76. xinference/thirdparty/ChatTTS/model/gpt.py +0 -265
  77. xinference/thirdparty/ChatTTS/utils/__init__.py +0 -0
  78. xinference/thirdparty/ChatTTS/utils/gpu_utils.py +0 -23
  79. xinference/thirdparty/ChatTTS/utils/infer_utils.py +0 -141
  80. xinference/thirdparty/ChatTTS/utils/io_utils.py +0 -14
  81. xinference/web/ui/build/static/js/main.77dd47c3.js +0 -3
  82. xinference/web/ui/build/static/js/main.77dd47c3.js.map +0 -1
  83. xinference/web/ui/node_modules/.cache/babel-loader/0cd591866aa345566e0b63fb51ff2043e163a770af6fdc2f3bad395d046353e2.json +0 -1
  84. xinference/web/ui/node_modules/.cache/babel-loader/37c1476717199863bbba1530e3513a9368f8f73001b75b4a85c2075956308027.json +0 -1
  85. xinference/web/ui/node_modules/.cache/babel-loader/3da7d55e87882a4af923e187b1351160e34ca102f589086439c15131a227fb6e.json +0 -1
  86. xinference/web/ui/node_modules/.cache/babel-loader/3fa1f69162f9c6dc0f6a6e21b64d49d6b8e6fa8dfa59a82cf829931c5f97d99f.json +0 -1
  87. xinference/web/ui/node_modules/.cache/babel-loader/46edc1fe657dfedb2e673148332bb442c6eb98f09f2592c389209e376510afa5.json +0 -1
  88. xinference/web/ui/node_modules/.cache/babel-loader/62e257ed9016471035fa1a7da57c9e2a4250974ed566b4d1295873d747c68eb2.json +0 -1
  89. xinference/web/ui/node_modules/.cache/babel-loader/72bcecc71c5267250edeb89608859d449b586f13ff9923a5e70e7172976ec403.json +0 -1
  90. xinference/web/ui/node_modules/.cache/babel-loader/82db357f3fd5b32215d747ee593f69ff06c95ad6cde37f71a96c8290aaab64c0.json +0 -1
  91. xinference/web/ui/node_modules/.cache/babel-loader/935efd2867664c58230378fdf2ff1ea85e58d853b7214014e20dfbca8dab7b05.json +0 -1
  92. xinference/web/ui/node_modules/.cache/babel-loader/bc6da27195ec4607bb472bf61f97c928ad4966fa64e4c2247661bedb7400abba.json +0 -1
  93. xinference/web/ui/node_modules/.cache/babel-loader/c2abe75f04ad82fba68f35ed9cbe2e287762c876684fddccccfa73f739489b65.json +0 -1
  94. xinference/web/ui/node_modules/.cache/babel-loader/e606671420d2937102c3c34b4b04056c11736408c1d3347b8cf42dfe61fb394b.json +0 -1
  95. xinference/web/ui/node_modules/.cache/babel-loader/f118f99c22b713c678c1209c4e1dd43fe86e3f6e801a4c0c35d3bbf41fd05fe6.json +0 -1
  96. xinference/web/ui/node_modules/.cache/babel-loader/f51bf63ddaa7afd125ef2254a105789333eecc1c94fdf5157a9b88ef7ad0a5bd.json +0 -1
  97. /xinference/web/ui/build/static/js/{main.77dd47c3.js.LICENSE.txt → main.95c1d652.js.LICENSE.txt} +0 -0
  98. {xinference-0.12.3.dist-info → xinference-0.13.1.dist-info}/LICENSE +0 -0
  99. {xinference-0.12.3.dist-info → xinference-0.13.1.dist-info}/WHEEL +0 -0
  100. {xinference-0.12.3.dist-info → xinference-0.13.1.dist-info}/entry_points.txt +0 -0
  101. {xinference-0.12.3.dist-info → xinference-0.13.1.dist-info}/top_level.txt +0 -0
@@ -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 _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import DeleteOutlineOutlinedIcon from'@mui/icons-material/DeleteOutlineOutlined';import OpenInBrowserOutlinedIcon from'@mui/icons-material/OpenInBrowserOutlined';import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Stack,Tab}from'@mui/material';import{DataGrid}from'@mui/x-data-grid';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 fetcher from'../../components/fetcher';import fetchWrapper from'../../components/fetchWrapper';import Title from'../../components/Title';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var RunningModels=function RunningModels(){var _React$useState=React.useState(sessionStorage.getItem('runningModelType')),_React$useState2=_slicedToArray(_React$useState,2),tabValue=_React$useState2[0],setTabValue=_React$useState2[1];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),llmData=_useState2[0],setLlmData=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),embeddingModelData=_useState4[0],setEmbeddingModelData=_useState4[1];var _useState5=useState([]),_useState6=_slicedToArray(_useState5,2),imageModelData=_useState6[0],setImageModelData=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),audioModelData=_useState8[0],setAudioModelData=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),rerankModelData=_useState10[0],setRerankModelData=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),flexibleModelData=_useState12[0],setFlexibleModelData=_useState12[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel,setIsUpdatingModel=_useContext2.setIsUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var endPoint=useContext(ApiContext).endPoint;var handleTabChange=function handleTabChange(event,newValue){setTabValue(newValue);navigate(newValue);sessionStorage.setItem('runningModelType',newValue);};var update=function update(isCallingApi){if(cookie.token===''||cookie.token===undefined){navigate('/login',{replace:true});return;}if(cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});return;}if(isCallingApi){setLlmData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setEmbeddingModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setAudioModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setImageModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setRerankModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setFlexibleModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);}else{setIsUpdatingModel(true);fetchWrapper.get('/v1/models').then(function(response){var newLlmData=[];var newEmbeddingModelData=[];var newImageModelData=[];var newAudioModelData=[];var newRerankModelData=[];var newFlexibleModelData=[];response.data.forEach(function(model){var newValue=_objectSpread(_objectSpread({},model),{},{id:model.id,url:model.id});if(newValue.model_type==='LLM'){newLlmData.push(newValue);}else if(newValue.model_type==='embedding'){newEmbeddingModelData.push(newValue);}else if(newValue.model_type==='audio'){newAudioModelData.push(newValue);}else if(newValue.model_type==='image'){newImageModelData.push(newValue);}else if(newValue.model_type==='rerank'){newRerankModelData.push(newValue);}else if(newValue.model_type==='flexible'){newFlexibleModelData.push(newValue);}});setLlmData(newLlmData);setEmbeddingModelData(newEmbeddingModelData);setAudioModelData(newAudioModelData);setImageModelData(newImageModelData);setRerankModelData(newRerankModelData);setFlexibleModelData(newFlexibleModelData);setIsUpdatingModel(false);}).catch(function(error){console.error('Error:',error);setIsUpdatingModel(false);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}};useEffect(function(){update(isCallingApi);// eslint-disable-next-line\n},[isCallingApi,cookie.token]);var llmColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'model_size_in_billions',headerName:'Size',flex:1},{field:'quantization',headerName:'Quantization',flex:1},{field:'replica',headerName:'Replica',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref){var row=_ref.row;var url=row.url;var openUrl=\"\".concat(endPoint,\"/\")+url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;var gradioUrl=\"\".concat(endPoint,\"/v1/ui/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsxs(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Web UI\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){// Make sure no ongoing call\nreturn;}setIsCallingApi(true);fetcher(openUrl,{method:'HEAD'}).then(function(response){if(response.status===404){// If web UI doesn't exist (404 Not Found)\nconsole.log('UI does not exist, creating new...');return fetcher(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_name:row.model_family,model_size_in_billions:row.model_size_in_billions,model_format:row.model_format,quantization:row.quantization,context_length:row.context_length,model_ability:row.model_ability,model_description:row.model_description,model_lang:row.model_lang})}).then(function(response){return response.json();}).then(function(){return window.open(openUrl,'_blank','noopener noreferrer');}).finally(function(){return setIsCallingApi(false);});}else if(response.ok){// If web UI does exist\nconsole.log('UI exists, opening...');window.open(openUrl,'_blank','noopener noreferrer');setIsCallingApi(false);}else{// Other HTTP errors\nconsole.error(\"Unexpected response status: \".concat(response.status));setIsCallingApi(false);}}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(OpenInBrowserOutlinedIcon,{})})}),/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})]});}}];var embeddingModelColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'replica',headerName:'Replica',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref2){var row=_ref2.row;var url=row.url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsx(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})});}}];var imageModelColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref3){var row=_ref3.row;//这个url指的是model_uid\nvar url=row.url;console.log('url: '+url);var openUrl=\"\".concat(endPoint,\"/\")+url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;var gradioUrl=\"\".concat(endPoint,\"/v1/ui/images/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsxs(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Web UI\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){// Make sure no ongoing call\nreturn;}setIsCallingApi(true);fetcher(openUrl,{method:'HEAD'}).then(function(response){if(response.status===404){// If web UI doesn't exist (404 Not Found)\nconsole.log('UI does not exist, creating new...');return fetcher(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_family:row.model_family,model_id:row.id,controlnet:row.controlnet,model_revision:row.model_revision,model_name:row.model_name})}).then(function(response){return response.json();}).then(function(){return window.open(openUrl,'_blank','noopener noreferrer');}).finally(function(){return setIsCallingApi(false);});}else if(response.ok){// If web UI does exist\nconsole.log('UI exists, opening...');window.open(openUrl,'_blank','noopener noreferrer');setIsCallingApi(false);}else{// Other HTTP errors\nconsole.error(\"Unexpected response status: \".concat(response.status));setIsCallingApi(false);}}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(OpenInBrowserOutlinedIcon,{})})}),/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})]});}}];var audioModelColumns=embeddingModelColumns;var rerankModelColumns=embeddingModelColumns;var flexibleModelColumns=embeddingModelColumns;var dataGridStyle={'& .MuiDataGrid-cell':{borderBottom:'none'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'};var noRowsOverlay=function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});};var noResultsOverlay=function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});};return/*#__PURE__*/_jsxs(Box,{sx:{height:'100%',width:'100%',padding:'20px 20px 0 20px'},children:[/*#__PURE__*/_jsx(Title,{title:\"Running Models\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:tabValue,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:tabValue,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Models\",value:\"/running_models/LLM\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/running_models/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank models\",value:\"/running_models/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image models\",value:\"/running_models/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio models\",value:\"/running_models/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible models\",value:\"/running_models/flexible\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/LLM\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:llmData,columns:llmColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:embeddingModelData,columns:embeddingModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:rerankModelData,columns:rerankModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:imageModelData,columns:imageModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:audioModelData,columns:audioModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/flexible\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:flexibleModelData,columns:flexibleModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})})]})]});};export default RunningModels;","map":{"version":3,"names":["DeleteOutlineOutlinedIcon","OpenInBrowserOutlinedIcon","TabContext","TabList","TabPanel","Box","Stack","Tab","DataGrid","React","useContext","useEffect","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","fetcher","fetchWrapper","Title","jsx","_jsx","jsxs","_jsxs","RunningModels","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","tabValue","setTabValue","_useState","_useState2","llmData","setLlmData","_useState3","_useState4","embeddingModelData","setEmbeddingModelData","_useState5","_useState6","imageModelData","setImageModelData","_useState7","_useState8","audioModelData","setAudioModelData","_useState9","_useState10","rerankModelData","setRerankModelData","_useState11","_useState12","flexibleModelData","setFlexibleModelData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","setIsUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","endPoint","handleTabChange","event","newValue","setItem","update","token","undefined","replace","id","url","get","then","response","newLlmData","newEmbeddingModelData","newImageModelData","newAudioModelData","newRerankModelData","newFlexibleModelData","data","forEach","model","_objectSpread","model_type","push","catch","error","console","status","message","llmColumns","field","headerName","flex","minWidth","sortable","filterable","disableColumnMenu","renderCell","_ref","row","openUrl","concat","closeUrl","gradioUrl","style","width","display","justifyContent","alignItems","children","title","borderWidth","backgroundColor","paddingLeft","paddingRight","onClick","method","log","headers","body","JSON","stringify","model_name","model_family","model_size_in_billions","model_format","quantization","context_length","model_ability","model_description","model_lang","json","window","open","finally","ok","m","p","borderRadius","border","borderColor","embeddingModelColumns","_ref2","imageModelColumns","_ref3","model_id","controlnet","model_revision","audioModelColumns","rerankModelColumns","flexibleModelColumns","dataGridStyle","borderBottom","fontWeight","overflowX","overflow","borderTop","noRowsOverlay","height","noResultsOverlay","sx","padding","value","onChange","label","rows","columns","autoHeight","slots"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/running_models/index.js"],"sourcesContent":["import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined'\nimport OpenInBrowserOutlinedIcon from '@mui/icons-material/OpenInBrowserOutlined'\nimport { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Stack, Tab } from '@mui/material'\nimport { DataGrid } from '@mui/x-data-grid'\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 fetcher from '../../components/fetcher'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport Title from '../../components/Title'\n\nconst RunningModels = () => {\n const [tabValue, setTabValue] = React.useState(\n sessionStorage.getItem('runningModelType')\n )\n const [llmData, setLlmData] = useState([])\n const [embeddingModelData, setEmbeddingModelData] = useState([])\n const [imageModelData, setImageModelData] = useState([])\n const [audioModelData, setAudioModelData] = useState([])\n const [rerankModelData, setRerankModelData] = useState([])\n const [flexibleModelData, setFlexibleModelData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel, setIsUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n const endPoint = useContext(ApiContext).endPoint\n\n const handleTabChange = (event, newValue) => {\n setTabValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('runningModelType', newValue)\n }\n\n const update = (isCallingApi) => {\n if (cookie.token === '' || cookie.token === undefined) {\n navigate('/login', { replace: true })\n return\n }\n if (cookie.token !== 'no_auth' && !sessionStorage.getItem('token')) {\n navigate('/login', { replace: true })\n return\n }\n if (isCallingApi) {\n setLlmData([{ id: 'Loading, do not refresh page...', url: 'IS_LOADING' }])\n setEmbeddingModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setAudioModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setImageModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setRerankModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setFlexibleModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n } else {\n setIsUpdatingModel(true)\n\n fetchWrapper\n .get('/v1/models')\n .then((response) => {\n const newLlmData = []\n const newEmbeddingModelData = []\n const newImageModelData = []\n const newAudioModelData = []\n const newRerankModelData = []\n const newFlexibleModelData = []\n response.data.forEach((model) => {\n let newValue = {\n ...model,\n id: model.id,\n url: model.id,\n }\n if (newValue.model_type === 'LLM') {\n newLlmData.push(newValue)\n } else if (newValue.model_type === 'embedding') {\n newEmbeddingModelData.push(newValue)\n } else if (newValue.model_type === 'audio') {\n newAudioModelData.push(newValue)\n } else if (newValue.model_type === 'image') {\n newImageModelData.push(newValue)\n } else if (newValue.model_type === 'rerank') {\n newRerankModelData.push(newValue)\n } else if (newValue.model_type === 'flexible') {\n newFlexibleModelData.push(newValue)\n }\n })\n setLlmData(newLlmData)\n setEmbeddingModelData(newEmbeddingModelData)\n setAudioModelData(newAudioModelData)\n setImageModelData(newImageModelData)\n setRerankModelData(newRerankModelData)\n setFlexibleModelData(newFlexibleModelData)\n setIsUpdatingModel(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsUpdatingModel(false)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n }\n }\n\n useEffect(() => {\n update(isCallingApi)\n // eslint-disable-next-line\n }, [isCallingApi, cookie.token])\n\n const llmColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'model_size_in_billions',\n headerName: 'Size',\n flex: 1,\n },\n {\n field: 'quantization',\n headerName: 'Quantization',\n flex: 1,\n },\n {\n field: 'replica',\n headerName: 'Replica',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n const url = row.url\n const openUrl = `${endPoint}/` + url\n const closeUrl = `${endPoint}/v1/models/` + url\n const gradioUrl = `${endPoint}/v1/ui/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Launch Web UI\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n // Make sure no ongoing call\n return\n }\n\n setIsCallingApi(true)\n\n fetcher(openUrl, {\n method: 'HEAD',\n })\n .then((response) => {\n if (response.status === 404) {\n // If web UI doesn't exist (404 Not Found)\n console.log('UI does not exist, creating new...')\n return fetcher(gradioUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model_type: row.model_type,\n model_name: row.model_family,\n model_size_in_billions: row.model_size_in_billions,\n model_format: row.model_format,\n quantization: row.quantization,\n context_length: row.context_length,\n model_ability: row.model_ability,\n model_description: row.model_description,\n model_lang: row.model_lang,\n }),\n })\n .then((response) => response.json())\n .then(() =>\n window.open(openUrl, '_blank', 'noopener noreferrer')\n )\n .finally(() => setIsCallingApi(false))\n } else if (response.ok) {\n // If web UI does exist\n console.log('UI exists, opening...')\n window.open(openUrl, '_blank', 'noopener noreferrer')\n setIsCallingApi(false)\n } else {\n // Other HTTP errors\n console.error(\n `Unexpected response status: ${response.status}`\n )\n setIsCallingApi(false)\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <OpenInBrowserOutlinedIcon />\n </Box>\n </button>\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n\n const embeddingModelColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'replica',\n headerName: 'Replica',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n const url = row.url\n const closeUrl = `${endPoint}/v1/models/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n const imageModelColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n //这个url指的是model_uid\n const url = row.url\n console.log('url: ' + url)\n const openUrl = `${endPoint}/` + url\n const closeUrl = `${endPoint}/v1/models/` + url\n const gradioUrl = `${endPoint}/v1/ui/images/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Launch Web UI\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n // Make sure no ongoing call\n return\n }\n\n setIsCallingApi(true)\n\n fetcher(openUrl, {\n method: 'HEAD',\n })\n .then((response) => {\n if (response.status === 404) {\n // If web UI doesn't exist (404 Not Found)\n console.log('UI does not exist, creating new...')\n return fetcher(gradioUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model_type: row.model_type,\n model_family: row.model_family,\n model_id: row.id,\n controlnet: row.controlnet,\n model_revision: row.model_revision,\n model_name: row.model_name,\n }),\n })\n .then((response) => response.json())\n .then(() =>\n window.open(openUrl, '_blank', 'noopener noreferrer')\n )\n .finally(() => setIsCallingApi(false))\n } else if (response.ok) {\n // If web UI does exist\n console.log('UI exists, opening...')\n window.open(openUrl, '_blank', 'noopener noreferrer')\n setIsCallingApi(false)\n } else {\n // Other HTTP errors\n console.error(\n `Unexpected response status: ${response.status}`\n )\n setIsCallingApi(false)\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <OpenInBrowserOutlinedIcon />\n </Box>\n </button>\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n const audioModelColumns = embeddingModelColumns\n const rerankModelColumns = embeddingModelColumns\n const flexibleModelColumns = embeddingModelColumns\n\n const dataGridStyle = {\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .MuiDataGrid-columnHeaders': {\n borderBottom: 'none',\n },\n '& .MuiDataGrid-columnHeaderTitle': {\n fontWeight: 'bold',\n },\n '& .MuiDataGrid-virtualScroller': {\n overflowX: 'visible !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-footerContainer': {\n borderTop: 'none',\n },\n 'border-width': '0px',\n }\n\n const noRowsOverlay = () => {\n return (\n <Stack height=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n No Running Models\n </Stack>\n )\n }\n\n const noResultsOverlay = () => {\n return (\n <Stack height=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n No Running Models Matches\n </Stack>\n )\n }\n\n return (\n <Box\n sx={{\n height: '100%',\n width: '100%',\n padding: '20px 20px 0 20px',\n }}\n >\n <Title title=\"Running Models\" />\n <ErrorMessageSnackBar />\n <TabContext value={tabValue}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n value={tabValue}\n onChange={handleTabChange}\n aria-label=\"tabs\"\n >\n <Tab label=\"Language Models\" value=\"/running_models/LLM\" />\n <Tab label=\"Embedding Models\" value=\"/running_models/embedding\" />\n <Tab label=\"Rerank models\" value=\"/running_models/rerank\" />\n <Tab label=\"Image models\" value=\"/running_models/image\" />\n <Tab label=\"Audio models\" value=\"/running_models/audio\" />\n <Tab label=\"Flexible models\" value=\"/running_models/flexible\" />\n </TabList>\n </Box>\n <TabPanel value=\"/running_models/LLM\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={llmData}\n columns={llmColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/embedding\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={embeddingModelData}\n columns={embeddingModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/rerank\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={rerankModelData}\n columns={rerankModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/image\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={imageModelData}\n columns={imageModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/audio\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={audioModelData}\n columns={audioModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/flexible\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={flexibleModelData}\n columns={flexibleModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots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AM,CAAErD,KAAK,CAAE,MAAO,CAAE,CAAAI,QAAA,cACzClG,IAAA,CAACb,QAAQ,EACPuK,IAAI,CAAEzH,iBAAkB,CACxB0H,OAAO,CAAEhB,oBAAqB,CAC9BiB,UAAU,CAAE,IAAK,CACjBP,EAAE,CAAET,aAAc,CAClBiB,KAAK,CAAE,CACLX,aAAa,CAAEA,aAAa,CAC5BE,gBAAgB,CAAEA,gBACpB,CAAE,CACH,CAAC,CACC,CAAC,CACE,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAjJ,aAAa","ignoreList":[]},"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 _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import{Cookies}from'react-cookie';var cookies=new Cookies();var getBaseUrl=function getBaseUrl(){var base_URL='';if(!process.env.NODE_ENV||process.env.NODE_ENV==='development'){base_URL='http://127.0.0.1:9997';}else{var fullUrl=window.location.href;base_URL=fullUrl.split('/ui')[0];}return base_URL;};var apiBase=getBaseUrl();var fetchWrapper={get:function(){var _get=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpoint){var config,url,headers,response,_args=arguments;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:config=_args.length>1&&_args[1]!==undefined?_args[1]:{};url=\"\".concat(apiBase).concat(endpoint);headers=_objectSpread({'Content-Type':'application/json'},config.headers);if(cookies.get('token')!=='no_auth'){headers.Authorization='Bearer '+sessionStorage.getItem('token');}_context.next=6;return fetch(url,_objectSpread(_objectSpread({method:'GET'},config),{},{headers:headers}));case 6:response=_context.sent;return _context.abrupt(\"return\",fetchWrapper.handleResponse(response));case 8:case\"end\":return _context.stop();}},_callee);}));function get(_x){return _get.apply(this,arguments);}return get;}(),post:function(){var _post=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(endpoint,body){var config,url,headers,response,_args2=arguments;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:config=_args2.length>2&&_args2[2]!==undefined?_args2[2]:{};url=\"\".concat(apiBase).concat(endpoint);headers=_objectSpread({'Content-Type':'application/json'},config.headers);if(cookies.get('token')!=='no_auth'){headers.Authorization='Bearer '+sessionStorage.getItem('token');}_context2.next=6;return fetch(url,_objectSpread(_objectSpread({method:'POST',body:JSON.stringify(body)},config),{},{headers:headers}));case 6:response=_context2.sent;return _context2.abrupt(\"return\",fetchWrapper.handleResponse(response));case 8:case\"end\":return _context2.stop();}},_callee2);}));function post(_x2,_x3){return _post.apply(this,arguments);}return post;}(),put:function(){var _put=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(endpoint,body){var config,url,headers,response,_args3=arguments;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:config=_args3.length>2&&_args3[2]!==undefined?_args3[2]:{};url=\"\".concat(apiBase).concat(endpoint);headers=_objectSpread({'Content-Type':'application/json'},config.headers);if(cookies.get('token')!=='no_auth'){headers.Authorization='Bearer '+sessionStorage.getItem('token');}_context3.next=6;return fetch(url,_objectSpread(_objectSpread({method:'PUT',body:JSON.stringify(body)},config),{},{headers:headers}));case 6:response=_context3.sent;return _context3.abrupt(\"return\",fetchWrapper.handleResponse(response));case 8:case\"end\":return _context3.stop();}},_callee3);}));function put(_x4,_x5){return _put.apply(this,arguments);}return put;}(),delete:function(){var _delete2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(endpoint){var config,url,headers,response,_args4=arguments;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:config=_args4.length>1&&_args4[1]!==undefined?_args4[1]:{};url=\"\".concat(apiBase).concat(endpoint);headers=_objectSpread({'Content-Type':'application/json'},config.headers);if(cookies.get('token')!=='no_auth'){headers.Authorization='Bearer '+sessionStorage.getItem('token');}_context4.next=6;return fetch(url,_objectSpread(_objectSpread({method:'DELETE'},config),{},{headers:headers}));case 6:response=_context4.sent;return _context4.abrupt(\"return\",fetchWrapper.handleResponse(response));case 8:case\"end\":return _context4.stop();}},_callee4);}));function _delete(_x6){return _delete2.apply(this,arguments);}return _delete;}(),handleResponse:function(){var _handleResponse=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(response){var errorData,error,data;return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:if(response.status==401&&localStorage.getItem('authStatus')!=='401'){localStorage.setItem('authStatus','401');window.dispatchEvent(new Event('auth-status'));}else if(response.status==403&&localStorage.getItem('authStatus')!=='403'){localStorage.setItem('authStatus','403');window.dispatchEvent(new Event('auth-status'));}if(response.ok){_context5.next=8;break;}_context5.next=4;return response.json();case 4:errorData=_context5.sent;error=new Error(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));error.response=response;throw error;case 8:_context5.next=10;return response.json();case 10:data=_context5.sent;return _context5.abrupt(\"return\",data);case 12:case\"end\":return _context5.stop();}},_callee5);}));function handleResponse(_x7){return _handleResponse.apply(this,arguments);}return handleResponse;}()};export default fetchWrapper;","map":{"version":3,"names":["Cookies","cookies","getBaseUrl","base_URL","process","env","NODE_ENV","fullUrl","window","location","href","split","apiBase","fetchWrapper","get","_get","_asyncToGenerator","_regeneratorRuntime","mark","_callee","endpoint","config","url","headers","response","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","concat","_objectSpread","Authorization","sessionStorage","getItem","fetch","method","sent","abrupt","handleResponse","stop","_x","apply","post","_post","_callee2","body","_args2","_callee2$","_context2","JSON","stringify","_x2","_x3","put","_put","_callee3","_args3","_callee3$","_context3","_x4","_x5","delete","_delete2","_callee4","_args4","_callee4$","_context4","_delete","_x6","_handleResponse","_callee5","errorData","error","data","_callee5$","_context5","status","localStorage","setItem","dispatchEvent","Event","ok","json","Error","detail","_x7"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/fetchWrapper.js"],"sourcesContent":["import { Cookies } from 'react-cookie'\n\nconst cookies = new Cookies()\n\nconst getBaseUrl = () => {\n let base_URL = ''\n if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {\n base_URL = 'http://127.0.0.1:9997'\n } else {\n const fullUrl = window.location.href\n base_URL = fullUrl.split('/ui')[0]\n }\n return base_URL\n}\n\nconst apiBase = getBaseUrl()\n\nconst fetchWrapper = {\n get: async (endpoint, config = {}) => {\n const url = `${apiBase}${endpoint}`\n const headers = {\n 'Content-Type': 'application/json',\n ...config.headers,\n }\n if (cookies.get('token') !== 'no_auth') {\n headers.Authorization = 'Bearer ' + sessionStorage.getItem('token')\n }\n const response = await fetch(url, {\n method: 'GET',\n ...config,\n headers,\n })\n\n return fetchWrapper.handleResponse(response)\n },\n\n post: async (endpoint, body, config = {}) => {\n const url = `${apiBase}${endpoint}`\n const headers = {\n 'Content-Type': 'application/json',\n ...config.headers,\n }\n if (cookies.get('token') !== 'no_auth') {\n headers.Authorization = 'Bearer ' + sessionStorage.getItem('token')\n }\n const response = await fetch(url, {\n method: 'POST',\n body: JSON.stringify(body),\n ...config,\n headers,\n })\n\n return fetchWrapper.handleResponse(response)\n },\n\n put: async (endpoint, body, config = {}) => {\n const url = `${apiBase}${endpoint}`\n const headers = {\n 'Content-Type': 'application/json',\n ...config.headers,\n }\n if (cookies.get('token') !== 'no_auth') {\n headers.Authorization = 'Bearer ' + sessionStorage.getItem('token')\n }\n const response = await fetch(url, {\n method: 'PUT',\n body: JSON.stringify(body),\n ...config,\n headers,\n })\n\n return fetchWrapper.handleResponse(response)\n },\n\n delete: async (endpoint, config = {}) => {\n const url = `${apiBase}${endpoint}`\n const headers = {\n 'Content-Type': 'application/json',\n ...config.headers,\n }\n if (cookies.get('token') !== 'no_auth') {\n headers.Authorization = 'Bearer ' + sessionStorage.getItem('token')\n }\n const response = await fetch(url, {\n method: 'DELETE',\n ...config,\n headers,\n })\n\n return fetchWrapper.handleResponse(response)\n },\n\n handleResponse: async (response) => {\n if (\n response.status == 401 &&\n localStorage.getItem('authStatus') !== '401'\n ) {\n localStorage.setItem('authStatus', '401')\n window.dispatchEvent(new Event('auth-status'))\n } else if (\n response.status == 403 &&\n localStorage.getItem('authStatus') !== '403'\n ) {\n localStorage.setItem('authStatus', '403')\n window.dispatchEvent(new Event('auth-status'))\n }\n\n if (!response.ok) {\n const errorData = await response.json()\n const error = new Error(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n error.response = response\n throw error\n }\n const data = await response.json()\n return data\n },\n}\n\nexport default fetchWrapper\n"],"mappings":"sbAAA,OAASA,OAAO,KAAQ,cAAc,CAEtC,GAAM,CAAAC,OAAO,CAAG,GAAI,CAAAD,OAAO,CAAC,CAAC,CAE7B,GAAM,CAAAE,UAAU,CAAG,QAAb,CAAAA,UAAUA,CAAA,CAAS,CACvB,GAAI,CAAAC,QAAQ,CAAG,EAAE,CACjB,GAAI,CAACC,OAAO,CAACC,GAAG,CAACC,QAAQ,EAAIF,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,aAAa,CAAE,CACnEH,QAAQ,CAAG,uBAAuB,CACpC,CAAC,IAAM,CACL,GAAM,CAAAI,OAAO,CAAGC,MAAM,CAACC,QAAQ,CAACC,IAAI,CACpCP,QAAQ,CAAGI,OAAO,CAACI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACpC,CACA,MAAO,CAAAR,QAAQ,CACjB,CAAC,CAED,GAAM,CAAAS,OAAO,CAAGV,UAAU,CAAC,CAAC,CAE5B,GAAM,CAAAW,YAAY,CAAG,CACnBC,GAAG,gBAAAC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5C,CACA4C,YAAY,CAACC,OAAO,CAAC,YAAY,CAAE,KAAK,CAAC,CACzC3E,MAAM,CAAC4E,aAAa,CAAC,GAAI,CAAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAChD,CAAC,IAAM,IACL7D,QAAQ,CAACyD,MAAM,EAAI,GAAG,EACtBC,YAAY,CAAC5C,OAAO,CAAC,YAAY,CAAC,GAAK,KAAK,CAC5C,CACA4C,YAAY,CAACC,OAAO,CAAC,YAAY,CAAE,KAAK,CAAC,CACzC3E,MAAM,CAAC4E,aAAa,CAAC,GAAI,CAAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAChD,CAAC,GAEI7D,QAAQ,CAAC8D,EAAE,EAAAN,SAAA,CAAAjD,IAAA,UAAAiD,SAAA,CAAAjD,IAAA,SACU,CAAAP,QAAQ,CAAC+D,IAAI,CAAC,CAAC,QAAjCX,SAAS,CAAAI,SAAA,CAAAvC,IAAA,CACToC,KAAK,CAAG,GAAI,CAAAW,KAAK,kBAAAtD,MAAA,CACJV,QAAQ,CAACyD,MAAM,QAAA/C,MAAA,CAC9B0C,SAAS,CAACa,MAAM,EAAI,eAAe,CAEvC,CAAC,CACDZ,KAAK,CAACrD,QAAQ,CAAGA,QAAQ,MACnB,CAAAqD,KAAK,QAAAG,SAAA,CAAAjD,IAAA,UAEM,CAAAP,QAAQ,CAAC+D,IAAI,CAAC,CAAC,SAA5BT,IAAI,CAAAE,SAAA,CAAAvC,IAAA,QAAAuC,SAAA,CAAAtC,MAAA,UACHoC,IAAI,2BAAAE,SAAA,CAAApC,IAAA,MAAA+B,QAAA,GACZ,YAAAhC,eAAA+C,GAAA,SAAAhB,eAAA,CAAA5B,KAAA,MAAApB,SAAA,UAAAiB,cAAA,IACH,CAAC,CAED,cAAe,CAAA9B,YAAY","ignoreList":[]},"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 _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{AddBoxOutlined,ChevronRightOutlined,DnsOutlined,GitHub,RocketLaunchOutlined,SmartToyOutlined}from'@mui/icons-material';import{Box,Drawer,List,ListItem,ListItemButton,ListItemIcon,ListItemText,Typography,useTheme}from'@mui/material';import{useEffect,useState}from'react';import{useLocation,useNavigate}from'react-router-dom';import icon from'../media/icon.webp';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var navItems=[{text:'Launch Model',icon:/*#__PURE__*/_jsx(RocketLaunchOutlined,{})},{text:'Running Models',icon:/*#__PURE__*/_jsx(SmartToyOutlined,{})},{text:'Register Model',icon:/*#__PURE__*/_jsx(AddBoxOutlined,{})},{text:'Cluster Information',icon:/*#__PURE__*/_jsx(DnsOutlined,{})},{text:'Contact Us',icon:/*#__PURE__*/_jsx(GitHub,{})}];var MenuSide=function MenuSide(){var theme=useTheme();var _useLocation=useLocation(),pathname=_useLocation.pathname;var _useState=useState(''),_useState2=_slicedToArray(_useState,2),active=_useState2[0],setActive=_useState2[1];var navigate=useNavigate();var _useState3=useState(\"\".concat(Math.min(Math.max(window.innerWidth*0.2,287),320),\"px\")),_useState4=_slicedToArray(_useState3,2),drawerWidth=_useState4[0],setDrawerWidth=_useState4[1];useEffect(function(){setActive(pathname.substring(1));},[pathname]);useEffect(function(){var screenWidth=window.innerWidth;var maxDrawerWidth=Math.min(Math.max(screenWidth*0.2,287),320);setDrawerWidth(\"\".concat(maxDrawerWidth,\"px\"));// Update the drawer width on window resize\nvar handleResize=function handleResize(){var newScreenWidth=window.innerWidth;var newMaxDrawerWidth=Math.min(Math.max(newScreenWidth*0.2,287),320);setDrawerWidth(\"\".concat(newMaxDrawerWidth,\"px\"));};window.addEventListener('resize',handleResize);return function(){window.removeEventListener('resize',handleResize);};},[]);return/*#__PURE__*/_jsxs(Drawer,{variant:\"permanent\",sx:_objectSpread(_objectSpread({width:drawerWidth},theme.mixins.toolbar),{},_defineProperty({flexShrink:0},\"& .MuiDrawer-paper\",{width:drawerWidth,boxSizing:'border-box'})),children:[/*#__PURE__*/_jsx(Box,{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",children:/*#__PURE__*/_jsx(Box,{display:\"flex\",m:\"2rem 1rem 0rem 1rem\",width:\"217px\",children:/*#__PURE__*/_jsxs(Box,{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",textTransform:\"none\",children:[/*#__PURE__*/_jsx(Box,{component:\"img\",alt:\"profile\",src:icon,height:\"60px\",width:\"60px\",borderRadius:\"50%\",sx:{objectFit:'cover',mr:1.5}}),/*#__PURE__*/_jsx(Box,{textAlign:\"left\",children:/*#__PURE__*/_jsx(Typography,{fontWeight:\"bold\",fontSize:\"1.7rem\",children:'Xinference'})})]})})}),/*#__PURE__*/_jsx(Box,{children:/*#__PURE__*/_jsxs(Box,{width:\"100%\",children:[/*#__PURE__*/_jsx(Box,{m:\"1.5rem 2rem 2rem 3rem\"}),/*#__PURE__*/_jsx(List,{children:navItems.map(function(_ref){var text=_ref.text,icon=_ref.icon;if(!icon){return/*#__PURE__*/_jsx(Typography,{sx:{m:'2.25rem 0 1rem 3rem'},children:text},text);}var link=text.toLowerCase().replace(' ','_');return/*#__PURE__*/_jsx(ListItem,{children:/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){if(link==='contact_us'){window.open('https://github.com/xorbitsai/inference','_blank','noreferrer');}else if(link==='launch_model'){sessionStorage.setItem('modelType','/launch_model/llm');navigate('/launch_model/llm');setActive(link);sessionStorage.setItem('lastActiveUrl',link);console.log(active);}else if(link==='cluster_information'){navigate('/cluster_info');setActive(link);}else if(link==='running_models'){navigate('/running_models/LLM');sessionStorage.setItem('runningModelType','/running_models/LLM');setActive(link);sessionStorage.setItem('lastActiveUrl',link);console.log(active);}else if(link==='register_model'){sessionStorage.setItem('registerModelType','/register_model/llm');navigate('/register_model/llm');setActive(link);sessionStorage.setItem('lastActiveUrl',link);console.log(active);}else{navigate(\"/\".concat(link));setActive(link);console.log(active);}},children:[/*#__PURE__*/_jsx(ListItemIcon,{sx:{ml:'2rem'},children:icon}),/*#__PURE__*/_jsx(ListItemText,{primary:text}),/*#__PURE__*/_jsx(ChevronRightOutlined,{sx:{ml:'auto'}})]})},text);})})]})})]});};export default MenuSide;","map":{"version":3,"names":["AddBoxOutlined","ChevronRightOutlined","DnsOutlined","GitHub","RocketLaunchOutlined","SmartToyOutlined","Box","Drawer","List","ListItem","ListItemButton","ListItemIcon","ListItemText","Typography","useTheme","useEffect","useState","useLocation","useNavigate","icon","jsx","_jsx","jsxs","_jsxs","navItems","text","MenuSide","theme","_useLocation","pathname","_useState","_useState2","_slicedToArray","active","setActive","navigate","_useState3","concat","Math","min","max","window","innerWidth","_useState4","drawerWidth","setDrawerWidth","substring","screenWidth","maxDrawerWidth","handleResize","newScreenWidth","newMaxDrawerWidth","addEventListener","removeEventListener","variant","sx","_objectSpread","width","mixins","toolbar","_defineProperty","flexShrink","boxSizing","children","display","justifyContent","alignItems","m","textTransform","component","alt","src","height","borderRadius","objectFit","mr","textAlign","fontWeight","fontSize","map","_ref","link","toLowerCase","replace","onClick","open","sessionStorage","setItem","console","log","ml","primary"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/MenuSide.js"],"sourcesContent":["import {\n AddBoxOutlined,\n ChevronRightOutlined,\n DnsOutlined,\n GitHub,\n RocketLaunchOutlined,\n SmartToyOutlined,\n} from '@mui/icons-material'\nimport {\n Box,\n Drawer,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { useEffect, useState } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\n\nimport icon from '../media/icon.webp'\n\nconst navItems = [\n {\n text: 'Launch Model',\n icon: <RocketLaunchOutlined />,\n },\n {\n text: 'Running Models',\n icon: <SmartToyOutlined />,\n },\n {\n text: 'Register Model',\n icon: <AddBoxOutlined />,\n },\n {\n text: 'Cluster Information',\n icon: <DnsOutlined />,\n },\n {\n text: 'Contact Us',\n icon: <GitHub />,\n },\n]\n\nconst MenuSide = () => {\n const theme = useTheme()\n const { pathname } = useLocation()\n const [active, setActive] = useState('')\n const navigate = useNavigate()\n const [drawerWidth, setDrawerWidth] = useState(\n `${Math.min(Math.max(window.innerWidth * 0.2, 287), 320)}px`\n )\n\n useEffect(() => {\n setActive(pathname.substring(1))\n }, [pathname])\n\n useEffect(() => {\n const screenWidth = window.innerWidth\n const maxDrawerWidth = Math.min(Math.max(screenWidth * 0.2, 287), 320)\n setDrawerWidth(`${maxDrawerWidth}px`)\n\n // Update the drawer width on window resize\n const handleResize = () => {\n const newScreenWidth = window.innerWidth\n const newMaxDrawerWidth = Math.min(\n Math.max(newScreenWidth * 0.2, 287),\n 320\n )\n setDrawerWidth(`${newMaxDrawerWidth}px`)\n }\n\n window.addEventListener('resize', handleResize)\n return () => {\n window.removeEventListener('resize', handleResize)\n }\n }, [])\n\n return (\n <Drawer\n variant=\"permanent\"\n sx={{\n width: drawerWidth,\n ...theme.mixins.toolbar,\n flexShrink: 0,\n [`& .MuiDrawer-paper`]: {\n width: drawerWidth,\n boxSizing: 'border-box',\n },\n }}\n >\n {/* Title */}\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n width=\"100%\"\n >\n <Box display=\"flex\" m=\"2rem 1rem 0rem 1rem\" width=\"217px\">\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n textTransform=\"none\"\n >\n <Box\n component=\"img\"\n alt=\"profile\"\n src={icon}\n height=\"60px\"\n width=\"60px\"\n borderRadius=\"50%\"\n sx={{ objectFit: 'cover', mr: 1.5 }}\n />\n <Box textAlign=\"left\">\n <Typography fontWeight=\"bold\" fontSize=\"1.7rem\">\n {'Xinference'}\n </Typography>\n </Box>\n </Box>\n </Box>\n </Box>\n\n <Box>\n <Box width=\"100%\">\n <Box m=\"1.5rem 2rem 2rem 3rem\"></Box>\n <List>\n {navItems.map(({ text, icon }) => {\n if (!icon) {\n return (\n <Typography key={text} sx={{ m: '2.25rem 0 1rem 3rem' }}>\n {text}\n </Typography>\n )\n }\n\n const link = text.toLowerCase().replace(' ', '_')\n\n return (\n <ListItem key={text}>\n <ListItemButton\n onClick={() => {\n if (link === 'contact_us') {\n window.open(\n 'https://github.com/xorbitsai/inference',\n '_blank',\n 'noreferrer'\n )\n } else if (link === 'launch_model') {\n sessionStorage.setItem('modelType', '/launch_model/llm')\n navigate('/launch_model/llm')\n setActive(link)\n sessionStorage.setItem('lastActiveUrl', link)\n console.log(active)\n } else if (link === 'cluster_information') {\n navigate('/cluster_info')\n setActive(link)\n } else if (link === 'running_models') {\n navigate('/running_models/LLM')\n sessionStorage.setItem(\n 'runningModelType',\n '/running_models/LLM'\n )\n setActive(link)\n sessionStorage.setItem('lastActiveUrl', link)\n console.log(active)\n } else if (link === 'register_model') {\n sessionStorage.setItem(\n 'registerModelType',\n '/register_model/llm'\n )\n navigate('/register_model/llm')\n setActive(link)\n sessionStorage.setItem('lastActiveUrl', link)\n console.log(active)\n } else {\n navigate(`/${link}`)\n setActive(link)\n console.log(active)\n }\n }}\n >\n <ListItemIcon\n sx={{\n ml: '2rem',\n }}\n >\n {icon}\n </ListItemIcon>\n <ListItemText primary={text} />\n <ChevronRightOutlined sx={{ ml: 'auto' }} />\n </ListItemButton>\n </ListItem>\n )\n })}\n </List>\n </Box>\n </Box>\n </Drawer>\n )\n}\n\nexport default MenuSide\n"],"mappings":"waAAA,OACEA,cAAc,CACdC,oBAAoB,CACpBC,WAAW,CACXC,MAAM,CACNC,oBAAoB,CACpBC,gBAAgB,KACX,qBAAqB,CAC5B,OACEC,GAAG,CACHC,MAAM,CACNC,IAAI,CAC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ACF,CAAC,CACDrD,SAAS,CAAC+C,IAAI,CAAC,CACfK,cAAc,CAACC,OAAO,CAAC,eAAe,CAAEN,IAAI,CAAC,CAC7CO,OAAO,CAACC,GAAG,CAACxD,MAAM,CAAC,CACrB,CAAC,IAAM,IAAIgD,IAAI,GAAK,gBAAgB,CAAE,CACpCK,cAAc,CAACC,OAAO,CACpB,mBAAmB,CACnB,qBACF,CAAC,CACDpD,QAAQ,CAAC,qBAAqB,CAAC,CAC/BD,SAAS,CAAC+C,IAAI,CAAC,CACfK,cAAc,CAACC,OAAO,CAAC,eAAe,CAAEN,IAAI,CAAC,CAC7CO,OAAO,CAACC,GAAG,CAACxD,MAAM,CAAC,CACrB,CAAC,IAAM,CACLE,QAAQ,KAAAE,MAAA,CAAK4C,IAAI,CAAE,CAAC,CACpB/C,SAAS,CAAC+C,IAAI,CAAC,CACfO,OAAO,CAACC,GAAG,CAACxD,MAAM,CAAC,CACrB,CACF,CAAE,CAAA8B,QAAA,eAEF1C,IAAA,CAACV,YAAY,EACX4C,EAAE,CAAE,CACFmC,EAAE,CAAE,MACN,CAAE,CAAA3B,QAAA,CAED5C,IAAI,CACO,CAAC,cACfE,IAAA,CAACT,YAAY,EAAC+E,OAAO,CAAElE,IAAK,CAAE,CAAC,cAC/BJ,IAAA,CAACpB,oBAAoB,EAACsD,EAAE,CAAE,CAAEmC,EAAE,CAAE,MAAO,CAAE,CAAE,CAAC,EAC9B,CAAC,EApDJjE,IAqDL,CAAC,CAEf,CAAC,CAAC,CACE,CAAC,EACJ,CAAC,CACH,CAAC,EACA,CAAC,CAEb,CAAC,CAED,cAAe,CAAAC,QAAQ","ignoreList":[]},"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 _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{Box,Chip,FormControl,InputLabel,MenuItem,Select}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import ModelCard from'./modelCard';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,gpuAvailable=_ref.gpuAvailable;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 _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),status=_useState6[0],setStatus=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),completeDeleteArr=_useState8[0],setCompleteDeleteArr=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),collectionArr=_useState10[0],setCollectionArr=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),filterArr=_useState12[0],setFilterArr=_useState12[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var filter=function filter(registration){if(searchTerm!==''){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())){return false;}}if(completeDeleteArr.includes(registration.model_name)){registration.cache_status=Array.isArray(registration.cache_status)?[false]:false;}if(filterArr.length===1){if(filterArr[0]==='cached'){return registration.cache_status&&!completeDeleteArr.includes(registration.model_name);}else{return collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name);}}else if(filterArr.length>1){return registration.cache_status&&!completeDeleteArr.includes(registration.model_name)&&(collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name));}return true;};var handleCompleteDelete=function handleCompleteDelete(model_name){setCompleteDeleteArr([].concat(_toConsumableArray(completeDeleteArr),[model_name]));};var update=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){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:try{setIsCallingApi(true);fetchWrapper.get(\"/v1/model_registrations/\".concat(modelType,\"?detailed=true\")).then(function(data){var builtinModels=data.filter(function(v){return v.is_builtin;});setRegistrationData(builtinModels);var collectionData=JSON.parse(localStorage.getItem('collectionArr'));setCollectionArr(collectionData);});}catch(error){console.error('Error:',error);}finally{setIsCallingApi(false);}case 3:case\"end\":return _context.stop();}},_callee);}));return function update(){return _ref2.apply(this,arguments);};}();useEffect(function(){update();},[]);var getCollectionArr=function getCollectionArr(data){setCollectionArr(data);};var handleChangeFilter=function handleChangeFilter(value){setStatus(value);var arr=[].concat(_toConsumableArray(filterArr.filter(function(item){return item!==value;})),[value]);setFilterArr(arr);};var handleDeleteChip=function handleDeleteChip(item){setFilterArr(filterArr.filter(function(subItem){return subItem!==item;}));if(item===status)setStatus('');};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'grid',gridTemplateColumns:'150px 1fr',columnGap:'20px',margin:'30px 2rem'},children:[/*#__PURE__*/_jsxs(FormControl,{sx:{marginTop:2,minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"select-status\",children:\"Status\"}),/*#__PURE__*/_jsxs(Select,{id:\"status\",labelId:\"select-status\",label:\"Status\",onChange:function onChange(e){return handleChangeFilter(e.target.value);},value:status,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"cached\",children:\"cached\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"favorite\",children:\"favorite\"})]})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:\"Search for \".concat(modelType,\" model name\"),value:searchTerm,onChange:function onChange(e){return setSearchTerm(e.target.value);},size:\"small\",hotkey:\"/\"})})]}),/*#__PURE__*/_jsx(\"div\",{style:{margin:'0 0 30px 30px'},children:filterArr.map(function(item,index){return/*#__PURE__*/_jsx(Chip,{label:item,variant:\"outlined\",size:\"small\",color:\"primary\",style:{marginRight:10},onDelete:function onDelete(){return handleDeleteChip(item);}},index);})}),/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'},children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,modelType:modelType,gpuAvailable:gpuAvailable,onHandleCompleteDelete:handleCompleteDelete,onGetCollectionArr:getCollectionArr},filteredRegistration.model_name);})})]});};export default LaunchModelComponent;","map":{"version":3,"names":["Box","Chip","FormControl","InputLabel","MenuItem","Select","React","useContext","useEffect","useState","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","LaunchModelComponent","_ref","modelType","gpuAvailable","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","status","setStatus","_useState7","_useState8","completeDeleteArr","setCompleteDeleteArr","_useState9","_useState10","collectionArr","setCollectionArr","_useState11","_useState12","filterArr","setFilterArr","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","filter","registration","modelName","model_name","toLowerCase","includes","cache_status","Array","isArray","length","handleCompleteDelete","concat","_toConsumableArray","update","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","get","then","data","builtinModels","v","is_builtin","collectionData","JSON","parse","localStorage","getItem","error","console","stop","apply","arguments","getCollectionArr","handleChangeFilter","value","arr","item","handleDeleteChip","subItem","m","children","style","display","gridTemplateColumns","columnGap","margin","sx","marginTop","minWidth","size","id","labelId","label","onChange","e","target","width","variant","type","hotkey","map","index","color","marginRight","onDelete","paddingLeft","gridGap","filteredRegistration","url","modelData","onHandleCompleteDelete","onGetCollectionArr"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/LaunchModelComponent.js"],"sourcesContent":["import {\n Box,\n Chip,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n} from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst LaunchModelComponent = ({ modelType, gpuAvailable }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const [searchTerm, setSearchTerm] = useState('')\n const [status, setStatus] = useState('')\n const [completeDeleteArr, setCompleteDeleteArr] = useState([])\n const [collectionArr, setCollectionArr] = useState([])\n const [filterArr, setFilterArr] = useState([])\n\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n const filter = (registration) => {\n if (searchTerm !== '') {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n if (!modelName.includes(searchTerm.toLowerCase())) {\n return false\n }\n }\n\n if (completeDeleteArr.includes(registration.model_name)) {\n registration.cache_status = Array.isArray(registration.cache_status)\n ? [false]\n : false\n }\n\n if (filterArr.length === 1) {\n if (filterArr[0] === 'cached') {\n return (\n registration.cache_status &&\n !completeDeleteArr.includes(registration.model_name)\n )\n } else {\n return collectionArr?.includes(registration.model_name)\n }\n } else if (filterArr.length > 1) {\n return (\n registration.cache_status &&\n !completeDeleteArr.includes(registration.model_name) &&\n collectionArr?.includes(registration.model_name)\n )\n }\n\n return true\n }\n\n const handleCompleteDelete = (model_name) => {\n setCompleteDeleteArr([...completeDeleteArr, model_name])\n }\n\n const update = async () => {\n if (isCallingApi || isUpdatingModel) return\n\n try {\n setIsCallingApi(true)\n\n fetchWrapper\n .get(`/v1/model_registrations/${modelType}?detailed=true`)\n .then((data) => {\n const builtinModels = data.filter((v) => {\n return v.is_builtin\n })\n setRegistrationData(builtinModels)\n const collectionData = JSON.parse(\n localStorage.getItem('collectionArr')\n )\n setCollectionArr(collectionData)\n })\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [])\n\n const getCollectionArr = (data) => {\n setCollectionArr(data)\n }\n\n const handleChangeFilter = (value) => {\n setStatus(value)\n const arr = [\n ...filterArr.filter((item) => {\n return item !== value\n }),\n value,\n ]\n setFilterArr(arr)\n }\n\n const handleDeleteChip = (item) => {\n setFilterArr(\n filterArr.filter((subItem) => {\n return subItem !== item\n })\n )\n\n if (item === status) setStatus('')\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '150px 1fr',\n columnGap: '20px',\n margin: '30px 2rem',\n }}\n >\n <FormControl sx={{ marginTop: 2, minWidth: 120 }} size=\"small\">\n <InputLabel id=\"select-status\">Status</InputLabel>\n <Select\n id=\"status\"\n labelId=\"select-status\"\n label=\"Status\"\n onChange={(e) => handleChangeFilter(e.target.value)}\n value={status}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"cached\">cached</MenuItem>\n <MenuItem value=\"favorite\">favorite</MenuItem>\n </Select>\n </FormControl>\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={`Search for ${modelType} model name`}\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n size=\"small\"\n hotkey=\"/\"\n />\n </FormControl>\n </div>\n <div style={{ margin: '0 0 30px 30px' }}>\n {filterArr.map((item, index) => (\n <Chip\n key={index}\n label={item}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n style={{ marginRight: 10 }}\n onDelete={() => handleDeleteChip(item)}\n />\n ))}\n </div>\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n }}\n >\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 gpuAvailable={gpuAvailable}\n onHandleCompleteDelete={handleCompleteDelete}\n onGetCollectionArr={getCollectionArr}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchModelComponent\n"],"mappings":"4kBAAA,OACEA,GAAG,CACHC,IAAI,CACJC,WAAW,CACXC,UAAU,CACVC,QAAQ,CACRC,MAAM,KACD,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAE9D,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,SAAS,KAAM,aAAa,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEnC,GAAM,CAAAC,oBAAoB,CAAG,QAAvB,CAAAA,oBAAoBA,CAAAC,IAAA,CAAoC,IA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AAK,qBACzB5G,IAAA,CAACd,IAAI,EAEHiH,KAAK,CAAEhB,IAAK,CACZqB,OAAO,CAAC,UAAU,CAClBR,IAAI,CAAC,OAAO,CACZa,KAAK,CAAC,SAAS,CACfrB,KAAK,CAAE,CAAEsB,WAAW,CAAE,EAAG,CAAE,CAC3BC,QAAQ,CAAE,SAAAA,SAAA,QAAM,CAAA3B,gBAAgB,CAACD,IAAI,CAAC,EAAC,EANlCyB,KAON,CAAC,EACH,CAAC,CACC,CAAC,cACN5G,IAAA,QACEwF,KAAK,CAAE,CACLC,OAAO,CAAE,MAAM,CACfC,mBAAmB,CAAE,uCAAuC,CAC5DsB,WAAW,CAAE,MAAM,CACnBC,OAAO,CAAE,WACX,CAAE,CAAA1B,QAAA,CAED5E,gBAAgB,CACd2B,MAAM,CAAC,SAACC,YAAY,QAAK,CAAAD,MAAM,CAACC,YAAY,CAAC,GAAC,CAC9CoE,GAAG,CAAC,SAACO,oBAAoB,qBACxBlH,IAAA,CAACF,SAAS,EAERqH,GAAG,CAAE5G,QAAS,CACd6G,SAAS,CAAEF,oBAAqB,CAChC7G,SAAS,CAAEA,SAAU,CACrBC,YAAY,CAAEA,YAAa,CAC3B+G,sBAAsB,CAAErE,oBAAqB,CAC7CsE,kBAAkB,CAAEvC,gBAAiB,EANhCmC,oBAAoB,CAACzE,UAO3B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAtC,oBAAoB","ignoreList":[]},"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:'/'});}else if(!data.auth&&sessionStorage.getItem('token')){sessionStorage.removeItem('token');}});}});},[]);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","removeItem","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 } else if (!data.auth && sessionStorage.getItem('token')) {\n sessionStorage.removeItem('token')\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,KAAQ,eAAe,CAC1D,MAAO,CAAAC,QAAQ,KAAM,wBAAwB,CAC7C,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAClD,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,UAAU,KAAQ,kBAAkB,CAE7C,OAASC,KAAK,KAAQ,6BAA6B,CACnD,OAASC,kBAAkB,KAAQ,yBAAyB,CAC5D,MAAO,CAAAC,eAAe,KAAM,8BAA8B,CAC1D,OAASC,WAAW,KAAQ,oBAAoB,CAChD,MAAO,CAAAC,YAAY,KAAM,gBAAgB,CACzC,OAASC,OAAO,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEjC,QAAS,CAAAC,GAAGA,CAAA,CAAG,CACb,IAAAC,QAAA,CAAgBN,OAAO,CAAC,CAAC,CAAAO,SAAA,CAAAC,cAAA,CAAAF,QAAA,IAAlBG,KAAK,CAAAF,SAAA,IACZ,IAAAG,WAAA,CAA0CjB,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAkB,YAAA,CAAAH,cAAA,CAAAE,WAAA,IAAxDE,MAAM,CAAAD,YAAA,IAAEE,SAAS,CAAAF,YAAA,IAAEG,YAAY,CAAAH,YAAA,IACtC,IAAAI,SAAA,CAAsBvB,QAAQ,CAAC,EAAE,CAAC,CAAAwB,UAAA,CAAAR,cA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,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAIC,KAAK,CAAEC,MAAM,CAAK,CACrC,GAAIA,MAAM,GAAK,WAAW,CAAE,CAC1B,OACF,CACAtB,MAAM,CAAC,EAAE,CAAC,CACZ,CAAC,CAED,mBACEd,KAAA,QAAKqC,SAAS,CAAC,KAAK,CAAAC,QAAA,eAClBxC,IAAA,CAACb,QAAQ,EACPsD,IAAI,CAAE1B,GAAG,GAAK,EAAG,CACjB2B,gBAAgB,CAAE,KAAM,CACxBC,YAAY,CAAE,CAAEC,QAAQ,CAAE,KAAK,CAAEC,UAAU,CAAE,QAAS,CAAE,CACxDC,OAAO,CAAEV,WAAY,CAAAI,QAAA,cAErBxC,IAAA,CAACP,KAAK,EAACsD,QAAQ,CAAC,OAAO,CAACD,OAAO,CAAEV,WAAY,CAACY,EAAE,CAAE,CAAEC,KAAK,CAAE,MAAO,CAAE,CAAAT,QAAA,CACjEzB,GAAG,CACC,CAAC,CACA,CAAC,cACXf,IAAA,CAACR,UAAU,EAAAgD,QAAA,cACTxC,IAAA,CAACd,aAAa,EAACqB,KAAK,CAAEA,KAAM,CAAAiC,QAAA,cAC1BtC,KAAA,CAACR,kBAAkB,EAAA8C,QAAA,eACjBxC,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","ignoreList":[]},"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 Paper from'@mui/material/Paper';import Grid from'@mui/material/Unstable_Grid2';import React,{useContext,useEffect}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import TableTitle from'../../components/tableTitle';import Title from'../../components/Title';import NodeInfo from'./nodeInfo';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var ClusterInfo=function ClusterInfo(){var endPoint=useContext(ApiContext).endPoint;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();useEffect(function(){if(cookie.token===''||cookie.token===undefined||cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});}},[cookie.token]);var handleGoBack=function handleGoBack(){var lastUrl=sessionStorage.getItem('lastActiveUrl');if(lastUrl==='launch_model'){navigate(sessionStorage.getItem('modelType'));}else if(lastUrl==='running_models'){navigate(sessionStorage.getItem('runningModelType'));}else if(lastUrl==='register_model'){navigate(sessionStorage.getItem('registerModelType'));}else{navigate('/launch_model/llm');}};return/*#__PURE__*/_jsxs(Box,{sx:{height:'100%',width:'100%',padding:'20px 20px 0 20px'},children:[/*#__PURE__*/_jsx(Title,{title:\"Cluster Information\"}),/*#__PURE__*/_jsxs(Grid,{container:true,spacing:3,style:{width:'100%'},children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Supervisor\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Supervisor\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Workers\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Worker\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(Paper,{sx:{padding:2,display:'flex',overflow:'auto',flexDirection:'column'},children:[/*#__PURE__*/_jsx(TableTitle,{children:\"Worker Details\"}),/*#__PURE__*/_jsx(NodeInfo,{nodeRole:\"Worker-Details\",endpoint:endPoint,cookie:cookie,handleGoBack:handleGoBack})]})})]})]});};export default ClusterInfo;","map":{"version":3,"names":["Box","Paper","Grid","React","useContext","useEffect","useCookies","useNavigate","ApiContext","TableTitle","Title","NodeInfo","jsx","_jsx","jsxs","_jsxs","ClusterInfo","endPoint","_useCookies","_useCookies2","_slicedToArray","cookie","navigate","token","undefined","sessionStorage","getItem","replace","handleGoBack","lastUrl","sx","height","width","padding","children","title","container","spacing","style","item","xs","display","overflow","flexDirection","nodeRole","endpoint"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/cluster_info/index.js"],"sourcesContent":["import { Box } from '@mui/material'\nimport Paper from '@mui/material/Paper'\nimport Grid from '@mui/material/Unstable_Grid2'\nimport React, { useContext, useEffect } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport TableTitle from '../../components/tableTitle'\nimport Title from '../../components/Title'\nimport NodeInfo from './nodeInfo'\n\nconst ClusterInfo = () => {\n const endPoint = useContext(ApiContext).endPoint\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n useEffect(() => {\n if (\n cookie.token === '' ||\n cookie.token === undefined ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n ) {\n navigate('/login', { replace: true })\n }\n }, [cookie.token])\n\n const handleGoBack = () => {\n const lastUrl = sessionStorage.getItem('lastActiveUrl')\n if (lastUrl === 'launch_model') {\n navigate(sessionStorage.getItem('modelType'))\n } else if (lastUrl === 'running_models') {\n navigate(sessionStorage.getItem('runningModelType'))\n } else if (lastUrl === 'register_model') {\n navigate(sessionStorage.getItem('registerModelType'))\n } else {\n navigate('/launch_model/llm')\n }\n }\n\n return (\n <Box\n sx={{\n height: '100%',\n width: '100%',\n padding: '20px 20px 0 20px',\n }}\n >\n <Title title=\"Cluster Information\" />\n <Grid container spacing={3} style={{ width: '100%' }}>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Supervisor</TableTitle>\n <NodeInfo\n nodeRole=\"Supervisor\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Workers</TableTitle>\n <NodeInfo\n nodeRole=\"Worker\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n <Grid item xs={12}>\n <Paper\n sx={{\n padding: 2,\n display: 'flex',\n overflow: 'auto',\n flexDirection: 'column',\n }}\n >\n <TableTitle>Worker Details</TableTitle>\n <NodeInfo\n nodeRole=\"Worker-Details\"\n endpoint={endPoint}\n cookie={cookie}\n handleGoBack={handleGoBack}\n />\n </Paper>\n </Grid>\n </Grid>\n </Box>\n )\n}\n\nexport default ClusterInfo\n"],"mappings":"6IAAA,OAASA,GAAG,KAAQ,eAAe,CACnC,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,IAAI,KAAM,8BAA8B,CAC/C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,KAAQ,OAAO,CACpD,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,UAAU,KAAM,6BAA6B,CACpD,MAAO,CAAAC,KAAK,KAAM,wBAAwB,CAC1C,MAAO,CAAAC,QAAQ,KAAM,YAAY,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KA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G,CAAC,CACJ,CAAC,cACPf,IAAA,CAACX,IAAI,EAACqC,IAAI,MAACC,EAAE,CAAE,EAAG,CAAAN,QAAA,cAChBnB,KAAA,CAACd,KAAK,EACJ6B,EAAE,CAAE,CACFG,OAAO,CAAE,CAAC,CACVQ,OAAO,CAAE,MAAM,CACfC,QAAQ,CAAE,MAAM,CAChBC,aAAa,CAAE,QACjB,CAAE,CAAAT,QAAA,eAEFrB,IAAA,CAACJ,UAAU,EAAAyB,QAAA,CAAC,gBAAc,CAAY,CAAC,cACvCrB,IAAA,CAACF,QAAQ,EACPiC,QAAQ,CAAC,gBAAgB,CACzBC,QAAQ,CAAE5B,QAAS,CACnBI,MAAM,CAAEA,MAAO,CACfO,YAAY,CAAEA,YAAa,CAC5B,CAAC,EACG,CAAC,CACJ,CAAC,EACH,CAAC,EACJ,CAAC,CAEV,CAAC,CAED,cAAe,CAAAZ,WAAW","ignoreList":[]},"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,{useEffect}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import Title from'../../components/Title';import RegisterModelComponent from'./registerModel';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var RegisterModel=function RegisterModel(){var _React$useState=React.useState(sessionStorage.getItem('registerModelType')?sessionStorage.getItem('registerModelType'):'/register_model/llm'),_React$useState2=_slicedToArray(_React$useState,2),tabValue=_React$useState2[0],setTabValue=_React$useState2[1];var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();useEffect(function(){if(cookie.token===''||cookie.token===undefined){navigate('/login',{replace:true});return;}if(cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});return;}},[cookie.token]);var handleTabChange=function handleTabChange(_,newValue){setTabValue(newValue);navigate(newValue);sessionStorage.setItem('registerModelType',newValue);};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",style:{overflow:'hidden'},children:[/*#__PURE__*/_jsx(Title,{title:\"Register Model\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:tabValue,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:tabValue,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Model\",value:\"/register_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Model\",value:\"/register_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Model\",value:\"/register_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Model\",value:\"/register_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Model\",value:\"/register_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible Model\",value:\"/register_model/flexible\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"LLM\",customData:{version:1,model_name:'custom-llm',model_description:'This is a custom model description.',context_length:2048,model_lang:['en'],model_ability:['generate'],model_family:'',model_specs:[{model_uri:'/path/to/llama-1',model_size_in_billions:7,model_format:'pytorch',quantizations:['none']}],prompt_style:undefined}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"embedding\",customData:{model_name:'custom-embedding',dimensions:768,max_tokens:512,model_uri:'/path/to/embedding-model',language:['en']}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"rerank\",customData:{model_name:'custom-rerank',model_uri:'/path/to/rerank-model',language:['en']}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"image\",customData:{model_name:'custom-image',model_uri:'/path/to/image-model',model_family:'stable_diffusion',controlnet:[]}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"audio\",customData:{model_name:'custom-audio',model_uri:'/path/to/audio-model',multilingual:false,model_family:'whisper'}})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/register_model/flexible\",sx:{padding:0},children:/*#__PURE__*/_jsx(RegisterModelComponent,{modelType:\"flexible\",customData:{model_name:'flexible-model',model_description:'This is a model description.',model_uri:'/path/to/model',launcher:'xinference.model.flexible.launchers.transformers',launcher_args:'{}'}})})]})]});};export default RegisterModel;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","Tab","React","useEffect","useCookies","useNavigate","ErrorMessageSnackBar","Title","RegisterModelComponent","jsx","_jsx","jsxs","_jsxs","RegisterModel","_React$useState","useState","sessionStorage","getItem","_React$useState2","_slicedToArray","tabValue","setTabValue","_useCookies","_useCookies2","cookie","navigate","token","undefined","replace","handleTabChange","_","newValue","setItem","m","style","overflow","children","title","value","sx","borderBottom","borderColor","onChange","label","padding","modelType","customData","version","model_name","model_description","context_length","model_lang","model_ability","model_family","model_specs","model_uri","model_size_in_billions","model_format","quantizations","prompt_style","dimensions","max_tokens","language","controlnet","multilingual","launcher","launcher_args"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/register_model/index.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Tab } from '@mui/material'\nimport React, { useEffect } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport Title from '../../components/Title'\nimport RegisterModelComponent from './registerModel'\n\nconst RegisterModel = () => {\n const [tabValue, setTabValue] = React.useState(\n sessionStorage.getItem('registerModelType')\n ? sessionStorage.getItem('registerModelType')\n : '/register_model/llm'\n )\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n useEffect(() => {\n if (cookie.token === '' || cookie.token === undefined) {\n navigate('/login', { replace: true })\n return\n }\n if (cookie.token !== 'no_auth' && !sessionStorage.getItem('token')) {\n navigate('/login', { replace: true })\n return\n }\n }, [cookie.token])\n\n const handleTabChange = (_, newValue) => {\n setTabValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('registerModelType', newValue)\n }\n\n return (\n <Box m=\"20px\" style={{ overflow: 'hidden' }}>\n <Title title=\"Register Model\" />\n <ErrorMessageSnackBar />\n <TabContext value={tabValue}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n value={tabValue}\n onChange={handleTabChange}\n aria-label=\"tabs\"\n >\n <Tab label=\"Language Model\" value=\"/register_model/llm\" />\n <Tab label=\"Embedding Model\" value=\"/register_model/embedding\" />\n <Tab label=\"Rerank Model\" value=\"/register_model/rerank\" />\n <Tab label=\"Image Model\" value=\"/register_model/image\" />\n <Tab label=\"Audio Model\" value=\"/register_model/audio\" />\n <Tab label=\"Flexible Model\" value=\"/register_model/flexible\" />\n </TabList>\n </Box>\n <TabPanel value=\"/register_model/llm\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"LLM\"\n customData={{\n version: 1,\n model_name: 'custom-llm',\n model_description: 'This is a custom model description.',\n context_length: 2048,\n model_lang: ['en'],\n model_ability: ['generate'],\n model_family: '',\n model_specs: [\n {\n model_uri: '/path/to/llama-1',\n model_size_in_billions: 7,\n model_format: 'pytorch',\n quantizations: ['none'],\n },\n ],\n prompt_style: undefined,\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/embedding\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"embedding\"\n customData={{\n model_name: 'custom-embedding',\n dimensions: 768,\n max_tokens: 512,\n model_uri: '/path/to/embedding-model',\n language: ['en'],\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/rerank\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"rerank\"\n customData={{\n model_name: 'custom-rerank',\n model_uri: '/path/to/rerank-model',\n language: ['en'],\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/image\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"image\"\n customData={{\n model_name: 'custom-image',\n model_uri: '/path/to/image-model',\n model_family: 'stable_diffusion',\n controlnet: [],\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/audio\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"audio\"\n customData={{\n model_name: 'custom-audio',\n model_uri: '/path/to/audio-model',\n multilingual: false,\n model_family: 'whisper',\n }}\n />\n </TabPanel>\n <TabPanel value=\"/register_model/flexible\" sx={{ padding: 0 }}>\n <RegisterModelComponent\n modelType=\"flexible\"\n customData={{\n model_name: 'flexible-model',\n model_description: 'This is a model description.',\n model_uri: '/path/to/model',\n launcher: 'xinference.model.flexible.launchers.transformers',\n launcher_args: '{}',\n }}\n />\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default RegisterModel\n"],"mappings":"6IAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,GAAG,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,EAAIC,SAAS,KAAQ,OAAO,CACxC,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,KAAK,KAAM,wBAAwB,CAC1C,MAAO,CAAAC,sBAAsB,KAAM,iBAAi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AAO,CAAE,CAAE,CAAE,CAAAR,QAAA,cACzD1B,IAAA,CAACF,sBAAsB,EACrBqC,SAAS,CAAC,OAAO,CACjBC,UAAU,CAAE,CACVE,UAAU,CAAE,cAAc,CAC1BO,SAAS,CAAE,sBAAsB,CACjCF,YAAY,CAAE,kBAAkB,CAChCU,UAAU,CAAE,EACd,CAAE,CACH,CAAC,CACM,CAAC,cACXrD,IAAA,CAACX,QAAQ,EAACuC,KAAK,CAAC,uBAAuB,CAACC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAR,QAAA,cACzD1B,IAAA,CAACF,sBAAsB,EACrBqC,SAAS,CAAC,OAAO,CACjBC,UAAU,CAAE,CACVE,UAAU,CAAE,cAAc,CAC1BO,SAAS,CAAE,sBAAsB,CACjCS,YAAY,CAAE,KAAK,CACnBX,YAAY,CAAE,SAChB,CAAE,CACH,CAAC,CACM,CAAC,cACX3C,IAAA,CAACX,QAAQ,EAACuC,KAAK,CAAC,0BAA0B,CAACC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAR,QAAA,cAC5D1B,IAAA,CAACF,sBAAsB,EACrBqC,SAAS,CAAC,UAAU,CACpBC,UAAU,CAAE,CACVE,UAAU,CAAE,gBAAgB,CAC5BC,iBAAiB,CAAE,8BAA8B,CACjDM,SAAS,CAAE,gBAAgB,CAC3BU,QAAQ,CAAE,kDAAkD,CAC5DC,aAAa,CAAE,IACjB,CAAE,CACH,CAAC,CACM,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAArD,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xinference
3
- Version: 0.12.3
3
+ Version: 0.13.1
4
4
  Summary: Model Serving Made Easy
5
5
  Home-page: https://github.com/xorbitsai/inference
6
6
  Author: Qin Xuye
@@ -47,7 +47,6 @@ Requires-Dist: peft
47
47
  Requires-Dist: timm
48
48
  Requires-Dist: opencv-contrib-python
49
49
  Provides-Extra: all
50
- Requires-Dist: chatglm-cpp >=0.3.0 ; extra == 'all'
51
50
  Requires-Dist: llama-cpp-python !=0.2.58,>=0.2.25 ; extra == 'all'
52
51
  Requires-Dist: transformers >=4.34.1 ; extra == 'all'
53
52
  Requires-Dist: torch ; extra == 'all'
@@ -69,26 +68,25 @@ Requires-Dist: timm >=0.9.16 ; extra == 'all'
69
68
  Requires-Dist: torchvision ; extra == 'all'
70
69
  Requires-Dist: FlagEmbedding ; extra == 'all'
71
70
  Requires-Dist: omegaconf ~=2.3.0 ; extra == 'all'
72
- Requires-Dist: vector-quantize-pytorch ; extra == 'all'
73
- Requires-Dist: vocos ; extra == 'all'
74
71
  Requires-Dist: nemo-text-processing ; extra == 'all'
75
72
  Requires-Dist: WeTextProcessing ; extra == 'all'
76
73
  Requires-Dist: librosa ; extra == 'all'
77
74
  Requires-Dist: xxhash ; extra == 'all'
75
+ Requires-Dist: ChatTTS >0.1 ; extra == 'all'
78
76
  Requires-Dist: boto3 <1.28.65,>=1.28.55 ; extra == 'all'
79
77
  Requires-Dist: tensorizer ~=2.9.0 ; extra == 'all'
80
78
  Requires-Dist: auto-gptq ; (sys_platform != "darwin") and extra == 'all'
81
79
  Requires-Dist: autoawq ; (sys_platform != "darwin") and extra == 'all'
80
+ Requires-Dist: mlx-lm ; (sys_platform == "darwin" and platform_machine == "arm64") and extra == 'all'
82
81
  Requires-Dist: vllm >=0.2.6 ; (sys_platform == "linux") and extra == 'all'
83
82
  Requires-Dist: sglang[all] ; (sys_platform == "linux") and extra == 'all'
84
83
  Provides-Extra: audio
85
84
  Requires-Dist: omegaconf ~=2.3.0 ; extra == 'audio'
86
- Requires-Dist: vector-quantize-pytorch ; extra == 'audio'
87
- Requires-Dist: vocos ; extra == 'audio'
88
85
  Requires-Dist: nemo-text-processing ; extra == 'audio'
89
86
  Requires-Dist: WeTextProcessing ; extra == 'audio'
90
87
  Requires-Dist: librosa ; extra == 'audio'
91
88
  Requires-Dist: xxhash ; extra == 'audio'
89
+ Requires-Dist: ChatTTS >0.1 ; extra == 'audio'
92
90
  Provides-Extra: benchmark
93
91
  Requires-Dist: psutil ; extra == 'benchmark'
94
92
  Provides-Extra: dev
@@ -127,13 +125,14 @@ Provides-Extra: embedding
127
125
  Requires-Dist: sentence-transformers >=2.7.0 ; extra == 'embedding'
128
126
  Provides-Extra: ggml
129
127
  Requires-Dist: llama-cpp-python !=0.2.58,>=0.2.25 ; extra == 'ggml'
130
- Requires-Dist: chatglm-cpp >=0.3.0 ; extra == 'ggml'
131
128
  Provides-Extra: image
132
129
  Requires-Dist: diffusers ; extra == 'image'
133
130
  Requires-Dist: controlnet-aux ; extra == 'image'
134
131
  Provides-Extra: intel
135
132
  Requires-Dist: torch ==2.1.0a0 ; extra == 'intel'
136
133
  Requires-Dist: intel-extension-for-pytorch ==2.1.10+xpu ; extra == 'intel'
134
+ Provides-Extra: mlx
135
+ Requires-Dist: mlx-lm ; extra == 'mlx'
137
136
  Provides-Extra: rerank
138
137
  Requires-Dist: FlagEmbedding ; extra == 'rerank'
139
138
  Provides-Extra: sglang
@@ -186,22 +185,22 @@ potential of cutting-edge AI models.
186
185
 
187
186
  ## 🔥 Hot Topics
188
187
  ### Framework Enhancements
188
+ - Support Continuous batching for Transformers engine: [#1724](https://github.com/xorbitsai/inference/pull/1724)
189
+ - Support MLX backend for Apple Silicon chips: [#1765](https://github.com/xorbitsai/inference/pull/1765)
189
190
  - Support specifying worker and GPU indexes for launching models: [#1195](https://github.com/xorbitsai/inference/pull/1195)
190
191
  - Support SGLang backend: [#1161](https://github.com/xorbitsai/inference/pull/1161)
191
192
  - Support LoRA for LLM and image models: [#1080](https://github.com/xorbitsai/inference/pull/1080)
192
193
  - Support speech recognition model: [#929](https://github.com/xorbitsai/inference/pull/929)
193
194
  - Metrics support: [#906](https://github.com/xorbitsai/inference/pull/906)
194
- - Docker image: [#855](https://github.com/xorbitsai/inference/pull/855)
195
- - Support multimodal: [#829](https://github.com/xorbitsai/inference/pull/829)
196
195
  ### New Models
196
+ - Built-in support for [Gemma-2-it](https://huggingface.co/blog/gemma2): [#1774](https://github.com/xorbitsai/inference/pull/1774)
197
+ - Built-in support for [jina-reranker-v2](https://huggingface.co/jinaai/jina-reranker-v2-base-multilingual): [#1733](https://github.com/xorbitsai/inference/pull/1733)
197
198
  - Built-in support for [Qwen2](https://github.com/QwenLM/Qwen2): [#1509](https://github.com/xorbitsai/inference/pull/1597)
198
199
  - Built-in support for [ChatTTS](https://github.com/2noise/ChatTTS): [#1578](https://github.com/xorbitsai/inference/pull/1578)
199
200
  - Built-in support for [GLM-4 & GLM-4V](https://github.com/THUDM/GLM-4): [#1584](https://github.com/xorbitsai/inference/pull/1584)
200
201
  - Built-in support for [Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3): [#1576](https://github.com/xorbitsai/inference/pull/1576)
201
202
  - Built-in support for [Codestral-22B-v0.1](https://huggingface.co/mistralai/Codestral-22B-v0.1): [#1575](https://github.com/xorbitsai/inference/pull/1575)
202
203
  - Built-in support for [MiniCPM-Llama3-V 2.5](https://github.com/OpenBMB/MiniCPM-V): [#1577](https://github.com/xorbitsai/inference/pull/1577)
203
- - Built-in support for [CogVLM2](https://github.com/THUDM/CogVLM2): [#1551](https://github.com/xorbitsai/inference/pull/1551)
204
- - Built-in support for [InternVL-Chat-V1-5](https://github.com/OpenGVLab/InternVL): [#1536](https://github.com/xorbitsai/inference/pull/1536)
205
204
  ### Integrations
206
205
  - [Dify](https://docs.dify.ai/advanced/model-configuration/xinference): an LLMOps platform that enables developers (and even non-developers) to quickly build useful applications based on large language models, ensuring they are visual, operable, and improvable.
207
206
  - [FastGPT](https://github.com/labring/FastGPT): a knowledge-based platform built on the LLM, offers out-of-the-box data processing and model invocation capabilities, allows for workflow orchestration through Flow visualization.