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 _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{useCookies}from'react-cookie';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 modelAbilityArr=['generate','chat','vision'];var LaunchLLM=function LaunchLLM(_ref){var gpuAvailable=_ref.gpuAvailable;var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi,endPoint=_useContext.endPoint;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),modelAbility=_useState6[0],setModelAbility=_useState6[1];var _useState7=useState(''),_useState8=_slicedToArray(_useState7,2),status=_useState8[0],setStatus=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),statusArr=_useState10[0],setStatusArr=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),completeDeleteArr=_useState12[0],setCompleteDeleteArr=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),collectionArr=_useState14[0],setCollectionArr=_useState14[1];var _useState15=useState([]),_useState16=_slicedToArray(_useState15,2),filterArr=_useState16[0],setFilterArr=_useState16[1];var filter=function filter(registration){if(searchTerm!==''){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';var modelDescription=registration.model_description?registration.model_description.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())&&!modelDescription.includes(searchTerm.toLowerCase())){return false;}}if(modelAbility&&registration.model_ability.indexOf(modelAbility)<0)return false;if(completeDeleteArr.includes(registration.model_name)){registration.model_specs.forEach(function(item){item.cache_status=Array.isArray(item)?[false]:false;});}if(statusArr.length===1){if(statusArr[0]==='cached'){var judge=registration.model_specs.some(function(spec){return filterCache(spec);});return judge&&!completeDeleteArr.includes(registration.model_name);}else{return collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name);}}else if(statusArr.length>1){var _judge=registration.model_specs.some(function(spec){return filterCache(spec);});return _judge&&!completeDeleteArr.includes(registration.model_name)&&(collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name));}return true;};var filterCache=function filterCache(spec){if(Array.isArray(spec.cache_status)){return spec.cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}};var handleCompleteDelete=function handleCompleteDelete(model_name){setCompleteDeleteArr([].concat(_toConsumableArray(completeDeleteArr),[model_name]));};var update=function update(){if(isCallingApi||isUpdatingModel||cookie.token!=='no_auth'&&!sessionStorage.getItem('token'))return;try{setIsCallingApi(true);fetchWrapper.get('/v1/model_registrations/LLM?detailed=true').then(function(data){var builtinRegistrations=data.filter(function(v){return v.is_builtin;});setRegistrationData(builtinRegistrations);var collectionData=JSON.parse(localStorage.getItem('collectionArr'));setCollectionArr(collectionData);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}catch(error){console.error('Error:',error);}finally{setIsCallingApi(false);}};useEffect(function(){update();},[cookie.token]);var getCollectionArr=function getCollectionArr(data){setCollectionArr(data);};var handleChangeFilter=function handleChangeFilter(type,value){if(type==='modelAbility'){setModelAbility(value);setFilterArr([].concat(_toConsumableArray(filterArr.filter(function(item){return!modelAbilityArr.includes(item);})),[value]));}else{setStatus(value);var arr=[].concat(_toConsumableArray(filterArr.filter(function(item){return item!==value;})),[value]);setFilterArr(arr);setStatusArr(arr.filter(function(item){return!modelAbilityArr.includes(item);}));}};var handleDeleteChip=function handleDeleteChip(item){setFilterArr(filterArr.filter(function(subItem){return subItem!==item;}));if(item===modelAbility){setModelAbility('');}else{setStatusArr(statusArr.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 150px 1fr',columnGap:'20px',margin:'30px 2rem'},children:[/*#__PURE__*/_jsxs(FormControl,{sx:{marginTop:2,minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:\"Model Ability\"}),/*#__PURE__*/_jsxs(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:function onChange(e){return handleChangeFilter('modelAbility',e.target.value);},value:modelAbility,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"generate\",children:\"generate\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"chat\",children:\"chat\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"vision\",children:\"vl-chat\"})]})]}),/*#__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('status',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 model name and description\",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,gpuAvailable:gpuAvailable,modelType:'LLM',onHandleCompleteDelete:handleCompleteDelete,onGetCollectionArr:getCollectionArr},filteredRegistration.model_name);})})]});};export default LaunchLLM;","map":{"version":3,"names":["Box","Chip","FormControl","InputLabel","MenuItem","Select","React","useContext","useEffect","useState","useCookies","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","modelAbilityArr","LaunchLLM","_ref","gpuAvailable","_useContext","isCallingApi","setIsCallingApi","endPoint","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","_slicedToArray","cookie","_useState","_useState2","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","modelAbility","setModelAbility","_useState7","_useState8","status","setStatus","_useState9","_useState10","statusArr","setStatusArr","_useState11","_useState12","completeDeleteArr","setCompleteDeleteArr","_useState13","_useState14","collectionArr","setCollectionArr","_useState15","_useState16","filterArr","setFilterArr","filter","registration","modelName","model_name","toLowerCase","modelDescription","model_description","includes","model_ability","indexOf","model_specs","forEach","item","cache_status","Array","isArray","length","judge","some","spec","filterCache","cs","handleCompleteDelete","concat","_toConsumableArray","update","token","sessionStorage","getItem","get","then","data","builtinRegistrations","v","is_builtin","collectionData","JSON","parse","localStorage","catch","error","console","response","message","getCollectionArr","handleChangeFilter","type","value","arr","handleDeleteChip","subItem","m","children","style","display","gridTemplateColumns","columnGap","margin","sx","marginTop","minWidth","size","id","labelId","label","onChange","e","target","width","variant","hotkey","map","index","color","marginRight","onDelete","paddingLeft","gridGap","filteredRegistration","url","modelData","modelType","onHandleCompleteDelete","onGetCollectionArr"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/launchLLM.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'\nimport { useCookies } from 'react-cookie'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst modelAbilityArr = ['generate', 'chat', 'vision']\n\nconst LaunchLLM = ({ gpuAvailable }) => {\n const { isCallingApi, setIsCallingApi, endPoint } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n\n const [registrationData, setRegistrationData] = useState([])\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [modelAbility, setModelAbility] = useState('')\n const [status, setStatus] = useState('')\n const [statusArr, setStatusArr] = useState([])\n const [completeDeleteArr, setCompleteDeleteArr] = useState([])\n const [collectionArr, setCollectionArr] = useState([])\n const [filterArr, setFilterArr] = useState([])\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 const modelDescription = registration.model_description\n ? registration.model_description.toLowerCase()\n : ''\n\n if (\n !modelName.includes(searchTerm.toLowerCase()) &&\n !modelDescription.includes(searchTerm.toLowerCase())\n ) {\n return false\n }\n }\n\n if (modelAbility && registration.model_ability.indexOf(modelAbility) < 0)\n return false\n\n if (completeDeleteArr.includes(registration.model_name)) {\n registration.model_specs.forEach((item) => {\n item.cache_status = Array.isArray(item) ? [false] : false\n })\n }\n\n if (statusArr.length === 1) {\n if (statusArr[0] === 'cached') {\n const judge = registration.model_specs.some((spec) => filterCache(spec))\n return judge && !completeDeleteArr.includes(registration.model_name)\n } else {\n return collectionArr?.includes(registration.model_name)\n }\n } else if (statusArr.length > 1) {\n const judge = registration.model_specs.some((spec) => filterCache(spec))\n return (\n judge &&\n !completeDeleteArr.includes(registration.model_name) &&\n collectionArr?.includes(registration.model_name)\n )\n }\n\n return true\n }\n\n const filterCache = (spec) => {\n if (Array.isArray(spec.cache_status)) {\n return spec.cache_status.some((cs) => cs)\n } else {\n return spec.cache_status === true\n }\n }\n\n const handleCompleteDelete = (model_name) => {\n setCompleteDeleteArr([...completeDeleteArr, model_name])\n }\n\n const update = () => {\n if (\n isCallingApi ||\n isUpdatingModel ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n )\n return\n\n try {\n setIsCallingApi(true)\n\n fetchWrapper\n .get('/v1/model_registrations/LLM?detailed=true')\n .then((data) => {\n const builtinRegistrations = data.filter((v) => v.is_builtin)\n setRegistrationData(builtinRegistrations)\n const collectionData = JSON.parse(\n localStorage.getItem('collectionArr')\n )\n setCollectionArr(collectionData)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [cookie.token])\n\n const getCollectionArr = (data) => {\n setCollectionArr(data)\n }\n\n const handleChangeFilter = (type, value) => {\n if (type === 'modelAbility') {\n setModelAbility(value)\n setFilterArr([\n ...filterArr.filter((item) => {\n return !modelAbilityArr.includes(item)\n }),\n value,\n ])\n } else {\n setStatus(value)\n const arr = [\n ...filterArr.filter((item) => {\n return item !== value\n }),\n value,\n ]\n setFilterArr(arr)\n setStatusArr(\n arr.filter((item) => {\n return !modelAbilityArr.includes(item)\n })\n )\n }\n }\n\n const handleDeleteChip = (item) => {\n setFilterArr(\n filterArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === modelAbility) {\n setModelAbility('')\n } else {\n setStatusArr(\n statusArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === status) setStatus('')\n }\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '150px 150px 1fr',\n columnGap: '20px',\n margin: '30px 2rem',\n }}\n >\n <FormControl sx={{ marginTop: 2, minWidth: 120 }} size=\"small\">\n <InputLabel id=\"ability-select-label\">Model Ability</InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={(e) => handleChangeFilter('modelAbility', e.target.value)}\n value={modelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"generate\">generate</MenuItem>\n <MenuItem value=\"chat\">chat</MenuItem>\n <MenuItem value=\"vision\">vl-chat</MenuItem>\n </Select>\n </FormControl>\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('status', 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\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label=\"Search for model name and description\"\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 gpuAvailable={gpuAvailable}\n modelType={'LLM'}\n onHandleCompleteDelete={handleCompleteDelete}\n onGetCollectionArr={getCollectionArr}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchLLM\n"],"mappings":"kSAAA,OACEA,GAAG,CACHC,IAAI,CACJC,WAAW,CACXC,UAAU,CACVC,QAAQ,CACRC,MAAM,KACD,eAAe,CACtB,MA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,CAAA1B,gBAAgB,CAACrC,IAAI,CAAC,EAAC,EANlC4D,KAON,CAAC,EACH,CAAC,CACC,CAAC,cACN3H,IAAA,QACEwG,KAAK,CAAE,CACLC,OAAO,CAAE,MAAM,CACfC,mBAAmB,CAAE,uCAAuC,CAC5DqB,WAAW,CAAE,MAAM,CACnBC,OAAO,CAAE,WACX,CAAE,CAAAzB,QAAA,CAEDlF,gBAAgB,CACd8B,MAAM,CAAC,SAACC,YAAY,QAAK,CAAAD,MAAM,CAACC,YAAY,CAAC,GAAC,CAC9CsE,GAAG,CAAC,SAACO,oBAAoB,qBACxBjI,IAAA,CAACF,SAAS,EAERoI,GAAG,CAAExH,QAAS,CACdyH,SAAS,CAAEF,oBAAqB,CAChC3H,YAAY,CAAEA,YAAa,CAC3B8H,SAAS,CAAE,KAAM,CACjBC,sBAAsB,CAAE5D,oBAAqB,CAC7C6D,kBAAkB,CAAEvC,gBAAiB,EANhCkC,oBAAoB,CAAC3E,UAO3B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAlD,SAAS","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _classCallCheck from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";import _createClass from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/createClass.js\";import _inherits from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/inherits.js\";import _createSuper from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/createSuper.js\";import Table from'@mui/material/Table';import TableBody from'@mui/material/TableBody';import TableHead from'@mui/material/TableHead';import TableRow from'@mui/material/TableRow';import Grid from'@mui/material/Unstable_Grid2';import React from'react';import fetchWrapper from'../../components/fetchWrapper';import{toReadableSize}from'../../components/utils';import{StyledTableCell,StyledTableRow}from'./style';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var NodeInfo=/*#__PURE__*/function(_React$Component){_inherits(NodeInfo,_React$Component);var _super=_createSuper(NodeInfo);function NodeInfo(props){var _this;_classCallCheck(this,NodeInfo);_this=_super.call(this,props);_this.nodeRole=props.nodeRole;_this.endpoint=props.endpoint;_this.state={version:{},info:[]};return _this;}_createClass(NodeInfo,[{key:\"refreshInfo\",value:function refreshInfo(){var _this2=this;if(this.props.cookie.token===''||this.props.cookie.token===undefined||this.props.cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){return;}fetchWrapper.get('/v1/cluster/info?detailed=true').then(function(data){var state=_this2.state;state['info']=data;_this2.setState(state);}).catch(function(error){console.error('Error:',error);if(error.response.status==403){_this2.props.handleGoBack();}});if(JSON.stringify(this.state.version)==='{}'){fetchWrapper.get('/v1/cluster/version').then(function(data){var state=_this2.state;state['version']={release:'v'+data['version'],commit:data['full-revisionid']};_this2.setState(state);}).catch(function(error){console.error('Error:',error);if(error.response.status==403){_this2.props.handleGoBack();}});}}},{key:\"componentDidMount\",value:function componentDidMount(){var _this3=this;this.interval=setInterval(function(){return _this3.refreshInfo();},5000);this.refreshInfo();}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){clearInterval(this.interval);}},{key:\"render\",value:function render(){var _this4=this;if(this.state===undefined||this.state['info']===[]){return/*#__PURE__*/_jsx(\"div\",{children:\"Loading\"});}if(this.nodeRole!=='Worker-Details'){var roleData=this.state['info'].filter(function(obj){return obj['node_type']===_this4.nodeRole;});var sum=function sum(arr){return arr.reduce(function(a,b){return a+b;},0);};var gatherResourceStats=function gatherResourceStats(prop){return sum(roleData.map(function(obj){return obj[prop];}));};var resourceStats={cpu_total:gatherResourceStats('cpu_count'),cpu_avail:gatherResourceStats('cpu_available'),memory_total:gatherResourceStats('mem_total'),memory_avail:gatherResourceStats('mem_available'),gpu_total:gatherResourceStats('gpu_count'),gpu_memory_total:gatherResourceStats('gpu_vram_total'),gpu_memory_avail:gatherResourceStats('gpu_vram_available')};//for all cases, we will at least have cpu information available.\nresourceStats.cpu_used=resourceStats.cpu_total-resourceStats.cpu_avail;resourceStats.memory_used=resourceStats.memory_total-resourceStats.memory_avail;var row_count=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"Count\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsx(Grid,{children:roleData.length})})})]});var CPU_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"CPU Info\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[\"Usage: \",resourceStats.cpu_used.toFixed(2)]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[\"Total: \",resourceStats.cpu_total.toFixed(2)]})]})})]});var CPU_Memory_Info_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"CPU Memory Info\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[\"Usage: \",toReadableSize(resourceStats.memory_used)]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[\"Total: \",toReadableSize(resourceStats.memory_total)]})]})})]});var version_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"Version\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[\"Release: \",this.state.version.release]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[\"Commit: \",this.state.version.commit]})]})})]});var table_bodies;//case that we do not have GPU presents.\nif(resourceStats.gpu_memory_total===0){table_bodies=[row_count,CPU_row,CPU_Memory_Info_row,version_row];}else{resourceStats.gpu_memory_used=resourceStats.gpu_memory_total-resourceStats.gpu_memory_avail;var GPU_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"GPU Info\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsxs(Grid,{xs:12,children:[\"Total: \",resourceStats.gpu_total.toFixed(2)]})})})]});var GPU_Memory_Info_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"GPU Memory Info\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsxs(Grid,{container:true,children:[/*#__PURE__*/_jsxs(Grid,{xs:4,children:[\"Usage: \",toReadableSize(resourceStats.gpu_memory_used)]}),/*#__PURE__*/_jsxs(Grid,{xs:8,children:[\"Total: \",toReadableSize(resourceStats.gpu_memory_total)]})]})})]});table_bodies=[row_count,CPU_row,CPU_Memory_Info_row,GPU_row,GPU_Memory_Info_row,version_row];}if(this.nodeRole==='Supervisor'){var supervisor_addr_row=/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"Address\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsx(Grid,{children:roleData[0]?roleData[0]['ip_address']:'-'})})})]});table_bodies.splice(1,0,supervisor_addr_row);}return/*#__PURE__*/_jsxs(Table,{size:\"small\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"Item\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:/*#__PURE__*/_jsx(Grid,{container:true,children:/*#__PURE__*/_jsx(Grid,{children:\"Value\"})})})]})}),/*#__PURE__*/_jsx(TableBody,{children:table_bodies})]});}else{var workerData=this.state['info'].filter(function(obj){return obj['node_type']==='Worker';});return/*#__PURE__*/_jsxs(Table,{size:\"small\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"Node Type\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"Address\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"CPU Usage\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"CPU Total\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"Mem Usage\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"Mem Total\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"GPU Count\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"GPU Mem Usage\"}),/*#__PURE__*/_jsx(StyledTableCell,{style:{fontWeight:'bolder'},children:\"GPU Mem Total\"})]})}),/*#__PURE__*/_jsx(TableBody,{children:workerData.map(function(row){return/*#__PURE__*/_jsxs(StyledTableRow,{children:[/*#__PURE__*/_jsx(StyledTableCell,{children:\"Worker\"}),/*#__PURE__*/_jsx(StyledTableCell,{children:row['ip_address']}),/*#__PURE__*/_jsx(StyledTableCell,{children:(row['cpu_count']-row['cpu_available']).toFixed(2)}),/*#__PURE__*/_jsx(StyledTableCell,{children:row['cpu_count'].toFixed(2)}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['mem_total']-row['mem_available'])}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['mem_total'])}),/*#__PURE__*/_jsx(StyledTableCell,{children:row['gpu_count'].toFixed(2)}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['gpu_vram_total']-row['gpu_vram_available'])}),/*#__PURE__*/_jsx(StyledTableCell,{children:toReadableSize(row['gpu_vram_total'])})]});})})]});}}}]);return NodeInfo;}(React.Component);export default NodeInfo;","map":{"version":3,"names":["Table","TableBody","TableHead","TableRow","Grid","React","fetchWrapper","toReadableSize","StyledTableCell","StyledTableRow","jsx","_jsx","jsxs","_jsxs","NodeInfo","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","nodeRole","endpoint","state","version","info","_createClass","key","value","refreshInfo","_this2","cookie","token","undefined","sessionStorage","getItem","get","then","data","setState","catch","error","console","response","status","handleGoBack","JSON","stringify","release","commit","componentDidMount","_this3","interval","setInterval","componentWillUnmount","clearInterval","render","_this4","children","roleData","filter","obj","sum","arr","reduce","a","b","gatherResourceStats","prop","map","resourceStats","cpu_total","cpu_avail","memory_total","memory_avail","gpu_total","gpu_memory_total","gpu_memory_avail","cpu_used","memory_used","row_count","container","length","CPU_row","xs","toFixed","CPU_Memory_Info_row","version_row","table_bodies","gpu_memory_used","GPU_row","GPU_Memory_Info_row","supervisor_addr_row","splice","size","style","fontWeight","workerData","row","Component"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/cluster_info/nodeInfo.js"],"sourcesContent":["import Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport Grid from '@mui/material/Unstable_Grid2'\nimport PropTypes from 'prop-types'\nimport React from 'react'\n\nimport fetchWrapper from '../../components/fetchWrapper'\nimport { toReadableSize } from '../../components/utils'\nimport { StyledTableCell, StyledTableRow } from './style'\n\nclass NodeInfo extends React.Component {\n constructor(props) {\n super(props)\n this.nodeRole = props.nodeRole\n this.endpoint = props.endpoint\n this.state = {\n version: {},\n info: [],\n }\n }\n\n refreshInfo() {\n if (\n this.props.cookie.token === '' ||\n this.props.cookie.token === undefined ||\n (this.props.cookie.token !== 'no_auth' &&\n !sessionStorage.getItem('token'))\n ) {\n return\n }\n fetchWrapper\n .get('/v1/cluster/info?detailed=true')\n .then((data) => {\n const { state } = this\n state['info'] = data\n this.setState(state)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status == 403) {\n this.props.handleGoBack()\n }\n })\n\n if (JSON.stringify(this.state.version) === '{}') {\n fetchWrapper\n .get('/v1/cluster/version')\n .then((data) => {\n const { state } = this\n state['version'] = {\n release: 'v' + data['version'],\n commit: data['full-revisionid'],\n }\n this.setState(state)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status == 403) {\n this.props.handleGoBack()\n }\n })\n }\n }\n\n componentDidMount() {\n this.interval = setInterval(() => this.refreshInfo(), 5000)\n this.refreshInfo()\n }\n\n componentWillUnmount() {\n clearInterval(this.interval)\n }\n\n render() {\n if (this.state === undefined || this.state['info'] === []) {\n return <div>Loading</div>\n }\n\n if (this.nodeRole !== 'Worker-Details') {\n const roleData = this.state['info'].filter(\n (obj) => obj['node_type'] === this.nodeRole\n )\n\n const sum = (arr) => {\n return arr.reduce((a, b) => a + b, 0)\n }\n\n const gatherResourceStats = (prop) =>\n sum(roleData.map((obj) => obj[prop]))\n\n const resourceStats = {\n cpu_total: gatherResourceStats('cpu_count'),\n cpu_avail: gatherResourceStats('cpu_available'),\n memory_total: gatherResourceStats('mem_total'),\n memory_avail: gatherResourceStats('mem_available'),\n gpu_total: gatherResourceStats('gpu_count'),\n gpu_memory_total: gatherResourceStats('gpu_vram_total'),\n gpu_memory_avail: gatherResourceStats('gpu_vram_available'),\n }\n\n //for all cases, we will at least have cpu information available.\n resourceStats.cpu_used = resourceStats.cpu_total - resourceStats.cpu_avail\n resourceStats.memory_used =\n resourceStats.memory_total - resourceStats.memory_avail\n\n const row_count = (\n <StyledTableRow>\n <StyledTableCell>Count</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid>{roleData.length}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const CPU_row = (\n <StyledTableRow>\n <StyledTableCell>CPU Info</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>Usage: {resourceStats.cpu_used.toFixed(2)}</Grid>\n <Grid xs={8}>Total: {resourceStats.cpu_total.toFixed(2)}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const CPU_Memory_Info_row = (\n <StyledTableRow>\n <StyledTableCell>CPU Memory Info</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>\n Usage: {toReadableSize(resourceStats.memory_used)}\n </Grid>\n <Grid xs={8}>\n Total: {toReadableSize(resourceStats.memory_total)}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const version_row = (\n <StyledTableRow>\n <StyledTableCell>Version</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>Release: {this.state.version.release}</Grid>\n <Grid xs={8}>Commit: {this.state.version.commit}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n let table_bodies\n //case that we do not have GPU presents.\n if (resourceStats.gpu_memory_total === 0) {\n table_bodies = [row_count, CPU_row, CPU_Memory_Info_row, version_row]\n } else {\n resourceStats.gpu_memory_used =\n resourceStats.gpu_memory_total - resourceStats.gpu_memory_avail\n\n const GPU_row = (\n <StyledTableRow>\n <StyledTableCell>GPU Info</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={12}>Total: {resourceStats.gpu_total.toFixed(2)}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n const GPU_Memory_Info_row = (\n <StyledTableRow>\n <StyledTableCell>GPU Memory Info</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid xs={4}>\n Usage: {toReadableSize(resourceStats.gpu_memory_used)}\n </Grid>\n <Grid xs={8}>\n Total: {toReadableSize(resourceStats.gpu_memory_total)}\n </Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n\n table_bodies = [\n row_count,\n CPU_row,\n CPU_Memory_Info_row,\n GPU_row,\n GPU_Memory_Info_row,\n version_row,\n ]\n }\n\n if (this.nodeRole === 'Supervisor') {\n const supervisor_addr_row = (\n <StyledTableRow>\n <StyledTableCell>Address</StyledTableCell>\n <StyledTableCell>\n <Grid container>\n <Grid>{roleData[0] ? roleData[0]['ip_address'] : '-'}</Grid>\n </Grid>\n </StyledTableCell>\n </StyledTableRow>\n )\n table_bodies.splice(1, 0, supervisor_addr_row)\n }\n\n return (\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n Item\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n <Grid container>\n <Grid>Value</Grid>\n </Grid>\n </StyledTableCell>\n </TableRow>\n </TableHead>\n <TableBody>{table_bodies}</TableBody>\n </Table>\n )\n } else {\n const workerData = this.state['info'].filter(\n (obj) => obj['node_type'] === 'Worker'\n )\n\n return (\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n Node Type\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n Address\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n CPU Usage\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n CPU Total\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n Mem Usage\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n Mem Total\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n GPU Count\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n GPU Mem Usage\n </StyledTableCell>\n <StyledTableCell style={{ fontWeight: 'bolder' }}>\n GPU Mem Total\n </StyledTableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {workerData.map((row) => (\n <StyledTableRow>\n <StyledTableCell>Worker</StyledTableCell>\n <StyledTableCell>{row['ip_address']}</StyledTableCell>\n <StyledTableCell>\n {(row['cpu_count'] - row['cpu_available']).toFixed(2)}\n </StyledTableCell>\n <StyledTableCell>{row['cpu_count'].toFixed(2)}</StyledTableCell>\n <StyledTableCell>\n {toReadableSize(row['mem_total'] - row['mem_available'])}\n </StyledTableCell>\n <StyledTableCell>\n {toReadableSize(row['mem_total'])}\n </StyledTableCell>\n <StyledTableCell>{row['gpu_count'].toFixed(2)}</StyledTableCell>\n <StyledTableCell>\n {toReadableSize(\n row['gpu_vram_total'] - row['gpu_vram_available']\n )}\n </StyledTableCell>\n <StyledTableCell>\n {toReadableSize(row['gpu_vram_total'])}\n </StyledTableCell>\n </StyledTableRow>\n ))}\n </TableBody>\n </Table>\n )\n }\n }\n}\n\nNodeInfo.propTypes = {\n nodeRole: PropTypes.string,\n endpoint: PropTypes.string,\n}\n\nexport default NodeInfo\n"],"mappings":"oiBAAA,MAAO,CAAAA,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,QAAQ,KAAM,wBAAwB,CAC7C,MAAO,CAAAC,IAAI,KAAM,8BAA8B,CAE/C,MAAO,CAAAC,KAAK,KAAM,OAAO,CAEzB,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,OAASC,cAAc,KAAQ,wBAAwB,CACvD,OAASC,eAAe,CAAEC,cAAc,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,4BAEnD,CAAAC,QAAQ,uBAAAC,gBAAA,EAAAC,SAAA,CAAAF,QAAA,CAAAC,gBAAA,MAAAE,MAAA,CAAAC,YAAA,CAAAJ,QAAA,EACZ,SAAAA,SAAYK,KAAK,CAAE,KAAAC,KAAA,CAAAC,eAAA,MAAAP,QAAA,EACjBM,KAAA,CAAAH,MAAA,CAAAK,IA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CAAC,CAAC,CAAC,CAAkB,CAAC,cAChE5E,IAAA,CAACH,eAAe,EAAAoD,QAAA,CACbrD,cAAc,CAAC6F,GAAG,CAAC,WAAW,CAAC,CAAGA,GAAG,CAAC,eAAe,CAAC,CAAC,CACzC,CAAC,cAClBzF,IAAA,CAACH,eAAe,EAAAoD,QAAA,CACbrD,cAAc,CAAC6F,GAAG,CAAC,WAAW,CAAC,CAAC,CAClB,CAAC,cAClBzF,IAAA,CAACH,eAAe,EAAAoD,QAAA,CAAEwC,GAAG,CAAC,WAAW,CAAC,CAACb,OAAO,CAAC,CAAC,CAAC,CAAkB,CAAC,cAChE5E,IAAA,CAACH,eAAe,EAAAoD,QAAA,CACbrD,cAAc,CACb6F,GAAG,CAAC,gBAAgB,CAAC,CAAGA,GAAG,CAAC,oBAAoB,CAClD,CAAC,CACc,CAAC,cAClBzF,IAAA,CAACH,eAAe,EAAAoD,QAAA,CACbrD,cAAc,CAAC6F,GAAG,CAAC,gBAAgB,CAAC,CAAC,CACvB,CAAC,EACJ,CAAC,EAClB,CAAC,CACO,CAAC,EACP,CAAC,CAEZ,CACF,CAAC,WAAAtF,QAAA,GAlSoBT,KAAK,CAACgG,SAAS,EA0StC,cAAe,CAAAvF,QAAQ","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 ExitToAppIcon from'@mui/icons-material/ExitToApp';import{Box,Stack,Typography}from'@mui/material';import Button from'@mui/material/Button';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{isValidBearerToken}from'./utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Title=function Title(_ref){var title=_ref.title;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],removeCookie=_useCookies2[2];var navigate=useNavigate();var handleLogout=function handleLogout(){removeCookie('token',{path:'/'});sessionStorage.removeItem('token');sessionStorage.removeItem('modelType');sessionStorage.removeItem('lastActiveUrl');sessionStorage.removeItem('runningModelType');sessionStorage.removeItem('registerModelType');navigate('/login',{replace:true});};return/*#__PURE__*/_jsx(Box,{mb:\"30px\",children:/*#__PURE__*/_jsxs(Stack,{direction:\"row\",alignItems:\"center\",justifyContent:\"space-between\",children:[/*#__PURE__*/_jsx(Typography,{variant:\"h2\",color:\"#141414\",fontWeight:\"bold\",sx:{m:'0 0 5px 0'},children:title}),isValidBearerToken(cookie.token)&&/*#__PURE__*/_jsx(Button,{variant:\"outlined\",size:\"large\",onClick:handleLogout,startIcon:/*#__PURE__*/_jsx(ExitToAppIcon,{}),children:\"LOG OUT\"})]})});};export default Title;","map":{"version":3,"names":["ExitToAppIcon","Box","Stack","Typography","Button","useCookies","useNavigate","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","Title","_ref","title","_useCookies","_useCookies2","_slicedToArray","cookie","removeCookie","navigate","handleLogout","path","sessionStorage","removeItem","replace","mb","children","direction","alignItems","justifyContent","variant","color","fontWeight","sx","m","token","size","onClick","startIcon"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/Title.js"],"sourcesContent":["import ExitToAppIcon from '@mui/icons-material/ExitToApp'\nimport { Box, Stack, Typography } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { isValidBearerToken } from './utils'\n\nconst Title = ({ title }) => {\n const [cookie, , removeCookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleLogout = () => {\n removeCookie('token', { path: '/' })\n sessionStorage.removeItem('token')\n sessionStorage.removeItem('modelType')\n sessionStorage.removeItem('lastActiveUrl')\n sessionStorage.removeItem('runningModelType')\n sessionStorage.removeItem('registerModelType')\n navigate('/login', { replace: true })\n }\n\n return (\n <Box mb=\"30px\">\n <Stack direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography\n variant=\"h2\"\n color=\"#141414\"\n fontWeight=\"bold\"\n sx={{ m: '0 0 5px 0' }}\n >\n {title}\n </Typography>\n {isValidBearerToken(cookie.token) && (\n <Button\n variant=\"outlined\"\n size=\"large\"\n onClick={handleLogout}\n startIcon={<ExitToAppIcon />}\n >\n LOG OUT\n </Button>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default Title\n"],"mappings":"6IAAA,MAAO,CAAAA,aAAa,KAAM,+BAA+B,CACzD,OAASC,GAAG,CAAEC,KAAK,CAAEC,UAAU,KAAQ,eAAe,CACtD,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,kBAAkB,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE5C,GAAM,CAAAC,KAAK,CAAG,QAAR,CAAAA,KAAKA,CAAAC,IAAA,CAAkB,IAAZ,CAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACpB,IAAAC,WAAA,CAAiCV,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAW,YAAA,CAAAC,cAAA,CAAAF,WAAA,IAA/CG,MAAM,CAAAF,YAAA,IAAIG,YAAY,CAAAH,YAAA,IAC7B,GAAM,CAAAI,QAAQ,CAAGd,WAAW,CAAC,CAAC,CAE9B,GAAM,CAAAe,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAS,CACzBF,YAAY,CAAC,OAAO,CAAE,CAAEG,IAAI,CAAE,GAAI,CAAC,CAAC,CACpCC,cAAc,CAACC,UAAU,CAAC,OAAO,CAAC,CAClCD,cAAc,CAACC,UAAU,CAAC,WAAW,CAAC,CACtCD,cAAc,CAACC,UAAU,CAAC,eAAe,CAAC,CAC1CD,cAAc,CAACC,UAAU,CAAC,kBAAkB,CAAC,CAC7CD,cAAc,CAACC,UAAU,CAAC,mBAAmB,CAAC,CAC9CJ,QAAQ,CAAC,QAAQ,CAAE,CAAEK,OAAO,CAAE,IAAK,CAAC,CAAC,CACvC,CAAC,CAED,mBACEhB,IAAA,CAACR,GAAG,EAACyB,EAAE,CAAC,MAAM,CAAAC,QAAA,cACZhB,KAAA,CAACT,KAAK,EAAC0B,SAAS,CAAC,KAAK,CAACC,UAAU,CAAC,QAAQ,CAACC,cAAc,CAAC,eAAe,CAAAH,QAAA,eACvElB,IAAA,CAACN,UAAU,EACT4B,OAAO,CAAC,IAAI,CACZC,KAAK,CAAC,SAAS,CACfC,UAAU,CAAC,MAAM,CACjBC,EAAE,CAAE,CAAEC,CAAC,CAAE,WAAY,CAAE,CAAAR,QAAA,CAEtBb,KAAK,CACI,CAAC,CACZP,kBAAkB,CAACW,MAAM,CAACkB,KAAK,CAAC,eAC/B3B,IAAA,CAACL,MAAM,EACL2B,OAAO,CAAC,UAAU,CAClBM,IAAI,CAAC,OAAO,CACZC,OAAO,CAAEjB,YAAa,CACtBkB,SAAS,cAAE9B,IAAA,CAACT,aAAa,GAAE,CAAE,CAAA2B,QAAA,CAC9B,SAED,CAAQ,CACT,EACI,CAAC,CACL,CAAC,CAEV,CAAC,CAED,cAAe,CAAAf,KAAK","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,{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 fetchWrapper from'../../components/fetchWrapper';import Title from'../../components/Title';import LaunchCustom from'./launchCustom';import LaunchLLM from'./launchLLM';import LaunchModelComponent from'./LaunchModelComponent';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModel=function LaunchModel(){var _React$useState=React.useState(sessionStorage.getItem('modelType')?sessionStorage.getItem('modelType'):'/launch_model/llm'),_React$useState2=_slicedToArray(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];var _useState=useState(-1),_useState2=_slicedToArray(_useState,2),gpuAvailable=_useState2[0],setGPUAvailable=_useState2[1];var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var handleTabChange=function handleTabChange(event,newValue){setValue(newValue);navigate(newValue);sessionStorage.setItem('modelType',newValue);newValue==='/launch_model/custom/llm'?sessionStorage.setItem('subType',newValue):'';};useEffect(function(){if(cookie.token===''||cookie.token===undefined){navigate('/login',{replace:true});return;}if(cookie.token!=='no_auth'&&!sessionStorage.getItem('token')){navigate('/login',{replace:true});return;}if(gpuAvailable===-1){fetchWrapper.get('/v1/cluster/devices').then(function(data){return setGPUAvailable(parseInt(data,10));}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}},[cookie.token]);useEffect(function(){});return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(Title,{title:\"Launch Model\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:value,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:value,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Models\",value:\"/launch_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/launch_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Models\",value:\"/launch_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Models\",value:\"/launch_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Models\",value:\"/launch_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Custom Models\",value:\"/launch_model/custom/llm\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchLLM,{gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'embedding',gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'rerank',gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'image'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'audio'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/custom/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchCustom,{gpuAvailable:gpuAvailable})})]})]});};export default LaunchModel;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","Tab","React","useContext","useEffect","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","fetchWrapper","Title","LaunchCustom","LaunchLLM","LaunchModelComponent","jsx","_jsx","jsxs","_jsxs","LaunchModel","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","value","setValue","_useState","_useState2","gpuAvailable","setGPUAvailable","_useContext","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","handleTabChange","event","newValue","setItem","token","undefined","replace","get","then","data","parseInt","catch","error","console","response","status","message","m","children","title","sx","borderBottom","borderColor","onChange","label","padding","modelType"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/index.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport Title from '../../components/Title'\nimport LaunchCustom from './launchCustom'\nimport LaunchLLM from './launchLLM'\nimport LaunchModelComponent from './LaunchModelComponent'\n\nconst LaunchModel = () => {\n const [value, setValue] = React.useState(\n sessionStorage.getItem('modelType')\n ? sessionStorage.getItem('modelType')\n : '/launch_model/llm'\n )\n const [gpuAvailable, setGPUAvailable] = useState(-1)\n\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleTabChange = (event, newValue) => {\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('modelType', newValue)\n newValue === '/launch_model/custom/llm'\n ? sessionStorage.setItem('subType', newValue)\n : ''\n }\n\n useEffect(() => {\n if (cookie.token === '' || cookie.token === undefined) {\n 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\n if (gpuAvailable === -1) {\n fetchWrapper\n .get('/v1/cluster/devices')\n .then((data) => setGPUAvailable(parseInt(data, 10)))\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n }\n }, [cookie.token])\n\n useEffect(() => {})\n return (\n <Box m=\"20px\">\n <Title title=\"Launch Model\" />\n <ErrorMessageSnackBar />\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab label=\"Language Models\" value=\"/launch_model/llm\" />\n <Tab label=\"Embedding Models\" value=\"/launch_model/embedding\" />\n <Tab label=\"Rerank Models\" value=\"/launch_model/rerank\" />\n <Tab label=\"Image Models\" value=\"/launch_model/image\" />\n <Tab label=\"Audio Models\" value=\"/launch_model/audio\" />\n <Tab label=\"Custom Models\" value=\"/launch_model/custom/llm\" />\n </TabList>\n </Box>\n <TabPanel value=\"/launch_model/llm\" sx={{ padding: 0 }}>\n <LaunchLLM gpuAvailable={gpuAvailable} />\n </TabPanel>\n <TabPanel value=\"/launch_model/embedding\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'embedding'}\n gpuAvailable={gpuAvailable}\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/rerank\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'rerank'}\n gpuAvailable={gpuAvailable}\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/image\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'image'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/audio\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'audio'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/custom/llm\" sx={{ padding: 0 }}>\n <LaunchCustom gpuAvailable={gpuAvailable} />\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchModel\n"],"mappings":"6IAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,GAAG,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,KAAK,KAAM,wB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C,CACM,CAAC,cACXb,IAAA,CAACjB,QAAQ,EAAC0B,KAAK,CAAC,sBAAsB,CAACgC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACxDvC,IAAA,CAACF,oBAAoB,EACnBiD,SAAS,CAAE,QAAS,CACpBlC,YAAY,CAAEA,YAAa,CAC5B,CAAC,CACM,CAAC,cACXb,IAAA,CAACjB,QAAQ,EAAC0B,KAAK,CAAC,qBAAqB,CAACgC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvDvC,IAAA,CAACF,oBAAoB,EAACiD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACX/C,IAAA,CAACjB,QAAQ,EAAC0B,KAAK,CAAC,qBAAqB,CAACgC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvDvC,IAAA,CAACF,oBAAoB,EAACiD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACX/C,IAAA,CAACjB,QAAQ,EAAC0B,KAAK,CAAC,0BAA0B,CAACgC,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cAC5DvC,IAAA,CAACJ,YAAY,EAACiB,YAAY,CAAEA,YAAa,CAAE,CAAC,CACpC,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAV,WAAW","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 _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,FormControl,Tab}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useNavigate}from'react-router-dom';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 customType=['llm','embedding','rerank','image','audio','flexible'];var LaunchCustom=function LaunchCustom(_ref){var gpuAvailable=_ref.gpuAvailable;var endPoint=useContext(ApiContext).endPoint;var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(sessionStorage.getItem('subType')),_useState6=_slicedToArray(_useState5,2),value=_useState6[0],setValue=_useState6[1];var navigate=useNavigate();var handleTabChange=function handleTabChange(_,newValue){var type=newValue.split('/')[3]==='llm'?'LLM':newValue.split('/')[3];getData(type);setValue(newValue);navigate(newValue);sessionStorage.setItem('subType',newValue);};var handleSearchChange=function handleSearchChange(event){setSearchTerm(event.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';return modelName.includes(searchTerm.toLowerCase());};useEffect(function(){var type=sessionStorage.getItem('subType').split('/')[3];getData(type==='llm'?'LLM':type);},[]);var getData=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(type){var data,customRegistrations,newData;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context2.next=2;break;}return _context2.abrupt(\"return\");case 2:_context2.prev=2;setIsCallingApi(true);_context2.next=6;return fetchWrapper.get(\"/v1/model_registrations/\".concat(type));case 6:data=_context2.sent;customRegistrations=data.filter(function(data){return!data.is_builtin;});_context2.next=10;return Promise.all(customRegistrations.map(/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(registration){var desc;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetchWrapper.get(\"/v1/model_registrations/\".concat(type,\"/\").concat(registration.model_name));case 2:desc=_context.sent;return _context.abrupt(\"return\",_objectSpread(_objectSpread({},desc),{},{is_builtin:registration.is_builtin}));case 4:case\"end\":return _context.stop();}},_callee);}));return function(_x2){return _ref3.apply(this,arguments);};}()));case 10:newData=_context2.sent;setRegistrationData(newData);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2[\"catch\"](2);console.error('Error:',_context2.t0);case 17:_context2.prev=17;setIsCallingApi(false);return _context2.finish(17);case 20:case\"end\":return _context2.stop();}},_callee2,null,[[2,14,17,20]]);}));return function getData(_x){return _ref2.apply(this,arguments);};}();var handlecustomDelete=function handlecustomDelete(model_name){setRegistrationData(registrationData.filter(function(item){return item.model_name!==model_name;}));};var style={display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',paddingBottom:'2rem',gridGap:'2rem 0rem'};return/*#__PURE__*/_jsx(Box,{m:\"20px\",children:/*#__PURE__*/_jsxs(TabContext,{value:value,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:value,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Models\",value:\"/launch_model/custom/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/launch_model/custom/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Models\",value:\"/launch_model/custom/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Models\",value:\"/launch_model/custom/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Models\",value:\"/launch_model/custom/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible Models\",value:\"/launch_model/custom/flexible\"})]})}),customType.map(function(item){return/*#__PURE__*/_jsxs(TabPanel,{value:\"/launch_model/custom/\".concat(item),sx:{padding:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'1fr',margin:'30px 2rem'},children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:\"Search for custom model name\",value:searchTerm,onChange:handleSearchChange,size:\"small\",hotkey:\"/\"})})}),/*#__PURE__*/_jsx(\"div\",{style:style,children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,is_custom:true,modelType:item==='llm'?'LLM':item,onHandlecustomDelete:handlecustomDelete},filteredRegistration.model_name);})})]},item);})]})});};export default LaunchCustom;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","FormControl","Tab","React","useContext","useEffect","useState","useNavigate","ApiContext","fetchWrapper","HotkeyFocusTextField","ModelCard","jsx","_jsx","jsxs","_jsxs","customType","LaunchCustom","_ref","gpuAvailable","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","sessionStorage","getItem","_useState6","value","setValue","navigate","handleTabChange","_","newValue","type","split","getData","setItem","handleSearchChange","event","target","filter","registration","modelName","model_name","toLowerCase","includes","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","data","customRegistrations","newData","wrap","_callee2$","_context2","prev","next","abrupt","get","concat","sent","is_builtin","Promise","all","map","_ref3","_callee","desc","_callee$","_context","_objectSpread","stop","_x2","apply","arguments","t0","console","error","finish","_x","handlecustomDelete","item","style","display","gridTemplateColumns","paddingLeft","paddingBottom","gridGap","m","children","sx","borderBottom","borderColor","onChange","label","padding","margin","variant","id","size","hotkey","filteredRegistration","url","modelData","is_custom","modelType","onHandlecustomDelete"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/launchCustom.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, FormControl, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport ModelCard from './modelCard'\n\nconst customType = ['llm', 'embedding', 'rerank', 'image', 'audio', 'flexible']\n\nconst LaunchCustom = ({ gpuAvailable }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [value, setValue] = useState(sessionStorage.getItem('subType'))\n\n const navigate = useNavigate()\n const handleTabChange = (_, newValue) => {\n const type =\n newValue.split('/')[3] === 'llm' ? 'LLM' : newValue.split('/')[3]\n getData(type)\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('subType', newValue)\n }\n\n const handleSearchChange = (event) => {\n setSearchTerm(event.target.value)\n }\n\n const filter = (registration) => {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n return modelName.includes(searchTerm.toLowerCase())\n }\n\n useEffect(() => {\n const type = sessionStorage.getItem('subType').split('/')[3]\n getData(type === 'llm' ? 'LLM' : type)\n }, [])\n\n const getData = async (type) => {\n if (isCallingApi || isUpdatingModel) return\n try {\n setIsCallingApi(true)\n\n const data = await fetchWrapper.get(`/v1/model_registrations/${type}`)\n const customRegistrations = data.filter((data) => !data.is_builtin)\n\n const newData = await Promise.all(\n customRegistrations.map(async (registration) => {\n const desc = await fetchWrapper.get(\n `/v1/model_registrations/${type}/${registration.model_name}`\n )\n\n return {\n ...desc,\n is_builtin: registration.is_builtin,\n }\n })\n )\n setRegistrationData(newData)\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n const handlecustomDelete = (model_name) => {\n setRegistrationData(\n registrationData.filter((item) => {\n return item.model_name !== model_name\n })\n )\n }\n\n const style = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n paddingBottom: '2rem',\n gridGap: '2rem 0rem',\n }\n\n return (\n <Box m=\"20px\">\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab label=\"Language Models\" value=\"/launch_model/custom/llm\" />\n <Tab\n label=\"Embedding Models\"\n value=\"/launch_model/custom/embedding\"\n />\n <Tab label=\"Rerank Models\" value=\"/launch_model/custom/rerank\" />\n <Tab label=\"Image Models\" value=\"/launch_model/custom/image\" />\n <Tab label=\"Audio Models\" value=\"/launch_model/custom/audio\" />\n <Tab\n label=\"Flexible Models\"\n value=\"/launch_model/custom/flexible\"\n />\n </TabList>\n </Box>\n {customType.map((item) => (\n <TabPanel\n key={item}\n value={`/launch_model/custom/${item}`}\n sx={{ padding: 0 }}\n >\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '1fr',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label=\"Search for custom model name\"\n value={searchTerm}\n onChange={handleSearchChange}\n size=\"small\"\n hotkey=\"/\"\n />\n </FormControl>\n </div>\n <div style={style}>\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n is_custom={true}\n modelType={item === 'llm' ? 'LLM' : item}\n onHandlecustomDelete={handlecustomDelete}\n />\n ))}\n </div>\n </TabPanel>\n ))}\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchCustom\n"],"mappings":"mkBAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,WAAW,CAAEC,GAAG,KAAQ,eAAe,CACrD,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,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,UAAU,CAAG,CAAC,KAAK,CAAE,WAAW,CAAE,QAAQ,CAAE,OAAO,CAAE,OAAO,CAAE,UAAU,CAAC,CAE/E,GAAM,CAAAC,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAAC,IAAA,CAAyB,IAAnB,CAAAC,YAAY,CAAAD,IAAA,CAAZC,YAAY,CAClC,GAAI,CAAAC,QAAQ,CAAGhB,UAAU,CAACI,UAAU,CAAC,CAACY,QAAQ,CAC9C,IAAAC,SAAA,CAAgDf,QAAQ,CAAC,EAAE,CAAC,CAAAgB,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAr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AAC,CACD,CAAC,GArCDwC,IAsCG,CAAC,EACZ,CAAC,EACQ,CAAC,CACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAA9E,YAAY","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _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 _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import'./styles/registerModelStyle.css';import CheckIcon from'@mui/icons-material/Check';import KeyboardDoubleArrowRightIcon from'@mui/icons-material/KeyboardDoubleArrowRight';import NotesIcon from'@mui/icons-material/Notes';import{Alert,Box,Button,Checkbox,Chip,FormControl,FormControlLabel,InputLabel,MenuItem,Radio,RadioGroup,Select,Stack,Switch,TextField,Tooltip}from'@mui/material';import React,{useContext,useEffect,useRef,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate,useParams}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import CopyComponent from'../../components/copyComponent/copyComponent';import fetchWrapper from'../../components/fetchWrapper';import AddControlnet from'./components/addControlnet';import AddModelSpecs from'./components/addModelSpecs';import languages from'./data/languages';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";var SUPPORTED_LANGUAGES_DICT={en:'English',zh:'Chinese'};var SUPPORTED_FEATURES=['Generate','Chat','Vision'];// Convert dictionary of supported languages into list\nvar SUPPORTED_LANGUAGES=Object.keys(SUPPORTED_LANGUAGES_DICT);var RegisterModelComponent=function RegisterModelComponent(_ref){var modelType=_ref.modelType,customData=_ref.customData;var endPoint=useContext(ApiContext).endPoint;var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var _useState=useState(customData),_useState2=_slicedToArray(_useState,2),formData=_useState2[0],setFormData=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),promptStyles=_useState4[0],setPromptStyles=_useState4[1];var _useState5=useState({chat:[],generate:[]}),_useState6=_slicedToArray(_useState5,2),family=_useState6[0],setFamily=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),languagesArr=_useState8[0],setLanguagesArr=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isContextLengthAlert=_useState10[0],setIsContextLengthAlert=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isDimensionsAlert=_useState12[0],setIsDimensionsAlert=_useState12[1];var _useState13=useState(false),_useState14=_slicedToArray(_useState13,2),isMaxTokensAlert=_useState14[0],setIsMaxTokensAlert=_useState14[1];var _useState15=useState(''),_useState16=_slicedToArray(_useState15,2),jsonData=_useState16[0],setJsonData=_useState16[1];var _useState17=useState(false),_useState18=_slicedToArray(_useState17,2),isSpecsArrError=_useState18[0],setIsSpecsArrError=_useState18[1];var _useState19=useState(false),_useState20=_slicedToArray(_useState19,2),isValidLauncherArgsAlert=_useState20[0],setIsValidLauncherArgsAlert=_useState20[1];var scrollRef=useRef(null);var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var _useParams=useParams(),registerModelType=_useParams.registerModelType,model_name=_useParams.model_name;var _useState21=useState(model_name?true:false),_useState22=_slicedToArray(_useState21,2),isShow=_useState22[0],setIsShow=_useState22[1];var _useState23=useState(model_name?JSON.parse(sessionStorage.getItem('customJsonData')).model_specs:[]),_useState24=_slicedToArray(_useState23,2),specsArr=_useState24[0],setSpecsArr=_useState24[1];var _useState25=useState(model_name?JSON.parse(sessionStorage.getItem('customJsonData')).controlnet:[]),_useState26=_slicedToArray(_useState25,2),controlnetArr=_useState26[0],setControlnetArr=_useState26[1];var _useState27=useState({}),_useState28=_slicedToArray(_useState27,2),contrastObj=_useState28[0],setContrastObj=_useState28[1];var _useState29=useState(true),_useState30=_slicedToArray(_useState29,2),isEqual=_useState30[0],setIsEqual=_useState30[1];useEffect(function(){if(model_name){var data=JSON.parse(sessionStorage.getItem('customJsonData'));if(modelType==='LLM'){var lagArr=data.model_lang.filter(function(item){return item!=='en'&&item!=='zh';});setLanguagesArr(lagArr);var version=data.version,_model_name=data.model_name,model_description=data.model_description,context_length=data.context_length,model_lang=data.model_lang,model_ability=data.model_ability,model_family=data.model_family,model_specs=data.model_specs,prompt_style=data.prompt_style;var specsDataArr=model_specs.map(function(item){var model_uri=item.model_uri,model_size_in_billions=item.model_size_in_billions,model_format=item.model_format,quantizations=item.quantizations,model_file_name_template=item.model_file_name_template;return{model_uri:model_uri,model_size_in_billions:model_size_in_billions,model_format:model_format,quantizations:quantizations,model_file_name_template:model_file_name_template};});var llmData={version:version,model_name:_model_name,model_description:model_description,context_length:context_length,model_lang:model_lang,model_ability:model_ability,model_family:model_family,model_specs:specsDataArr};prompt_style?llmData.prompt_style=prompt_style:'';setFormData(llmData);setContrastObj(llmData);setSpecsArr(specsDataArr);}else{if(modelType==='embedding'){var _lagArr=data.language.filter(function(item){return item!=='en'&&item!=='zh';});setLanguagesArr(_lagArr);var _model_name2=data.model_name,dimensions=data.dimensions,max_tokens=data.max_tokens,model_uri=data.model_uri,language=data.language;var embeddingData={model_name:_model_name2,dimensions:dimensions,max_tokens:max_tokens,model_uri:model_uri,language:language};setFormData(embeddingData);setContrastObj(embeddingData);}else if(modelType==='rerank'){var _lagArr2=data.language.filter(function(item){return item!=='en'&&item!=='zh';});setLanguagesArr(_lagArr2);var _model_name3=data.model_name,_model_uri=data.model_uri,_language=data.language;var rerankData={model_name:_model_name3,model_uri:_model_uri,language:_language};setFormData(rerankData);setContrastObj(rerankData);}else if(modelType==='image'){var _model_name4=data.model_name,_model_uri2=data.model_uri,_model_family=data.model_family,controlnet=data.controlnet;var _controlnetArr=controlnet.map(function(item){var model_name=item.model_name,model_uri=item.model_uri,model_family=item.model_family;return{model_name:model_name,model_uri:model_uri,model_family:model_family};});var imageData={model_name:_model_name4,model_uri:_model_uri2,model_family:_model_family,controlnet:_controlnetArr};setFormData(imageData);setContrastObj(imageData);setControlnetArr(_controlnetArr);}else if(modelType==='audio'){var _model_name5=data.model_name,_model_uri3=data.model_uri,multilingual=data.multilingual,_model_family2=data.model_family;var audioData={model_name:_model_name5,model_uri:_model_uri3,multilingual:multilingual,model_family:_model_family2};setFormData(audioData);setContrastObj(audioData);}else if(modelType==='flexible'){var _model_name6=data.model_name,_model_uri4=data.model_uri,_model_description=data.model_description,launcher=data.launcher,launcher_args=data.launcher_args;var flexibleData={model_name:_model_name6,model_uri:_model_uri4,model_description:_model_description,launcher:launcher,launcher_args:launcher_args};setFormData(flexibleData);setContrastObj(flexibleData);}}}},[model_name]);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;}var getBuiltinFamilies=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var response,errorData,data;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetch(endPoint+'/v1/models/families',{method:'GET',headers:{'Content-Type':'application/json'}});case 2:response=_context.sent;if(response.ok){_context.next=10;break;}_context.next=6;return response.json();case 6:errorData=_context.sent;// Assuming the server returns error details in JSON format\nsetErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));_context.next=16;break;case 10:_context.next=12;return response.json();case 12:data=_context.sent;data.chat.push('other');data.generate.push('other');setFamily(data);case 16:case\"end\":return _context.stop();}},_callee);}));return function getBuiltinFamilies(){return _ref2.apply(this,arguments);};}();var getBuiltInPromptStyles=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var response,errorData,data,res,key,v;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return fetch(endPoint+'/v1/models/prompts',{method:'GET',headers:{'Content-Type':'application/json'}});case 2:response=_context2.sent;if(response.ok){_context2.next=10;break;}_context2.next=6;return response.json();case 6:errorData=_context2.sent;// Assuming the server returns error details in JSON format\nsetErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));_context2.next=16;break;case 10:_context2.next=12;return response.json();case 12:data=_context2.sent;res=[];for(key in data){v=data[key];v['name']=key;res.push(v);}setPromptStyles(res);case 16:case\"end\":return _context2.stop();}},_callee2);}));return function getBuiltInPromptStyles(){return _ref3.apply(this,arguments);};}();if(Object.prototype.hasOwnProperty.call(customData,'model_ability')&&Object.prototype.hasOwnProperty.call(customData,'model_family')){// avoid keep requesting backend to get prompts\nif(promptStyles.length===0){getBuiltInPromptStyles().catch(function(error){setErrorMsg(error.message||'An unexpected error occurred when getting builtin prompt styles.');console.error('Error: ',error);});}if(family.chat.length===0){getBuiltinFamilies().catch(function(error){setErrorMsg(error.message||'An unexpected error occurred when getting builtin prompt styles.');console.error('Error: ',error);});}}},[cookie.token]);useEffect(function(){setJsonData(JSON.stringify(formData,null,4));if(contrastObj.model_name){deepEqual(contrastObj,formData)?setIsEqual(true):setIsEqual(false);}},[formData]);var getFamilyByAbility=function getFamilyByAbility(){if(formData.model_ability.includes('chat')||formData.model_ability.includes('vision')){return family.chat;}else{return family.generate;}};var sortStringsByFirstLetter=function sortStringsByFirstLetter(arr){return arr.sort(function(a,b){var firstCharA=a.charAt(0).toLowerCase();var firstCharB=b.charAt(0).toLowerCase();if(firstCharA<firstCharB){return-1;}if(firstCharA>firstCharB){return 1;}return 0;});};var handleClick=/*#__PURE__*/function(){var _ref4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var key,type;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:console.log('formData',modelType,formData);_context3.t0=_regeneratorRuntime().keys(formData);case 2:if((_context3.t1=_context3.t0()).done){_context3.next=10;break;}key=_context3.t1.value;type=Object.prototype.toString.call(formData[key]).slice(8,-1);if(!(key!=='model_description'&&(type==='Array'&&key!=='controlnet'&&formData[key].length===0||type==='String'&&formData[key]===''||type==='Number'&&formData[key]<=0))){_context3.next=8;break;}setErrorMsg('Please fill in valid value for all fields');return _context3.abrupt(\"return\");case 8:_context3.next=2;break;case 10:if(!(isSpecsArrError||isContextLengthAlert||isDimensionsAlert||isMaxTokensAlert)){_context3.next=13;break;}setErrorMsg('Please fill in valid value for all fields');return _context3.abrupt(\"return\");case 13:try{fetchWrapper.post(\"/v1/model_registrations/\".concat(modelType),{model:JSON.stringify(formData),persist:true}).then(function(){navigate(\"/launch_model/custom/\".concat(modelType.toLowerCase()));sessionStorage.setItem('modelType','/launch_model/custom/llm');sessionStorage.setItem('subType',\"/launch_model/custom/\".concat(modelType.toLowerCase()));}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}catch(error){console.error('There was a problem with the fetch operation:',error);setErrorMsg(error.message||'An unexpected error occurred.');}case 14:case\"end\":return _context3.stop();}},_callee3);}));return function handleClick(){return _ref4.apply(this,arguments);};}();var handleNumber=function handleNumber(value,parameterName){setIsContextLengthAlert(false);setIsDimensionsAlert(false);setIsMaxTokensAlert(false);setFormData(_objectSpread(_objectSpread({},formData),{},_defineProperty({},parameterName,value)));if(value!==''&&(!Number(value)||Number(value)<=0||parseInt(value)!==parseFloat(value))){parameterName==='context_length'?setIsContextLengthAlert(true):'';parameterName==='dimensions'?setIsDimensionsAlert(true):'';parameterName==='max_tokens'?setIsMaxTokensAlert(true):'';}else if(value!==''){setFormData(_objectSpread(_objectSpread({},formData),{},_defineProperty({},parameterName,Number(value))));}};var toggleLanguage=function toggleLanguage(lang){if(modelType==='LLM'){if(formData.model_lang.includes(lang)){setFormData(_objectSpread(_objectSpread({},formData),{},{model_lang:formData.model_lang.filter(function(l){return l!==lang;})}));}else{setFormData(_objectSpread(_objectSpread({},formData),{},{model_lang:[].concat(_toConsumableArray(formData.model_lang),[lang])}));}}else{if(formData.language.includes(lang)){setFormData(_objectSpread(_objectSpread({},formData),{},{language:formData.language.filter(function(l){return l!==lang;})}));}else{setFormData(_objectSpread(_objectSpread({},formData),{},{language:[].concat(_toConsumableArray(formData.language),[lang])}));}}};var toggleAbility=function toggleAbility(ability){if(formData.model_ability.includes(ability)){var obj=JSON.parse(JSON.stringify(formData));if(ability==='chat'){delete obj.prompt_style;}setFormData(_objectSpread(_objectSpread({},obj),{},{model_ability:formData.model_ability.filter(function(a){return a!==ability;}),model_family:''}));}else{setFormData(_objectSpread(_objectSpread({},formData),{},{model_ability:[].concat(_toConsumableArray(formData.model_ability),[ability]),model_family:''}));}};var toggleFamily=function toggleFamily(value){var ps=promptStyles.find(function(item){return item.name===value;});if(formData.model_ability.includes('chat')&&ps){var _ps$stop,_ps$stop_token_ids;var prompt_style={style_name:ps.style_name,system_prompt:ps.system_prompt,roles:ps.roles,intra_message_sep:ps.intra_message_sep,inter_message_sep:ps.inter_message_sep,stop:(_ps$stop=ps.stop)!==null&&_ps$stop!==void 0?_ps$stop:null,stop_token_ids:(_ps$stop_token_ids=ps.stop_token_ids)!==null&&_ps$stop_token_ids!==void 0?_ps$stop_token_ids:null};setFormData(_objectSpread(_objectSpread({},formData),{},{model_family:value,prompt_style:prompt_style}));}else{var version=formData.version,_model_name7=formData.model_name,model_description=formData.model_description,context_length=formData.context_length,model_lang=formData.model_lang,model_ability=formData.model_ability,model_specs=formData.model_specs;setFormData({version:version,model_name:_model_name7,model_description:model_description,context_length:context_length,model_lang:model_lang,model_ability:model_ability,model_family:value,model_specs:model_specs});}};var handleSelectLanguages=function handleSelectLanguages(value){var arr=[].concat(_toConsumableArray(languagesArr),[value]);setLanguagesArr(arr);if(modelType==='LLM'){setFormData(_objectSpread(_objectSpread({},formData),{},{model_lang:Array.from(new Set([].concat(_toConsumableArray(formData.model_lang),_toConsumableArray(arr))))}));}else{setFormData(_objectSpread(_objectSpread({},formData),{},{language:Array.from(new Set([].concat(_toConsumableArray(formData.language),_toConsumableArray(arr))))}));}};var handleDeleteLanguages=function handleDeleteLanguages(item){var arr=languagesArr.filter(function(subItem){return subItem!==item;});setLanguagesArr(arr);if(modelType==='LLM'){setFormData(_objectSpread(_objectSpread({},formData),{},{model_lang:formData.model_lang.filter(function(subItem){return subItem!==item;})}));}else{setFormData(_objectSpread(_objectSpread({},formData),{},{language:formData.language.filter(function(subItem){return subItem!==item;})}));}};var getSpecsArr=function getSpecsArr(arr,isSpecsArrError){setFormData(_objectSpread(_objectSpread({},formData),{},{model_specs:arr}));setIsSpecsArrError(isSpecsArrError);};var getControlnetArr=function getControlnetArr(arr){setFormData(_objectSpread(_objectSpread({},formData),{},{controlnet:arr}));};var handleCancel=function handleCancel(){navigate(\"/launch_model/custom/\".concat(registerModelType));};var handleEdit=function handleEdit(){fetchWrapper.delete(\"/v1/model_registrations/\".concat(registerModelType==='llm'?'LLM':registerModelType,\"/\").concat(model_name)).then(function(){return handleClick();}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});};var deepEqual=function deepEqual(obj1,obj2){if(obj1===obj2)return true;if(typeof obj1!=='object'||typeof obj2!=='object'||obj1==null||obj2==null){return false;}var keysA=Object.keys(obj1);var keysB=Object.keys(obj2);if(keysA.length!==keysB.length)return false;for(var _i=0,_keysA=keysA;_i<_keysA.length;_i++){var key=_keysA[_i];if(!keysB.includes(key)||!deepEqual(obj1[key],obj2[key])){return false;}}return true;};return/*#__PURE__*/_jsxs(Box,{style:{display:'flex',overFlow:'hidden',maxWidth:'100%'},children:[/*#__PURE__*/_jsxs(\"div\",{className:\"show-json\",children:[/*#__PURE__*/_jsx(\"p\",{children:\"Show custom json config used by api\"}),isShow?/*#__PURE__*/_jsx(Tooltip,{title:\"Pack up\",placement:\"top\",children:/*#__PURE__*/_jsx(KeyboardDoubleArrowRightIcon,{className:\"icon arrow\",onClick:function onClick(){return setIsShow(!isShow);}})}):/*#__PURE__*/_jsx(Tooltip,{title:\"Unfold\",placement:\"top\",children:/*#__PURE__*/_jsx(NotesIcon,{className:\"icon notes\",onClick:function onClick(){return setIsShow(!isShow);}})})]}),/*#__PURE__*/_jsxs(\"div\",{ref:scrollRef,className:isShow?'formBox':'formBox broaden',children:[/*#__PURE__*/_jsxs(FormControl,{style:{width:'100%'},children:[customData.model_name&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Model Name\",error:formData.model_name?false:true,value:formData.model_name,size:\"small\",helperText:\"Alphanumeric characters with properly placed hyphens and underscores. Must not match any built-in model names.\",onChange:function onChange(event){return setFormData(_objectSpread(_objectSpread({},formData),{},{model_name:event.target.value}));}}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.model_description&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Model Description (Optional)\",value:formData.model_description,size:\"small\",onChange:function onChange(event){return setFormData(_objectSpread(_objectSpread({},formData),{},{model_description:event.target.value}));}}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.context_length&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{error:Number(formData.context_length)>0?false:true,label:\"Context Length\",value:formData.context_length,size:\"small\",onChange:function onChange(event){handleNumber(event.target.value,'context_length');}}),isContextLengthAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.dimensions&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Dimensions\",error:Number(formData.dimensions)>0?false:true,value:formData.dimensions,size:\"small\",onChange:function onChange(event){handleNumber(event.target.value,'dimensions');}}),isDimensionsAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.max_tokens&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Max Tokens\",error:Number(formData.max_tokens)>0?false:true,value:formData.max_tokens,size:\"small\",onChange:function onChange(event){handleNumber(event.target.value,'max_tokens');}}),isMaxTokensAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.model_uri&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Model Path\",error:formData.model_uri?false:true,value:formData.model_uri,size:\"small\",helperText:\"Provide the model directory path.\",onChange:function onChange(event){return setFormData(_objectSpread(_objectSpread({},formData),{},{model_uri:event.target.value}));}}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),(customData.model_lang||customData.language)&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5,color:modelType==='LLM'?formData.model_lang.length===0?'#d32f2f':'inherit':formData.language.length===0?'#d32f2f':'inherit'},children:\"Model Languages\"}),/*#__PURE__*/_jsxs(Box,{className:\"checkboxWrapper\",children:[SUPPORTED_LANGUAGES.map(function(lang){return/*#__PURE__*/_jsx(Box,{sx:{marginRight:'10px'},children:/*#__PURE__*/_jsx(FormControlLabel,{control:/*#__PURE__*/_jsx(Checkbox,{checked:modelType==='LLM'?formData.model_lang.includes(lang):formData.language.includes(lang),onChange:function onChange(){return toggleLanguage(lang);},name:lang}),label:SUPPORTED_LANGUAGES_DICT[lang],style:{paddingLeft:10}})},lang);}),/*#__PURE__*/_jsxs(FormControl,{sx:{m:1,minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{children:\"Languages\"}),/*#__PURE__*/_jsx(Select,{value:'',label:\"Languages\",onChange:function onChange(e){return handleSelectLanguages(e.target.value);},MenuProps:{PaperProps:{style:{maxHeight:'20vh'}}},children:languages.filter(function(item){return!languagesArr.includes(item.code);}).map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item.code,children:item.code},item.code);})})]})]}),/*#__PURE__*/_jsx(Stack,{direction:\"row\",spacing:1,style:{marginLeft:'10px'},children:languagesArr.map(function(item){return/*#__PURE__*/_jsx(Chip,{label:item,variant:\"outlined\",size:\"small\",color:\"primary\",onDelete:function onDelete(){return handleDeleteLanguages(item);}},item);})}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),'multilingual'in customData&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5},children:\"Multilingual\"}),/*#__PURE__*/_jsx(FormControlLabel,{style:{marginLeft:0,width:50},control:/*#__PURE__*/_jsx(Switch,{checked:formData.multilingual}),onChange:function onChange(e){return setFormData(_objectSpread(_objectSpread({},formData),{},{multilingual:e.target.checked}));}}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.model_ability&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5,color:formData.model_ability.length==0?'#d32f2f':'inherit'},children:\"Model Abilities\"}),/*#__PURE__*/_jsx(Box,{className:\"checkboxWrapper\",children:SUPPORTED_FEATURES.map(function(ability){return/*#__PURE__*/_jsx(Box,{sx:{marginRight:'10px'},children:/*#__PURE__*/_jsx(FormControlLabel,{control:/*#__PURE__*/_jsx(Checkbox,{checked:formData.model_ability.includes(ability.toLowerCase()),onChange:function onChange(){return toggleAbility(ability.toLowerCase());},name:ability}),label:ability,style:{paddingLeft:10}})},ability);})}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),(customData.model_family===''||customData.model_family)&&/*#__PURE__*/_jsxs(FormControl,{children:[/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5,color:'inherit'},children:\"Model Family\"}),modelType==='LLM'&&formData.model_family&&/*#__PURE__*/_jsxs(Alert,{icon:/*#__PURE__*/_jsx(CheckIcon,{fontSize:\"inherit\"}),severity:\"success\",children:[\"Please be careful to select the family name corresponding to the model you want to register. If not found, please choose\",/*#__PURE__*/_jsx(\"i\",{style:{fontStyle:'italic',fontWeight:700},children:\" other\"}),\".\"]}),modelType==='LLM'&&!formData.model_family&&/*#__PURE__*/_jsxs(Alert,{severity:\"error\",children:[\"Please be careful to select the family name corresponding to the model you want to register. If not found, please choose\",/*#__PURE__*/_jsx(\"i\",{style:{fontStyle:'italic',fontWeight:700},children:\" other\"}),\".\"]}),/*#__PURE__*/_jsx(RadioGroup,{value:formData.model_family,onChange:function onChange(e){toggleFamily(e.target.value);},children:/*#__PURE__*/_jsxs(Box,{className:\"checkboxWrapper\",style:{paddingLeft:'10px'},children:[modelType==='LLM'&&sortStringsByFirstLetter(getFamilyByAbility()).map(function(v){return/*#__PURE__*/_jsx(Box,{sx:{width:'20%'},children:/*#__PURE__*/_jsx(FormControlLabel,{value:v,control:/*#__PURE__*/_jsx(Radio,{}),label:v})},v);}),(modelType==='image'||modelType==='audio')&&/*#__PURE__*/_jsx(FormControlLabel,{value:formData.model_family,checked:true,control:/*#__PURE__*/_jsx(Radio,{}),label:formData.model_family})]})}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.model_specs&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(AddModelSpecs,{isJump:model_name?true:false,formData:customData.model_specs[0],specsDataArr:specsArr,onGetArr:getSpecsArr,scrollRef:scrollRef}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.controlnet&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(AddControlnet,{controlnetDataArr:controlnetArr,onGetControlnetArr:getControlnetArr,scrollRef:scrollRef}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.launcher&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Launcher\",error:formData.launcher?false:true,value:formData.launcher,size:\"small\",helperText:\"Provide the model launcher.\",onChange:function onChange(event){return setFormData(_objectSpread(_objectSpread({},formData),{},{launcher:event.target.value}));}}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]}),customData.launcher_args&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{label:\"Launcher Arguments (Optional)\",value:formData.launcher_args,size:\"small\",helperText:\"A JSON-formatted dictionary representing the arguments passed to the Launcher.\",onChange:function onChange(event){try{JSON.parse(event.target.value);setIsValidLauncherArgsAlert(false);}catch(_unused){setIsValidLauncherArgsAlert(true);}return setFormData(_objectSpread(_objectSpread({},formData),{},{launcher_args:event.target.value}));},multiline:true,rows:4}),isValidLauncherArgsAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter the JSON-formatted dictionary.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"})]})]}),model_name?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Button,{variant:\"contained\",color:\"primary\",type:\"submit\",onClick:handleEdit,disabled:isEqual,children:\"Edit\"}),/*#__PURE__*/_jsx(Button,{style:{marginLeft:30},variant:\"outlined\",color:\"primary\",type:\"submit\",onClick:handleCancel,children:\"Cancel\"})]}):/*#__PURE__*/_jsx(Box,{width:'100%',children:/*#__PURE__*/_jsx(Button,{variant:\"contained\",color:\"primary\",type:\"submit\",onClick:handleClick,children:\"Register Model\"})})]}),/*#__PURE__*/_jsxs(\"div\",{className:isShow?'jsonBox':'jsonBox hide',children:[/*#__PURE__*/_jsxs(\"div\",{className:\"jsonBox-header\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"jsonBox-title\",children:\"JSON Format\"}),/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy all',text:jsonData})]}),/*#__PURE__*/_jsx(\"textarea\",{readOnly:true,className:\"textarea\",value:jsonData})]})]});};export default RegisterModelComponent;","map":{"version":3,"names":["CheckIcon","KeyboardDoubleArrowRightIcon","NotesIcon","Alert","Box","Button","Checkbox","Chip","FormControl","FormControlLabel","InputLabel","MenuItem","Radio","RadioGroup","Select","Stack","Switch","TextField","Tooltip","React","useContext","useEffect","useRef","useState","useCookies","useNavigate","useParams","ApiContext","CopyComponent","fetchWrapper","AddControlnet","AddModelSpecs","languages","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SUPPORTED_LANGUAGES_DICT","en","zh","SUPPORTED_FEATURES","SUPPORTED_LANGUAGES","Object","keys","RegisterModelComponent","_ref","modelType","customData","endPoint","_useContext","setErrorMsg","_useState","_useState2","_slicedToArray","formData","setFormData","_useState3","_useState4","promptStyles","setPromptStyles","_useState5","chat","generate","_useState6","family","setFamily","_useState7","_useState8","languagesArr","setLanguagesArr","_useState9","_useState10","isContextLengthAlert","setIsContextLengthAlert","_useState11","_useState12","isDimensionsAlert","setIsDimensionsAlert","_useState13","_useState14","isMaxTokensAlert","setIsMaxTokensAlert","_useState15","_useState16","jsonData","setJsonData","_useState17","_useState18","isSpecsArrError","setIsSpecsArrError","_useState19","_useState20","isValidLauncherArgsAlert","setIsValidLauncherArgsAlert","scrollRef","_useCookies","_useCookies2","cookie","navigate","_useParams","registerModelType","model_name","_useState21","_useState22","isShow","setIsShow","_useState23","JSON","parse","sessionStorage","getItem","model_specs","_useState24","specsArr","setSpecsArr","_useState25","controlnet","_useState26","controlnetArr","setControlnetArr","_useState27","_useState28","contrastObj","setContrastObj","_useState29","_useState30","isEqual","setIsEqual","data","lagArr","model_lang","filter","item","version","model_description","context_length","model_ability","model_family","prompt_style","specsDataArr","map","model_uri","model_size_in_billions","model_format","quantizations","model_file_name_template","llmData","language","dimensions","max_tokens","embeddingData","rerankData","imageData","multilingual","audioData","launcher","launcher_args","flexibleData","token","undefined","replace","getBuiltinFamilies","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","errorData","wrap","_callee$","_context","prev","next","fetch","method","headers","sent","ok","json","concat","status","detail","push","stop","apply","arguments","getBuiltInPromptStyles","_ref3","_callee2","res","key","v","_callee2$","_context2","prototype","hasOwnProperty","call","length","catch","error","message","console","stringify","deepEqual","getFamilyByAbility","includes","sortStringsByFirstLetter","arr","sort","a","b","firstCharA","charAt","toLowerCase","firstCharB","handleClick","_ref4","_callee3","type","_callee3$","_context3","log","t0","t1","done","value","toString","slice","abrupt","post","model","persist","then","setItem","handleNumber","parameterName","_objectSpread","_defineProperty","Number","parseInt","parseFloat","toggleLanguage","lang","l","_toConsumableArray","toggleAbility","ability","obj","toggleFamily","ps","find","name","_ps$stop","_ps$stop_token_ids","style_name","system_prompt","roles","intra_message_sep","inter_message_sep","stop_token_ids","handleSelectLanguages","Array","from","Set","handleDeleteLanguages","subItem","getSpecsArr","getControlnetArr","handleCancel","handleEdit","delete","obj1","obj2","keysA","keysB","_i","_keysA","style","display","overFlow","maxWidth","children","className","title","placement","onClick","ref","width","label","size","helperText","onChange","event","target","padding","severity","paddingLeft","color","sx","marginRight","control","checked","m","minWidth","e","MenuProps","PaperProps","maxHeight","code","direction","spacing","marginLeft","variant","onDelete","icon","fontSize","fontStyle","fontWeight","isJump","onGetArr","controlnetDataArr","onGetControlnetArr","_unused","multiline","rows","disabled","tip","text","readOnly"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/register_model/registerModel.js"],"sourcesContent":["import './styles/registerModelStyle.css'\n\nimport CheckIcon from '@mui/icons-material/Check'\nimport KeyboardDoubleArrowRightIcon from '@mui/icons-material/KeyboardDoubleArrowRight'\nimport NotesIcon from '@mui/icons-material/Notes'\nimport {\n Alert,\n Box,\n Button,\n Checkbox,\n Chip,\n FormControl,\n FormControlLabel,\n InputLabel,\n MenuItem,\n Radio,\n RadioGroup,\n Select,\n Stack,\n Switch,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate, useParams } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport CopyComponent from '../../components/copyComponent/copyComponent'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport AddControlnet from './components/addControlnet'\nimport AddModelSpecs from './components/addModelSpecs'\nimport languages from './data/languages'\nconst SUPPORTED_LANGUAGES_DICT = { en: 'English', zh: 'Chinese' }\nconst SUPPORTED_FEATURES = ['Generate', 'Chat', 'Vision']\n\n// Convert dictionary of supported languages into list\nconst SUPPORTED_LANGUAGES = Object.keys(SUPPORTED_LANGUAGES_DICT)\n\nconst RegisterModelComponent = ({ modelType, customData }) => {\n const endPoint = useContext(ApiContext).endPoint\n const { setErrorMsg } = useContext(ApiContext)\n const [formData, setFormData] = useState(customData)\n const [promptStyles, setPromptStyles] = useState([])\n const [family, setFamily] = useState({\n chat: [],\n generate: [],\n })\n const [languagesArr, setLanguagesArr] = useState([])\n const [isContextLengthAlert, setIsContextLengthAlert] = useState(false)\n const [isDimensionsAlert, setIsDimensionsAlert] = useState(false)\n const [isMaxTokensAlert, setIsMaxTokensAlert] = useState(false)\n const [jsonData, setJsonData] = useState('')\n const [isSpecsArrError, setIsSpecsArrError] = useState(false)\n const [isValidLauncherArgsAlert, setIsValidLauncherArgsAlert] =\n useState(false)\n const scrollRef = useRef(null)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const { registerModelType, model_name } = useParams()\n const [isShow, setIsShow] = useState(model_name ? true : false)\n const [specsArr, setSpecsArr] = useState(\n model_name\n ? JSON.parse(sessionStorage.getItem('customJsonData')).model_specs\n : []\n )\n const [controlnetArr, setControlnetArr] = useState(\n model_name\n ? JSON.parse(sessionStorage.getItem('customJsonData')).controlnet\n : []\n )\n const [contrastObj, setContrastObj] = useState({})\n const [isEqual, setIsEqual] = useState(true)\n\n useEffect(() => {\n if (model_name) {\n const data = JSON.parse(sessionStorage.getItem('customJsonData'))\n\n if (modelType === 'LLM') {\n const lagArr = data.model_lang.filter(\n (item) => item !== 'en' && item !== 'zh'\n )\n setLanguagesArr(lagArr)\n\n const {\n version,\n model_name,\n model_description,\n context_length,\n model_lang,\n model_ability,\n model_family,\n model_specs,\n prompt_style,\n } = data\n const specsDataArr = model_specs.map((item) => {\n const {\n model_uri,\n model_size_in_billions,\n model_format,\n quantizations,\n model_file_name_template,\n } = item\n return {\n model_uri,\n model_size_in_billions,\n model_format,\n quantizations,\n model_file_name_template,\n }\n })\n const llmData = {\n version,\n model_name,\n model_description,\n context_length,\n model_lang,\n model_ability,\n model_family,\n model_specs: specsDataArr,\n }\n prompt_style ? (llmData.prompt_style = prompt_style) : ''\n setFormData(llmData)\n setContrastObj(llmData)\n setSpecsArr(specsDataArr)\n } else {\n if (modelType === 'embedding') {\n const lagArr = data.language.filter(\n (item) => item !== 'en' && item !== 'zh'\n )\n setLanguagesArr(lagArr)\n\n const { model_name, dimensions, max_tokens, model_uri, language } =\n data\n const embeddingData = {\n model_name,\n dimensions,\n max_tokens,\n model_uri,\n language,\n }\n setFormData(embeddingData)\n setContrastObj(embeddingData)\n } else if (modelType === 'rerank') {\n const lagArr = data.language.filter(\n (item) => item !== 'en' && item !== 'zh'\n )\n setLanguagesArr(lagArr)\n\n const { model_name, model_uri, language } = data\n const rerankData = {\n model_name,\n model_uri,\n language,\n }\n setFormData(rerankData)\n setContrastObj(rerankData)\n } else if (modelType === 'image') {\n const { model_name, model_uri, model_family, controlnet } = data\n const controlnetArr = controlnet.map((item) => {\n const { model_name, model_uri, model_family } = item\n return {\n model_name,\n model_uri,\n model_family,\n }\n })\n const imageData = {\n model_name,\n model_uri,\n model_family,\n controlnet: controlnetArr,\n }\n setFormData(imageData)\n setContrastObj(imageData)\n setControlnetArr(controlnetArr)\n } else if (modelType === 'audio') {\n const { model_name, model_uri, multilingual, model_family } = data\n const audioData = {\n model_name,\n model_uri,\n multilingual,\n model_family,\n }\n setFormData(audioData)\n setContrastObj(audioData)\n } else if (modelType === 'flexible') {\n const {\n model_name,\n model_uri,\n model_description,\n launcher,\n launcher_args,\n } = data\n const flexibleData = {\n model_name,\n model_uri,\n model_description,\n launcher,\n launcher_args,\n }\n setFormData(flexibleData)\n setContrastObj(flexibleData)\n }\n }\n }\n }, [model_name])\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\n const getBuiltinFamilies = async () => {\n const response = await fetch(endPoint + '/v1/models/families', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n if (!response.ok) {\n const errorData = await response.json() // Assuming the server returns error details in JSON format\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n } else {\n const data = await response.json()\n data.chat.push('other')\n data.generate.push('other')\n setFamily(data)\n }\n }\n\n const getBuiltInPromptStyles = async () => {\n const response = await fetch(endPoint + '/v1/models/prompts', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n if (!response.ok) {\n const errorData = await response.json() // Assuming the server returns error details in JSON format\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n } else {\n const data = await response.json()\n let res = []\n for (const key in data) {\n let v = data[key]\n v['name'] = key\n res.push(v)\n }\n setPromptStyles(res)\n }\n }\n\n if (\n Object.prototype.hasOwnProperty.call(customData, 'model_ability') &&\n Object.prototype.hasOwnProperty.call(customData, 'model_family')\n ) {\n // avoid keep requesting backend to get prompts\n if (promptStyles.length === 0) {\n getBuiltInPromptStyles().catch((error) => {\n setErrorMsg(\n error.message ||\n 'An unexpected error occurred when getting builtin prompt styles.'\n )\n console.error('Error: ', error)\n })\n }\n if (family.chat.length === 0) {\n getBuiltinFamilies().catch((error) => {\n setErrorMsg(\n error.message ||\n 'An unexpected error occurred when getting builtin prompt styles.'\n )\n console.error('Error: ', error)\n })\n }\n }\n }, [cookie.token])\n\n useEffect(() => {\n setJsonData(JSON.stringify(formData, null, 4))\n if (contrastObj.model_name) {\n deepEqual(contrastObj, formData) ? setIsEqual(true) : setIsEqual(false)\n }\n }, [formData])\n\n const getFamilyByAbility = () => {\n if (\n formData.model_ability.includes('chat') ||\n formData.model_ability.includes('vision')\n ) {\n return family.chat\n } else {\n return family.generate\n }\n }\n\n const sortStringsByFirstLetter = (arr) => {\n return arr.sort((a, b) => {\n const firstCharA = a.charAt(0).toLowerCase()\n const firstCharB = b.charAt(0).toLowerCase()\n if (firstCharA < firstCharB) {\n return -1\n }\n if (firstCharA > firstCharB) {\n return 1\n }\n return 0\n })\n }\n\n const handleClick = async () => {\n console.log('formData', modelType, formData)\n\n for (let key in formData) {\n const type = Object.prototype.toString.call(formData[key]).slice(8, -1)\n if (\n key !== 'model_description' &&\n ((type === 'Array' &&\n key !== 'controlnet' &&\n formData[key].length === 0) ||\n (type === 'String' && formData[key] === '') ||\n (type === 'Number' && formData[key] <= 0))\n ) {\n setErrorMsg('Please fill in valid value for all fields')\n return\n }\n }\n\n if (\n isSpecsArrError ||\n isContextLengthAlert ||\n isDimensionsAlert ||\n isMaxTokensAlert\n ) {\n setErrorMsg('Please fill in valid value for all fields')\n return\n }\n\n try {\n fetchWrapper\n .post(`/v1/model_registrations/${modelType}`, {\n model: JSON.stringify(formData),\n persist: true,\n })\n .then(() => {\n navigate(`/launch_model/custom/${modelType.toLowerCase()}`)\n sessionStorage.setItem('modelType', '/launch_model/custom/llm')\n sessionStorage.setItem(\n 'subType',\n `/launch_model/custom/${modelType.toLowerCase()}`\n )\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n } catch (error) {\n console.error('There was a problem with the fetch operation:', error)\n setErrorMsg(error.message || 'An unexpected error occurred.')\n }\n }\n\n const handleNumber = (value, parameterName) => {\n setIsContextLengthAlert(false)\n setIsDimensionsAlert(false)\n setIsMaxTokensAlert(false)\n setFormData({ ...formData, [parameterName]: value })\n\n if (\n value !== '' &&\n (!Number(value) ||\n Number(value) <= 0 ||\n parseInt(value) !== parseFloat(value))\n ) {\n parameterName === 'context_length' ? setIsContextLengthAlert(true) : ''\n parameterName === 'dimensions' ? setIsDimensionsAlert(true) : ''\n parameterName === 'max_tokens' ? setIsMaxTokensAlert(true) : ''\n } else if (value !== '') {\n setFormData({ ...formData, [parameterName]: Number(value) })\n }\n }\n\n const toggleLanguage = (lang) => {\n if (modelType === 'LLM') {\n if (formData.model_lang.includes(lang)) {\n setFormData({\n ...formData,\n model_lang: formData.model_lang.filter((l) => l !== lang),\n })\n } else {\n setFormData({\n ...formData,\n model_lang: [...formData.model_lang, lang],\n })\n }\n } else {\n if (formData.language.includes(lang)) {\n setFormData({\n ...formData,\n language: formData.language.filter((l) => l !== lang),\n })\n } else {\n setFormData({\n ...formData,\n language: [...formData.language, lang],\n })\n }\n }\n }\n\n const toggleAbility = (ability) => {\n if (formData.model_ability.includes(ability)) {\n const obj = JSON.parse(JSON.stringify(formData))\n if (ability === 'chat') {\n delete obj.prompt_style\n }\n setFormData({\n ...obj,\n model_ability: formData.model_ability.filter((a) => a !== ability),\n model_family: '',\n })\n } else {\n setFormData({\n ...formData,\n model_ability: [...formData.model_ability, ability],\n model_family: '',\n })\n }\n }\n\n const toggleFamily = (value) => {\n const ps = promptStyles.find((item) => item.name === value)\n if (formData.model_ability.includes('chat') && ps) {\n const prompt_style = {\n style_name: ps.style_name,\n system_prompt: ps.system_prompt,\n roles: ps.roles,\n intra_message_sep: ps.intra_message_sep,\n inter_message_sep: ps.inter_message_sep,\n stop: ps.stop ?? null,\n stop_token_ids: ps.stop_token_ids ?? null,\n }\n setFormData({\n ...formData,\n model_family: value,\n prompt_style,\n })\n } else {\n const {\n version,\n model_name,\n model_description,\n context_length,\n model_lang,\n model_ability,\n model_specs,\n } = formData\n setFormData({\n version,\n model_name,\n model_description,\n context_length,\n model_lang,\n model_ability,\n model_family: value,\n model_specs,\n })\n }\n }\n\n const handleSelectLanguages = (value) => {\n const arr = [...languagesArr, value]\n setLanguagesArr(arr)\n if (modelType === 'LLM') {\n setFormData({\n ...formData,\n model_lang: Array.from(new Set([...formData.model_lang, ...arr])),\n })\n } else {\n setFormData({\n ...formData,\n language: Array.from(new Set([...formData.language, ...arr])),\n })\n }\n }\n\n const handleDeleteLanguages = (item) => {\n const arr = languagesArr.filter((subItem) => subItem !== item)\n setLanguagesArr(arr)\n if (modelType === 'LLM') {\n setFormData({\n ...formData,\n model_lang: formData.model_lang.filter((subItem) => subItem !== item),\n })\n } else {\n setFormData({\n ...formData,\n language: formData.language.filter((subItem) => subItem !== item),\n })\n }\n }\n\n const getSpecsArr = (arr, isSpecsArrError) => {\n setFormData({ ...formData, model_specs: arr })\n setIsSpecsArrError(isSpecsArrError)\n }\n\n const getControlnetArr = (arr) => {\n setFormData({ ...formData, controlnet: arr })\n }\n\n const handleCancel = () => {\n navigate(`/launch_model/custom/${registerModelType}`)\n }\n\n const handleEdit = () => {\n fetchWrapper\n .delete(\n `/v1/model_registrations/${\n registerModelType === 'llm' ? 'LLM' : registerModelType\n }/${model_name}`\n )\n .then(() => handleClick())\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const deepEqual = (obj1, obj2) => {\n if (obj1 === obj2) return true\n if (\n typeof obj1 !== 'object' ||\n typeof obj2 !== 'object' ||\n obj1 == null ||\n obj2 == null\n ) {\n return false\n }\n\n let keysA = Object.keys(obj1)\n let keysB = Object.keys(obj2)\n if (keysA.length !== keysB.length) return false\n for (let key of keysA) {\n if (!keysB.includes(key) || !deepEqual(obj1[key], obj2[key])) {\n return false\n }\n }\n return true\n }\n\n return (\n <Box style={{ display: 'flex', overFlow: 'hidden', maxWidth: '100%' }}>\n <div className=\"show-json\">\n <p>Show custom json config used by api</p>\n {isShow ? (\n <Tooltip title=\"Pack up\" placement=\"top\">\n <KeyboardDoubleArrowRightIcon\n className=\"icon arrow\"\n onClick={() => setIsShow(!isShow)}\n />\n </Tooltip>\n ) : (\n <Tooltip title=\"Unfold\" placement=\"top\">\n <NotesIcon\n className=\"icon notes\"\n onClick={() => setIsShow(!isShow)}\n />\n </Tooltip>\n )}\n </div>\n <div ref={scrollRef} className={isShow ? 'formBox' : 'formBox broaden'}>\n {/* Base Information */}\n <FormControl style={{ width: '100%' }}>\n {/* name */}\n {customData.model_name && (\n <>\n <TextField\n label=\"Model Name\"\n error={formData.model_name ? false : true}\n value={formData.model_name}\n size=\"small\"\n helperText=\"Alphanumeric characters with properly placed hyphens and underscores. Must not match any built-in model names.\"\n onChange={(event) =>\n setFormData({ ...formData, model_name: event.target.value })\n }\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* description */}\n {customData.model_description && (\n <>\n <TextField\n label=\"Model Description (Optional)\"\n value={formData.model_description}\n size=\"small\"\n onChange={(event) =>\n setFormData({\n ...formData,\n model_description: event.target.value,\n })\n }\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* Context Length */}\n {customData.context_length && (\n <>\n <TextField\n error={Number(formData.context_length) > 0 ? false : true}\n label=\"Context Length\"\n value={formData.context_length}\n size=\"small\"\n onChange={(event) => {\n handleNumber(event.target.value, 'context_length')\n }}\n />\n {isContextLengthAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0.\n </Alert>\n )}\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* dimensions */}\n {customData.dimensions && (\n <>\n <TextField\n label=\"Dimensions\"\n error={Number(formData.dimensions) > 0 ? false : true}\n value={formData.dimensions}\n size=\"small\"\n onChange={(event) => {\n handleNumber(event.target.value, 'dimensions')\n }}\n />\n {isDimensionsAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0.\n </Alert>\n )}\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* Max Tokens */}\n {customData.max_tokens && (\n <>\n <TextField\n label=\"Max Tokens\"\n error={Number(formData.max_tokens) > 0 ? false : true}\n value={formData.max_tokens}\n size=\"small\"\n onChange={(event) => {\n handleNumber(event.target.value, 'max_tokens')\n }}\n />\n {isMaxTokensAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0.\n </Alert>\n )}\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* path */}\n {customData.model_uri && (\n <>\n <TextField\n label=\"Model Path\"\n error={formData.model_uri ? false : true}\n value={formData.model_uri}\n size=\"small\"\n helperText=\"Provide the model directory path.\"\n onChange={(event) =>\n setFormData({ ...formData, model_uri: event.target.value })\n }\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* model_lang */}\n {(customData.model_lang || customData.language) && (\n <>\n <label\n style={{\n paddingLeft: 5,\n color:\n modelType === 'LLM'\n ? formData.model_lang.length === 0\n ? '#d32f2f'\n : 'inherit'\n : formData.language.length === 0\n ? '#d32f2f'\n : 'inherit',\n }}\n >\n Model Languages\n </label>\n <Box className=\"checkboxWrapper\">\n {SUPPORTED_LANGUAGES.map((lang) => (\n <Box key={lang} sx={{ marginRight: '10px' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={\n modelType === 'LLM'\n ? formData.model_lang.includes(lang)\n : formData.language.includes(lang)\n }\n onChange={() => toggleLanguage(lang)}\n name={lang}\n />\n }\n label={SUPPORTED_LANGUAGES_DICT[lang]}\n style={{\n paddingLeft: 10,\n }}\n />\n </Box>\n ))}\n <FormControl sx={{ m: 1, minWidth: 120 }} size=\"small\">\n <InputLabel>Languages</InputLabel>\n <Select\n value={''}\n label=\"Languages\"\n onChange={(e) => handleSelectLanguages(e.target.value)}\n MenuProps={{\n PaperProps: {\n style: { maxHeight: '20vh' },\n },\n }}\n >\n {languages\n .filter((item) => !languagesArr.includes(item.code))\n .map((item) => (\n <MenuItem key={item.code} value={item.code}>\n {item.code}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </Box>\n <Stack direction=\"row\" spacing={1} style={{ marginLeft: '10px' }}>\n {languagesArr.map((item) => (\n <Chip\n key={item}\n label={item}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n onDelete={() => handleDeleteLanguages(item)}\n />\n ))}\n </Stack>\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* multilingual */}\n {'multilingual' in customData && (\n <>\n <label\n style={{\n paddingLeft: 5,\n }}\n >\n Multilingual\n </label>\n <FormControlLabel\n style={{ marginLeft: 0, width: 50 }}\n control={<Switch checked={formData.multilingual} />}\n onChange={(e) =>\n setFormData({ ...formData, multilingual: e.target.checked })\n }\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* abilities */}\n {customData.model_ability && (\n <>\n <label\n style={{\n paddingLeft: 5,\n color:\n formData.model_ability.length == 0 ? '#d32f2f' : 'inherit',\n }}\n >\n Model Abilities\n </label>\n <Box className=\"checkboxWrapper\">\n {SUPPORTED_FEATURES.map((ability) => (\n <Box key={ability} sx={{ marginRight: '10px' }}>\n <FormControlLabel\n control={\n <Checkbox\n checked={formData.model_ability.includes(\n ability.toLowerCase()\n )}\n onChange={() => toggleAbility(ability.toLowerCase())}\n name={ability}\n />\n }\n label={ability}\n style={{\n paddingLeft: 10,\n }}\n />\n </Box>\n ))}\n </Box>\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* family */}\n {(customData.model_family === '' || customData.model_family) && (\n <FormControl>\n <label\n style={{\n paddingLeft: 5,\n color: 'inherit',\n }}\n >\n Model Family\n </label>\n {modelType === 'LLM' && formData.model_family && (\n <Alert\n icon={<CheckIcon fontSize=\"inherit\" />}\n severity=\"success\"\n >\n Please be careful to select the family name corresponding to\n the model you want to register. If not found, please choose\n <i style={{ fontStyle: 'italic', fontWeight: 700 }}> other</i>\n .\n </Alert>\n )}\n {modelType === 'LLM' && !formData.model_family && (\n <Alert severity=\"error\">\n Please be careful to select the family name corresponding to\n the model you want to register. If not found, please choose\n <i style={{ fontStyle: 'italic', fontWeight: 700 }}> other</i>\n .\n </Alert>\n )}\n <RadioGroup\n value={formData.model_family}\n onChange={(e) => {\n toggleFamily(e.target.value)\n }}\n >\n <Box\n className=\"checkboxWrapper\"\n style={{ paddingLeft: '10px' }}\n >\n {modelType === 'LLM' &&\n sortStringsByFirstLetter(getFamilyByAbility()).map((v) => (\n <Box sx={{ width: '20%' }} key={v}>\n <FormControlLabel\n value={v}\n control={<Radio />}\n label={v}\n />\n </Box>\n ))}\n {(modelType === 'image' || modelType === 'audio') && (\n <FormControlLabel\n value={formData.model_family}\n checked\n control={<Radio />}\n label={formData.model_family}\n />\n )}\n </Box>\n </RadioGroup>\n <Box padding=\"15px\"></Box>\n </FormControl>\n )}\n\n {/* specs */}\n {customData.model_specs && (\n <>\n <AddModelSpecs\n isJump={model_name ? true : false}\n formData={customData.model_specs[0]}\n specsDataArr={specsArr}\n onGetArr={getSpecsArr}\n scrollRef={scrollRef}\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* controlnet */}\n {customData.controlnet && (\n <>\n <AddControlnet\n controlnetDataArr={controlnetArr}\n onGetControlnetArr={getControlnetArr}\n scrollRef={scrollRef}\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* launcher */}\n {customData.launcher && (\n <>\n <TextField\n label=\"Launcher\"\n error={formData.launcher ? false : true}\n value={formData.launcher}\n size=\"small\"\n helperText=\"Provide the model launcher.\"\n onChange={(event) =>\n setFormData({ ...formData, launcher: event.target.value })\n }\n />\n <Box padding=\"15px\"></Box>\n </>\n )}\n\n {/* launcher_args */}\n {customData.launcher_args && (\n <>\n <TextField\n label=\"Launcher Arguments (Optional)\"\n value={formData.launcher_args}\n size=\"small\"\n helperText=\"A JSON-formatted dictionary representing the arguments passed to the Launcher.\"\n onChange={(event) => {\n try {\n JSON.parse(event.target.value)\n setIsValidLauncherArgsAlert(false)\n } catch {\n setIsValidLauncherArgsAlert(true)\n }\n return setFormData({\n ...formData,\n launcher_args: event.target.value,\n })\n }}\n multiline\n rows={4}\n />\n {isValidLauncherArgsAlert && (\n <Alert severity=\"error\">\n Please enter the JSON-formatted dictionary.\n </Alert>\n )}\n <Box padding=\"15px\"></Box>\n </>\n )}\n </FormControl>\n\n {model_name ? (\n <>\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n onClick={handleEdit}\n disabled={isEqual}\n >\n Edit\n </Button>\n <Button\n style={{ marginLeft: 30 }}\n variant=\"outlined\"\n color=\"primary\"\n type=\"submit\"\n onClick={handleCancel}\n >\n Cancel\n </Button>\n </>\n ) : (\n <Box width={'100%'}>\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n onClick={handleClick}\n >\n Register Model\n </Button>\n </Box>\n )}\n </div>\n\n {/* JSON */}\n <div className={isShow ? 'jsonBox' : 'jsonBox hide'}>\n <div className=\"jsonBox-header\">\n <div className=\"jsonBox-title\">JSON Format</div>\n <CopyComponent tip={'Copy all'} text={jsonData} />\n </div>\n <textarea readOnly className=\"textarea\" value={jsonData} />\n </div>\n </Box>\n )\n}\n\nexport default RegisterModelComponent\n"],"mappings":"u2BAAA,MAAO,iCAAiC,CAExC,MAAO,CAAAA,SAAS,KAAM,2BAA2B,CACjD,MAAO,CAAAC,4BAA4B,KAAM,8CAA8C,CACvF,MAAO,CAAAC,SAAS,KAAM,2BAA2B,CACjD,OACEC,KAAK,CACLC,GAAG,CACHC,MAAM,CACNC,QAAQ,CACRC,IAAI,CACJC,WAAW,CACXC,gBAAgB,CAChBC,UAAU,CACVC,QAAQ,CACRC,KAAK,CACLC,UAAU,CACVC,MAAM,CACNC,KAAK,CACLC,MAAM,CACNC,SAAS,CACTC,OAAO,KACF,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,UAAU,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AC7B1P,IAAA,QAAK2P,SAAS,CAAC,eAAe,CAAAD,QAAA,CAAC,aAAW,CAAK,CAAC,cAChD1P,IAAA,CAACN,aAAa,EAAC6S,GAAG,CAAE,UAAW,CAACC,IAAI,CAAEpP,QAAS,CAAE,CAAC,EAC/C,CAAC,cACNpD,IAAA,aAAUyS,QAAQ,MAAC9C,SAAS,CAAC,UAAU,CAACzD,KAAK,CAAE9I,QAAS,CAAE,CAAC,EACxD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAxC,sBAAsB","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{useContext,useEffect,useState}from'react';import{Navigate,useRoutes}from'react-router-dom';import{useNavigate}from'react-router-dom';import{ApiContext}from'../components/apiContext';import Layout from'../scenes/_layout';import ClusterInfo from'../scenes/cluster_info';import LaunchModel from'../scenes/launch_model';import Login from'../scenes/login/login';import RegisterModel from'../scenes/register_model';import RunningModels from'../scenes/running_models';import{jsx as _jsx}from\"react/jsx-runtime\";var LoginAuth=function LoginAuth(){var _useState=useState(true),_useState2=_slicedToArray(_useState,2),authority=_useState2[0],setAuthority=_useState2[1];var navigate=useNavigate();var _useContext=useContext(ApiContext),endPoint=_useContext.endPoint;useEffect(function(){fetch(endPoint+'/v1/cluster/auth',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(res.ok){res.json().then(function(data){setAuthority(data.auth);});}});},[]);useEffect(function(){if(!authority)navigate('/launch_model/llm');},[authority]);return/*#__PURE__*/_jsx(Login,{});};var routes=[{path:'/',element:/*#__PURE__*/_jsx(Layout,{}),children:[{path:'/',element:/*#__PURE__*/_jsx(Navigate,{to:\"launch_model/llm\",replace:true})},{path:'launch_model/:Modeltype/:subType?',element:/*#__PURE__*/_jsx(LaunchModel,{})},{path:'running_models/:runningModelType',element:/*#__PURE__*/_jsx(RunningModels,{})},{path:'register_model/:registerModelType/:model_name?',element:/*#__PURE__*/_jsx(RegisterModel,{})},{path:'cluster_info',element:/*#__PURE__*/_jsx(ClusterInfo,{})}]},{path:'/login',element:/*#__PURE__*/_jsx(LoginAuth,{})},{path:'*',element:/*#__PURE__*/_jsx(Navigate,{to:\"launch_model/llm\",replace:true})}];var WraperRoutes=function WraperRoutes(){var element=useRoutes(routes);return element;};export default WraperRoutes;","map":{"version":3,"names":["useContext","useEffect","useState","Navigate","useRoutes","useNavigate","ApiContext","Layout","ClusterInfo","LaunchModel","Login","RegisterModel","RunningModels","jsx","_jsx","LoginAuth","_useState","_useState2","_slicedToArray","authority","setAuthority","navigate","_useContext","endPoint","fetch","method","headers","then","res","ok","json","data","auth","routes","path","element","children","to","replace","WraperRoutes"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/router/index.js"],"sourcesContent":["import { useContext, useEffect, useState } from 'react'\nimport { Navigate, useRoutes } from 'react-router-dom'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../components/apiContext'\nimport Layout from '../scenes/_layout'\nimport ClusterInfo from '../scenes/cluster_info'\nimport LaunchModel from '../scenes/launch_model'\nimport Login from '../scenes/login/login'\nimport RegisterModel from '../scenes/register_model'\nimport RunningModels from '../scenes/running_models'\n\nconst LoginAuth = () => {\n const [authority, setAuthority] = useState(true)\n\n const navigate = useNavigate()\n const { endPoint } = useContext(ApiContext)\n\n useEffect(() => {\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((data) => {\n setAuthority(data.auth)\n })\n }\n })\n }, [])\n\n useEffect(() => {\n if (!authority) navigate('/launch_model/llm')\n }, [authority])\n\n return <Login />\n}\n\nconst routes = [\n {\n path: '/',\n element: <Layout />,\n children: [\n {\n path: '/',\n element: <Navigate to=\"launch_model/llm\" replace />,\n },\n {\n path: 'launch_model/:Modeltype/:subType?',\n element: <LaunchModel />,\n },\n {\n path: 'running_models/:runningModelType',\n element: <RunningModels />,\n },\n {\n path: 'register_model/:registerModelType/:model_name?',\n element: <RegisterModel />,\n },\n {\n path: 'cluster_info',\n element: <ClusterInfo />,\n },\n ],\n },\n {\n path: '/login',\n element: <LoginAuth />,\n },\n {\n path: '*',\n element: <Navigate to=\"launch_model/llm\" replace />,\n },\n]\nconst WraperRoutes = () => {\n let element = useRoutes(routes)\n return element\n}\n\nexport default WraperRoutes\n"],"mappings":"6IAAA,OAASA,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CACvD,OAASC,QAAQ,CAAEC,SAAS,KAAQ,kBAAkB,CACtD,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,0BAA0B,CACrD,MAAO,CAAAC,MAAM,KAAM,mBAAmB,CACtC,MAAO,CAAAC,WAAW,KAAM,wBAAwB,CAChD,MAAO,CAAAC,WAAW,KAAM,wBAAwB,CAChD,MAAO,CAAAC,KAAK,KAAM,uBAAuB,CACzC,MAAO,CAAAC,aAAa,KAAM,0BAA0B,CACpD,MAAO,CAAAC,aAAa,KAAM,0BAA0B,QAAAC,GAAA,IAAAC,IAAA,yBAEpD,GAAM,CAAAC,SAAS,CAAG,QAAZ,CAAAA,SAASA,CAAA,CAAS,CACtB,IAAAC,SAAA,CAAkCd,QAAQ,CAAC,IAAI,CAAC,CAAAe,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAzCG,SAAS,CAAAF,UAAA,IAAEG,YAAY,CAAAH,UAAA,IAE9B,GAAM,CAAAI,QAAQ,CAAGhB,WAAW,CAAC,CAAC,CAC9B,IAAAiB,WAAA,CAAqBtB,UAAU,CAACM,UAAU,CAAC,CAAnCiB,QAAQ,CAAAD,WAAA,CAARC,QAAQ,CAEhBtB,SAAS,CAAC,UAAM,CACduB,KAAK,CAACD,QAAQ,CAAG,kBAAkB,CAAE,CACnCE,MAAM,CAAE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