xinference 0.9.4__py3-none-any.whl → 0.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (103) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/oauth2/auth_service.py +47 -18
  3. xinference/api/oauth2/types.py +1 -0
  4. xinference/api/restful_api.py +34 -7
  5. xinference/client/oscar/actor_client.py +4 -3
  6. xinference/client/restful/restful_client.py +20 -4
  7. xinference/conftest.py +13 -2
  8. xinference/core/supervisor.py +48 -1
  9. xinference/core/worker.py +139 -20
  10. xinference/deploy/cmdline.py +119 -20
  11. xinference/model/embedding/core.py +1 -2
  12. xinference/model/llm/__init__.py +4 -6
  13. xinference/model/llm/ggml/llamacpp.py +2 -10
  14. xinference/model/llm/llm_family.json +877 -13
  15. xinference/model/llm/llm_family.py +15 -0
  16. xinference/model/llm/llm_family_modelscope.json +571 -0
  17. xinference/model/llm/pytorch/chatglm.py +2 -0
  18. xinference/model/llm/pytorch/core.py +22 -26
  19. xinference/model/llm/pytorch/deepseek_vl.py +232 -0
  20. xinference/model/llm/pytorch/internlm2.py +2 -0
  21. xinference/model/llm/pytorch/omnilmm.py +153 -0
  22. xinference/model/llm/pytorch/qwen_vl.py +2 -0
  23. xinference/model/llm/pytorch/yi_vl.py +4 -2
  24. xinference/model/llm/utils.py +53 -5
  25. xinference/model/llm/vllm/core.py +54 -6
  26. xinference/model/rerank/core.py +3 -0
  27. xinference/thirdparty/deepseek_vl/__init__.py +31 -0
  28. xinference/thirdparty/deepseek_vl/models/__init__.py +28 -0
  29. xinference/thirdparty/deepseek_vl/models/clip_encoder.py +242 -0
  30. xinference/thirdparty/deepseek_vl/models/image_processing_vlm.py +208 -0
  31. xinference/thirdparty/deepseek_vl/models/modeling_vlm.py +170 -0
  32. xinference/thirdparty/deepseek_vl/models/processing_vlm.py +390 -0
  33. xinference/thirdparty/deepseek_vl/models/projector.py +100 -0
  34. xinference/thirdparty/deepseek_vl/models/sam.py +593 -0
  35. xinference/thirdparty/deepseek_vl/models/siglip_vit.py +681 -0
  36. xinference/thirdparty/deepseek_vl/utils/__init__.py +18 -0
  37. xinference/thirdparty/deepseek_vl/utils/conversation.py +348 -0
  38. xinference/thirdparty/deepseek_vl/utils/io.py +78 -0
  39. xinference/thirdparty/omnilmm/__init__.py +0 -0
  40. xinference/thirdparty/omnilmm/chat.py +216 -0
  41. xinference/thirdparty/omnilmm/constants.py +4 -0
  42. xinference/thirdparty/omnilmm/conversation.py +332 -0
  43. xinference/thirdparty/omnilmm/model/__init__.py +1 -0
  44. xinference/thirdparty/omnilmm/model/omnilmm.py +594 -0
  45. xinference/thirdparty/omnilmm/model/resampler.py +166 -0
  46. xinference/thirdparty/omnilmm/model/utils.py +563 -0
  47. xinference/thirdparty/omnilmm/train/__init__.py +13 -0
  48. xinference/thirdparty/omnilmm/train/train_utils.py +150 -0
  49. xinference/thirdparty/omnilmm/utils.py +134 -0
  50. xinference/types.py +15 -19
  51. xinference/web/ui/build/asset-manifest.json +3 -3
  52. xinference/web/ui/build/index.html +1 -1
  53. xinference/web/ui/build/static/js/main.76ef2b17.js +3 -0
  54. xinference/web/ui/build/static/js/main.76ef2b17.js.map +1 -0
  55. xinference/web/ui/node_modules/.cache/babel-loader/15e2cf8cd8d0989719b6349428ff576f9009ff4c2dcc52378be0bd938e82495e.json +1 -0
  56. xinference/web/ui/node_modules/.cache/babel-loader/35d0e4a317e5582cbb79d901302e9d706520ac53f8a734c2fd8bfde6eb5a4f02.json +1 -0
  57. xinference/web/ui/node_modules/.cache/babel-loader/3c2f277c93c5f1638e08db38df0d0fb4e58d1c5571aea03241a5c04ff4094704.json +1 -0
  58. xinference/web/ui/node_modules/.cache/babel-loader/3fa1f69162f9c6dc0f6a6e21b64d49d6b8e6fa8dfa59a82cf829931c5f97d99f.json +1 -0
  59. xinference/web/ui/node_modules/.cache/babel-loader/44774c783428f952d8e2e4ad0998a9c5bc16a57cd9c68b7c5ff18aaa5a41d65c.json +1 -0
  60. xinference/web/ui/node_modules/.cache/babel-loader/5393569d846332075b93b55656716a34f50e0a8c970be789502d7e6c49755fd7.json +1 -0
  61. xinference/web/ui/node_modules/.cache/babel-loader/59ce49eae0f486af4c5034d4d2f9ca77c3ec3a32ecc560085caf5ef482b5f4c9.json +1 -0
  62. xinference/web/ui/node_modules/.cache/babel-loader/62e257ed9016471035fa1a7da57c9e2a4250974ed566b4d1295873d747c68eb2.json +1 -0
  63. xinference/web/ui/node_modules/.cache/babel-loader/63a4c48f0326d071c7772c46598215c006ae41fd3d4ff3577fe717de66ad6e89.json +1 -0
  64. xinference/web/ui/node_modules/.cache/babel-loader/b9cbcb6d77ba21b22c6950b6fb5b305d23c19cf747f99f7d48b6b046f8f7b1b0.json +1 -0
  65. xinference/web/ui/node_modules/.cache/babel-loader/d06a96a3c9c32e42689094aa3aaad41c8125894e956b8f84a70fadce6e3f65b3.json +1 -0
  66. xinference/web/ui/node_modules/.cache/babel-loader/d076fd56cf3b15ed2433e3744b98c6b4e4410a19903d1db4de5bba0e1a1b3347.json +1 -0
  67. xinference/web/ui/node_modules/.cache/babel-loader/daad8131d91134f6d7aef895a0c9c32e1cb928277cb5aa66c01028126d215be0.json +1 -0
  68. xinference/web/ui/node_modules/.cache/babel-loader/de0299226173b0662b573f49e3992220f6611947073bd66ac079728a8bc8837d.json +1 -0
  69. xinference/web/ui/node_modules/.cache/babel-loader/e606671420d2937102c3c34b4b04056c11736408c1d3347b8cf42dfe61fb394b.json +1 -0
  70. xinference/web/ui/node_modules/.cache/babel-loader/e6eccc9aa641e7da833492e27846dc965f9750281420977dc84654ca6ed221e4.json +1 -0
  71. xinference/web/ui/node_modules/.cache/babel-loader/e9b52d171223bb59fb918316297a051cdfd42dd453e8260fd918e90bc0a4ebdf.json +1 -0
  72. xinference/web/ui/node_modules/.cache/babel-loader/f16aec63602a77bd561d0e67fa00b76469ac54b8033754bba114ec5eb3257964.json +1 -0
  73. {xinference-0.9.4.dist-info → xinference-0.10.1.dist-info}/METADATA +25 -12
  74. {xinference-0.9.4.dist-info → xinference-0.10.1.dist-info}/RECORD +79 -58
  75. xinference/model/llm/ggml/ctransformers.py +0 -281
  76. xinference/model/llm/ggml/ctransformers_util.py +0 -161
  77. xinference/web/ui/build/static/js/main.66b1c4fb.js +0 -3
  78. xinference/web/ui/build/static/js/main.66b1c4fb.js.map +0 -1
  79. xinference/web/ui/node_modules/.cache/babel-loader/0bd70b1ecf307e2681318e864f4692305b6350c8683863007f4caf2f9ac33b6e.json +0 -1
  80. xinference/web/ui/node_modules/.cache/babel-loader/0db651c046ef908f45cde73af0dbea0a797d3e35bb57f4a0863b481502103a64.json +0 -1
  81. xinference/web/ui/node_modules/.cache/babel-loader/18e5d5422e2464abf4a3e6d38164570e2e426e0a921e9a2628bbae81b18da353.json +0 -1
  82. xinference/web/ui/node_modules/.cache/babel-loader/3d93bd9a74a1ab0cec85af40f9baa5f6a8e7384b9e18c409b95a81a7b45bb7e2.json +0 -1
  83. xinference/web/ui/node_modules/.cache/babel-loader/3e055de705e397e1d413d7f429589b1a98dd78ef378b97f0cdb462c5f2487d5e.json +0 -1
  84. xinference/web/ui/node_modules/.cache/babel-loader/4fd24800544873512b540544ae54601240a5bfefd9105ff647855c64f8ad828f.json +0 -1
  85. xinference/web/ui/node_modules/.cache/babel-loader/52aa27272b4b9968f62666262b47661cb1992336a2aff3b13994cc36877b3ec3.json +0 -1
  86. xinference/web/ui/node_modules/.cache/babel-loader/60c4b98d8ea7479fb0c94cfd19c8128f17bd7e27a1e73e6dd9adf6e9d88d18eb.json +0 -1
  87. xinference/web/ui/node_modules/.cache/babel-loader/7e094845f611802b024b57439cbf911038169d06cdf6c34a72a7277f35aa71a4.json +0 -1
  88. xinference/web/ui/node_modules/.cache/babel-loader/95c8cc049fadd23085d8623e1d43d70b614a4e52217676f186a417dca894aa09.json +0 -1
  89. xinference/web/ui/node_modules/.cache/babel-loader/98b7ef307f436affe13d75a4f265b27e828ccc2b10ffae6513abe2681bc11971.json +0 -1
  90. xinference/web/ui/node_modules/.cache/babel-loader/a8070ce4b780b4a044218536e158a9e7192a6c80ff593fdc126fee43f46296b5.json +0 -1
  91. xinference/web/ui/node_modules/.cache/babel-loader/b400cfc9db57fa6c70cd2bad055b73c5079fde0ed37974009d898083f6af8cd8.json +0 -1
  92. xinference/web/ui/node_modules/.cache/babel-loader/bd04667474fd9cac2983b03725c218908a6cc0ee9128a5953cd00d26d4877f60.json +0 -1
  93. xinference/web/ui/node_modules/.cache/babel-loader/c2124cfe036b26befcbd386d1d17743b1a58d0b7a041a17bb67f9924400d63c3.json +0 -1
  94. xinference/web/ui/node_modules/.cache/babel-loader/c230a727b8f68f0e62616a75e14a3d33026dc4164f2e325a9a8072d733850edb.json +0 -1
  95. xinference/web/ui/node_modules/.cache/babel-loader/d44a6eb6106e09082b691a315c9f6ce17fcfe25beb7547810e0d271ce3301cd2.json +0 -1
  96. xinference/web/ui/node_modules/.cache/babel-loader/e1d9b2ae4e1248658704bc6bfc5d6160dcd1a9e771ea4ae8c1fed0aaddeedd29.json +0 -1
  97. xinference/web/ui/node_modules/.cache/babel-loader/fd4a8ae5d192331af1bedd1d2d70efcc569708ee6cc4cb479b225d059482aa81.json +0 -1
  98. xinference/web/ui/node_modules/.cache/babel-loader/fe5db70859503a54cbe71f9637e5a314cda88b1f0eecb733b6e6f837697db1ef.json +0 -1
  99. /xinference/web/ui/build/static/js/{main.66b1c4fb.js.LICENSE.txt → main.76ef2b17.js.LICENSE.txt} +0 -0
  100. {xinference-0.9.4.dist-info → xinference-0.10.1.dist-info}/LICENSE +0 -0
  101. {xinference-0.9.4.dist-info → xinference-0.10.1.dist-info}/WHEEL +0 -0
  102. {xinference-0.9.4.dist-info → xinference-0.10.1.dist-info}/entry_points.txt +0 -0
  103. {xinference-0.9.4.dist-info → xinference-0.10.1.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
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 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('1'),_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),rerankModelData=_useState8[0],setRerankModelData=_useState8[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);};var update=function update(isCallingApi){if(cookie.token===''||cookie.token===undefined){return;}if(cookie.token==='need_auth'){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'}]);setImageModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setRerankModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);}else{setIsUpdatingModel(true);fetcher(\"\".concat(endPoint,\"/v1/models/\"),{method:'GET'}).then(function(response){if(!response.ok){response.json().then(function(errorData){setErrorMsg(\"Login failed: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{response.json().then(function(response){var newLlmData=[];var newEmbeddingModelData=[];var newImageModelData=[];var newRerankModelData=[];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==='image'){newImageModelData.push(newValue);}else if(newValue.model_type==='rerank'){newRerankModelData.push(newValue);}});setLlmData(newLlmData);setEmbeddingModelData(newEmbeddingModelData);setImageModelData(newImageModelData);setRerankModelData(newRerankModelData);setIsUpdatingModel(false);});}}).catch(function(error){console.error('Error:',error);setIsUpdatingModel(false);});}};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 rerankModelColumns=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%',paddingLeft:'20px',paddingTop:'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:\"1\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"2\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank models\",value:\"3\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image models\",value:\"4\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"1\",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:\"2\",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:\"3\",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:\"4\",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}})})})]})]});};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","Title","jsx","_jsx","jsxs","_jsxs","RunningModels","_React$useState","_React$useState2","_slicedToArray","tabValue","setTabValue","_useState","_useState2","llmData","setLlmData","_useState3","_useState4","embeddingModelData","setEmbeddingModelData","_useState5","_useState6","imageModelData","setImageModelData","_useState7","_useState8","rerankModelData","setRerankModelData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","setIsUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","endPoint","handleTabChange","event","newValue","update","token","undefined","replace","id","url","concat","method","then","response","ok","json","errorData","status","detail","newLlmData","newEmbeddingModelData","newImageModelData","newRerankModelData","data","forEach","model","_objectSpread","model_type","push","catch","error","console","llmColumns","field","headerName","flex","minWidth","sortable","filterable","disableColumnMenu","renderCell","_ref","row","openUrl","closeUrl","gradioUrl","style","width","display","justifyContent","alignItems","children","title","borderWidth","backgroundColor","paddingLeft","paddingRight","onClick","log","headers","body","JSON","stringify","model_name","model_family","model_size_in_billions","model_format","quantization","context_length","model_ability","model_description","model_lang","window","open","finally","m","p","borderRadius","border","borderColor","embeddingModelColumns","_ref2","imageModelColumns","_ref3","model_id","controlnet","model_revision","rerankModelColumns","dataGridStyle","borderBottom","fontWeight","overflowX","overflow","borderTop","noRowsOverlay","height","noResultsOverlay","sx","paddingTop","value","onChange","label","padding","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 Title from '../../components/Title'\n\nconst RunningModels = () => {\n const [tabValue, setTabValue] = React.useState('1')\n const [llmData, setLlmData] = useState([])\n const [embeddingModelData, setEmbeddingModelData] = useState([])\n const [imageModelData, setImageModelData] = useState([])\n const [rerankModelData, setRerankModelData] = 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 }\n\n const update = (isCallingApi) => {\n if (cookie.token === '' || cookie.token === undefined) {\n return\n }\n if (cookie.token === 'need_auth') {\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 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 } else {\n setIsUpdatingModel(true)\n fetcher(`${endPoint}/v1/models/`, {\n method: 'GET',\n })\n .then((response) => {\n if (!response.ok) {\n response.json().then((errorData) => {\n setErrorMsg(\n `Login failed: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n response.json().then((response) => {\n const newLlmData = []\n const newEmbeddingModelData = []\n const newImageModelData = []\n const newRerankModelData = []\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 === 'image') {\n newImageModelData.push(newValue)\n } else if (newValue.model_type === 'rerank') {\n newRerankModelData.push(newValue)\n }\n })\n setLlmData(newLlmData)\n setEmbeddingModelData(newEmbeddingModelData)\n setImageModelData(newImageModelData)\n setRerankModelData(newRerankModelData)\n setIsUpdatingModel(false)\n })\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsUpdatingModel(false)\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\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\n const rerankModelColumns = 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 paddingLeft: '20px',\n paddingTop: '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=\"1\" />\n <Tab label=\"Embedding Models\" value=\"2\" />\n <Tab label=\"Rerank models\" value=\"3\" />\n <Tab label=\"Image models\" value=\"4\" />\n </TabList>\n </Box>\n <TabPanel value=\"1\" 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=\"2\" 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=\"3\" 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=\"4\" 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 </TabContext>\n </Box>\n )\n}\n\nexport default RunningModels\n"],"mappings":"yRAAA,MAAO,CAAAA,yBAAyB,KAAM,2CAA2C,CACjF,MAAO,CAAAC,yBAAyB,KAAM,2CAA2C,CACjF,OAASC,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,KAAK,CAAEC,GAAG,KAAQ,eAAe,CAC/C,OA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AAEzH,cAAe,CACrB0H,OAAO,CAAEtB,iBAAkB,CAC3BuB,UAAU,CAAE,IAAK,CACjBR,EAAE,CAAET,aAAc,CAClBkB,KAAK,CAAE,CACLZ,aAAa,CAAEA,aAAa,CAC5BE,gBAAgB,CAAEA,gBACpB,CAAE,CACH,CAAC,CACC,CAAC,CACE,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAlI,aAAa"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import ExitToAppIcon from'@mui/icons-material/ExitToApp';import{Box,Stack,Typography}from'@mui/material';import Button from'@mui/material/Button';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{isValidBearerToken}from'./utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Title=function Title(_ref){var title=_ref.title;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],removeCookie=_useCookies2[2];var navigate=useNavigate();var handleLogout=function handleLogout(){removeCookie('token',{path:'/'});navigate('/login',{replace:true});};return/*#__PURE__*/_jsx(Box,{mb:\"30px\",children:/*#__PURE__*/_jsxs(Stack,{direction:\"row\",alignItems:\"center\",justifyContent:\"space-between\",children:[/*#__PURE__*/_jsx(Typography,{variant:\"h2\",color:\"#141414\",fontWeight:\"bold\",sx:{m:'0 0 5px 0'},children:title}),isValidBearerToken(cookie.token)&&/*#__PURE__*/_jsx(Button,{variant:\"outlined\",size:\"large\",onClick:handleLogout,startIcon:/*#__PURE__*/_jsx(ExitToAppIcon,{}),children:\"LOG OUT\"})]})});};export default Title;","map":{"version":3,"names":["ExitToAppIcon","Box","Stack","Typography","Button","useCookies","useNavigate","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","Title","_ref","title","_useCookies","_useCookies2","_slicedToArray","cookie","removeCookie","navigate","handleLogout","path","replace","mb","children","direction","alignItems","justifyContent","variant","color","fontWeight","sx","m","token","size","onClick","startIcon"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/Title.js"],"sourcesContent":["import ExitToAppIcon from '@mui/icons-material/ExitToApp'\nimport { Box, Stack, Typography } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { isValidBearerToken } from './utils'\n\nconst Title = ({ title }) => {\n const [cookie, , removeCookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleLogout = () => {\n removeCookie('token', { path: '/' })\n navigate('/login', { replace: true })\n }\n\n return (\n <Box mb=\"30px\">\n <Stack direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography\n variant=\"h2\"\n color=\"#141414\"\n fontWeight=\"bold\"\n sx={{ m: '0 0 5px 0' }}\n >\n {title}\n </Typography>\n {isValidBearerToken(cookie.token) && (\n <Button\n variant=\"outlined\"\n size=\"large\"\n onClick={handleLogout}\n startIcon={<ExitToAppIcon />}\n >\n LOG OUT\n </Button>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default Title\n"],"mappings":"6IAAA,MAAO,CAAAA,aAAa,KAAM,+BAA+B,CACzD,OAASC,GAAG,CAAEC,KAAK,CAAEC,UAAU,KAAQ,eAAe,CACtD,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,kBAAkB,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE5C,GAAM,CAAAC,KAAK,CAAG,QAAR,CAAAA,KAAKA,CAAAC,IAAA,CAAkB,IAAZ,CAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACpB,IAAAC,WAAA,CAAiCV,UAAU,CAAC,CAAC,OAAO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