xinference 0.14.1.post1__py3-none-any.whl → 0.14.3__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (194) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +15 -34
  3. xinference/client/restful/restful_client.py +2 -2
  4. xinference/core/chat_interface.py +45 -10
  5. xinference/core/image_interface.py +9 -0
  6. xinference/core/model.py +8 -5
  7. xinference/core/scheduler.py +1 -2
  8. xinference/core/worker.py +49 -42
  9. xinference/deploy/cmdline.py +2 -2
  10. xinference/deploy/test/test_cmdline.py +7 -7
  11. xinference/model/audio/chattts.py +24 -9
  12. xinference/model/audio/core.py +8 -2
  13. xinference/model/audio/fish_speech.py +228 -0
  14. xinference/model/audio/model_spec.json +8 -0
  15. xinference/model/embedding/core.py +23 -1
  16. xinference/model/image/model_spec.json +2 -1
  17. xinference/model/image/model_spec_modelscope.json +2 -1
  18. xinference/model/image/stable_diffusion/core.py +49 -1
  19. xinference/model/llm/__init__.py +26 -27
  20. xinference/model/llm/{ggml/llamacpp.py → llama_cpp/core.py} +2 -35
  21. xinference/model/llm/llm_family.json +606 -1266
  22. xinference/model/llm/llm_family.py +16 -139
  23. xinference/model/llm/llm_family_modelscope.json +276 -313
  24. xinference/model/llm/lmdeploy/__init__.py +0 -0
  25. xinference/model/llm/lmdeploy/core.py +557 -0
  26. xinference/model/llm/memory.py +9 -9
  27. xinference/model/llm/sglang/core.py +2 -2
  28. xinference/model/llm/{pytorch → transformers}/chatglm.py +6 -13
  29. xinference/model/llm/{pytorch → transformers}/cogvlm2.py +4 -45
  30. xinference/model/llm/transformers/cogvlm2_video.py +524 -0
  31. xinference/model/llm/{pytorch → transformers}/core.py +3 -10
  32. xinference/model/llm/{pytorch → transformers}/glm4v.py +2 -23
  33. xinference/model/llm/transformers/intern_vl.py +540 -0
  34. xinference/model/llm/{pytorch → transformers}/internlm2.py +4 -8
  35. xinference/model/llm/{pytorch → transformers}/minicpmv25.py +2 -23
  36. xinference/model/llm/{pytorch → transformers}/minicpmv26.py +66 -41
  37. xinference/model/llm/{pytorch → transformers}/utils.py +1 -2
  38. xinference/model/llm/{pytorch → transformers}/yi_vl.py +2 -24
  39. xinference/model/llm/utils.py +85 -70
  40. xinference/model/llm/vllm/core.py +110 -11
  41. xinference/model/utils.py +1 -95
  42. xinference/thirdparty/fish_speech/__init__.py +0 -0
  43. xinference/thirdparty/fish_speech/fish_speech/__init__.py +0 -0
  44. xinference/thirdparty/fish_speech/fish_speech/callbacks/__init__.py +3 -0
  45. xinference/thirdparty/fish_speech/fish_speech/callbacks/grad_norm.py +113 -0
  46. xinference/thirdparty/fish_speech/fish_speech/configs/__init__.py +0 -0
  47. xinference/thirdparty/fish_speech/fish_speech/configs/lora/__init__.py +0 -0
  48. xinference/thirdparty/fish_speech/fish_speech/conversation.py +2 -0
  49. xinference/thirdparty/fish_speech/fish_speech/datasets/__init__.py +0 -0
  50. xinference/thirdparty/fish_speech/fish_speech/datasets/concat_repeat.py +53 -0
  51. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/__init__.py +0 -0
  52. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text_data_pb2.py +33 -0
  53. xinference/thirdparty/fish_speech/fish_speech/datasets/protos/text_data_stream.py +36 -0
  54. xinference/thirdparty/fish_speech/fish_speech/datasets/semantic.py +496 -0
  55. xinference/thirdparty/fish_speech/fish_speech/datasets/vqgan.py +147 -0
  56. xinference/thirdparty/fish_speech/fish_speech/i18n/__init__.py +3 -0
  57. xinference/thirdparty/fish_speech/fish_speech/i18n/core.py +40 -0
  58. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/__init__.py +0 -0
  59. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/en_US.json +122 -0
  60. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/es_ES.json +122 -0
  61. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/ja_JP.json +123 -0
  62. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/pt_BR.json +133 -0
  63. xinference/thirdparty/fish_speech/fish_speech/i18n/locale/zh_CN.json +122 -0
  64. xinference/thirdparty/fish_speech/fish_speech/i18n/scan.py +122 -0
  65. xinference/thirdparty/fish_speech/fish_speech/models/__init__.py +0 -0
  66. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/__init__.py +0 -0
  67. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/lit_module.py +202 -0
  68. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/llama.py +779 -0
  69. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/lora.py +92 -0
  70. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/__init__.py +3 -0
  71. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/lit_module.py +442 -0
  72. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/__init__.py +0 -0
  73. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/discriminator.py +44 -0
  74. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/firefly.py +625 -0
  75. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/fsq.py +139 -0
  76. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/reference.py +115 -0
  77. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/modules/wavenet.py +225 -0
  78. xinference/thirdparty/fish_speech/fish_speech/models/vqgan/utils.py +94 -0
  79. xinference/thirdparty/fish_speech/fish_speech/scheduler.py +40 -0
  80. xinference/thirdparty/fish_speech/fish_speech/text/__init__.py +4 -0
  81. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/__init__.py +0 -0
  82. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_class.py +172 -0
  83. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_constant.py +30 -0
  84. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/basic_util.py +342 -0
  85. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/cardinal.py +32 -0
  86. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/date.py +75 -0
  87. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/digit.py +32 -0
  88. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/fraction.py +35 -0
  89. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/money.py +43 -0
  90. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/percentage.py +33 -0
  91. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/telephone.py +51 -0
  92. xinference/thirdparty/fish_speech/fish_speech/text/chn_text_norm/text.py +177 -0
  93. xinference/thirdparty/fish_speech/fish_speech/text/clean.py +69 -0
  94. xinference/thirdparty/fish_speech/fish_speech/text/spliter.py +130 -0
  95. xinference/thirdparty/fish_speech/fish_speech/train.py +139 -0
  96. xinference/thirdparty/fish_speech/fish_speech/utils/__init__.py +23 -0
  97. xinference/thirdparty/fish_speech/fish_speech/utils/braceexpand.py +217 -0
  98. xinference/thirdparty/fish_speech/fish_speech/utils/context.py +13 -0
  99. xinference/thirdparty/fish_speech/fish_speech/utils/file.py +16 -0
  100. xinference/thirdparty/fish_speech/fish_speech/utils/instantiators.py +50 -0
  101. xinference/thirdparty/fish_speech/fish_speech/utils/logger.py +55 -0
  102. xinference/thirdparty/fish_speech/fish_speech/utils/logging_utils.py +48 -0
  103. xinference/thirdparty/fish_speech/fish_speech/utils/rich_utils.py +100 -0
  104. xinference/thirdparty/fish_speech/fish_speech/utils/spectrogram.py +122 -0
  105. xinference/thirdparty/fish_speech/fish_speech/utils/utils.py +114 -0
  106. xinference/thirdparty/fish_speech/fish_speech/webui/__init__.py +0 -0
  107. xinference/thirdparty/fish_speech/fish_speech/webui/launch_utils.py +120 -0
  108. xinference/thirdparty/fish_speech/fish_speech/webui/manage.py +1237 -0
  109. xinference/thirdparty/fish_speech/tools/__init__.py +0 -0
  110. xinference/thirdparty/fish_speech/tools/api.py +495 -0
  111. xinference/thirdparty/fish_speech/tools/auto_rerank.py +159 -0
  112. xinference/thirdparty/fish_speech/tools/download_models.py +55 -0
  113. xinference/thirdparty/fish_speech/tools/extract_model.py +21 -0
  114. xinference/thirdparty/fish_speech/tools/file.py +108 -0
  115. xinference/thirdparty/fish_speech/tools/gen_ref.py +36 -0
  116. xinference/thirdparty/fish_speech/tools/llama/__init__.py +0 -0
  117. xinference/thirdparty/fish_speech/tools/llama/build_dataset.py +169 -0
  118. xinference/thirdparty/fish_speech/tools/llama/eval_in_context.py +171 -0
  119. xinference/thirdparty/fish_speech/tools/llama/generate.py +698 -0
  120. xinference/thirdparty/fish_speech/tools/llama/merge_lora.py +95 -0
  121. xinference/thirdparty/fish_speech/tools/llama/quantize.py +497 -0
  122. xinference/thirdparty/fish_speech/tools/llama/rebuild_tokenizer.py +57 -0
  123. xinference/thirdparty/fish_speech/tools/merge_asr_files.py +55 -0
  124. xinference/thirdparty/fish_speech/tools/post_api.py +164 -0
  125. xinference/thirdparty/fish_speech/tools/sensevoice/__init__.py +0 -0
  126. xinference/thirdparty/fish_speech/tools/sensevoice/auto_model.py +573 -0
  127. xinference/thirdparty/fish_speech/tools/sensevoice/fun_asr.py +332 -0
  128. xinference/thirdparty/fish_speech/tools/sensevoice/vad_utils.py +61 -0
  129. xinference/thirdparty/fish_speech/tools/smart_pad.py +47 -0
  130. xinference/thirdparty/fish_speech/tools/vqgan/__init__.py +0 -0
  131. xinference/thirdparty/fish_speech/tools/vqgan/create_train_split.py +83 -0
  132. xinference/thirdparty/fish_speech/tools/vqgan/extract_vq.py +227 -0
  133. xinference/thirdparty/fish_speech/tools/vqgan/inference.py +120 -0
  134. xinference/thirdparty/fish_speech/tools/webui.py +619 -0
  135. xinference/thirdparty/fish_speech/tools/whisper_asr.py +176 -0
  136. xinference/thirdparty/internvl/__init__.py +0 -0
  137. xinference/thirdparty/internvl/conversation.py +393 -0
  138. xinference/thirdparty/omnilmm/model/utils.py +16 -1
  139. xinference/web/ui/build/asset-manifest.json +3 -3
  140. xinference/web/ui/build/index.html +1 -1
  141. xinference/web/ui/build/static/js/main.661c7b0a.js +3 -0
  142. xinference/web/ui/build/static/js/{main.17ca0398.js.map → main.661c7b0a.js.map} +1 -1
  143. xinference/web/ui/node_modules/.cache/babel-loader/070d8c6b3b0f3485c6d3885f0b6bbfdf9643e088a468acbd5d596f2396071c16.json +1 -0
  144. xinference/web/ui/node_modules/.cache/babel-loader/213b5913e164773c2b0567455377765715f5f07225fbac77ad8e1e9dc9648a47.json +1 -0
  145. xinference/web/ui/node_modules/.cache/babel-loader/4de9a6942c5f1749d6cbfdd54279699975f16016b182848bc253886f52ec2ec3.json +1 -0
  146. xinference/web/ui/node_modules/.cache/babel-loader/5391543180fead1eeef5364300301498d58a7d91d62de3841a32768b67f4552f.json +1 -0
  147. xinference/web/ui/node_modules/.cache/babel-loader/5c26a23b5eacf5b752a08531577ae3840bb247745ef9a39583dc2d05ba93a82a.json +1 -0
  148. xinference/web/ui/node_modules/.cache/babel-loader/714c37ce0ec5b5c591033f02be2f3f491fdd70da3ef568ee4a4f94689a3d5ca2.json +1 -0
  149. xinference/web/ui/node_modules/.cache/babel-loader/822586ed1077201b64b954f12f25e3f9b45678c1acbabe53d8af3ca82ca71f33.json +1 -0
  150. xinference/web/ui/node_modules/.cache/babel-loader/978b57d1a04a701bc3fcfebc511f5f274eed6ed7eade67f6fb76c27d5fd9ecc8.json +1 -0
  151. xinference/web/ui/node_modules/.cache/babel-loader/a797831de0dc74897f4b50b3426555d748f328b4c2cc391de709eadaf6a5f3e3.json +1 -0
  152. xinference/web/ui/node_modules/.cache/babel-loader/bd6ad8159341315a1764c397621a560809f7eb7219ab5174c801fca7e969d943.json +1 -0
  153. xinference/web/ui/node_modules/.cache/babel-loader/e64b7e8cedcf43d4c95deba60ec1341855c887705805bb62431693118b870c69.json +1 -0
  154. xinference/web/ui/node_modules/.cache/babel-loader/e91938976f229ce986b2907e51e1f00540b584ced0a315d498c172d13220739d.json +1 -0
  155. xinference/web/ui/node_modules/.cache/babel-loader/f72f011744c4649fabddca6f7a9327861ac0a315a89b1a2e62a39774e7863845.json +1 -0
  156. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/METADATA +22 -13
  157. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/RECORD +170 -79
  158. xinference/locale/utils.py +0 -39
  159. xinference/locale/zh_CN.json +0 -26
  160. xinference/model/llm/ggml/tools/__init__.py +0 -15
  161. xinference/model/llm/ggml/tools/convert_ggml_to_gguf.py +0 -498
  162. xinference/model/llm/ggml/tools/gguf.py +0 -884
  163. xinference/model/llm/pytorch/__init__.py +0 -13
  164. xinference/model/llm/pytorch/baichuan.py +0 -81
  165. xinference/model/llm/pytorch/falcon.py +0 -138
  166. xinference/model/llm/pytorch/intern_vl.py +0 -352
  167. xinference/model/llm/pytorch/vicuna.py +0 -69
  168. xinference/web/ui/build/static/js/main.17ca0398.js +0 -3
  169. xinference/web/ui/node_modules/.cache/babel-loader/1444c41a4d04494f1cbc2d8c1537df107b451cb569cb2c1fbf5159f3a4841a5f.json +0 -1
  170. xinference/web/ui/node_modules/.cache/babel-loader/2f40209b32e7e46a2eab6b8c8a355eb42c3caa8bc3228dd929f32fd2b3940294.json +0 -1
  171. xinference/web/ui/node_modules/.cache/babel-loader/44774c783428f952d8e2e4ad0998a9c5bc16a57cd9c68b7c5ff18aaa5a41d65c.json +0 -1
  172. xinference/web/ui/node_modules/.cache/babel-loader/5262556baf9207738bf6a8ba141ec6599d0a636345c245d61fdf88d3171998cb.json +0 -1
  173. xinference/web/ui/node_modules/.cache/babel-loader/6450605fac003812485f6251b9f0caafbf2e5bfc3bbe2f000050d9e2fdb8dcd3.json +0 -1
  174. xinference/web/ui/node_modules/.cache/babel-loader/71684495d995c7e266eecc6a0ad8ea0284cc785f80abddf863789c57a6134969.json +0 -1
  175. xinference/web/ui/node_modules/.cache/babel-loader/80acd1edf31542ab1dcccfad02cb4b38f3325cff847a781fcce97500cfd6f878.json +0 -1
  176. xinference/web/ui/node_modules/.cache/babel-loader/8a9742ddd8ba8546ef42dc14caca443f2b4524fabed7bf269e0eff3b7b64ee7d.json +0 -1
  177. xinference/web/ui/node_modules/.cache/babel-loader/d06a96a3c9c32e42689094aa3aaad41c8125894e956b8f84a70fadce6e3f65b3.json +0 -1
  178. xinference/web/ui/node_modules/.cache/babel-loader/d93730e2b5d7e8c957b4d0965d2ed1dac9045a649adbd47c220d11f255d4b1e0.json +0 -1
  179. xinference/web/ui/node_modules/.cache/babel-loader/e656dc00b4d8b387f0a81ba8fc558767df1601c66369e2eb86a5ef27cf080572.json +0 -1
  180. xinference/web/ui/node_modules/.cache/babel-loader/f28b83886159d83b84f099b05d607a822dca4dd7f2d8aa6d56fe08bab0b5b086.json +0 -1
  181. xinference/web/ui/node_modules/.cache/babel-loader/f3e02274cb1964e99b1fe69cbb6db233d3d8d7dd05d50ebcdb8e66d50b224b7b.json +0 -1
  182. /xinference/{locale → model/llm/llama_cpp}/__init__.py +0 -0
  183. /xinference/model/llm/{ggml → transformers}/__init__.py +0 -0
  184. /xinference/model/llm/{pytorch → transformers}/compression.py +0 -0
  185. /xinference/model/llm/{pytorch → transformers}/deepseek_vl.py +0 -0
  186. /xinference/model/llm/{pytorch → transformers}/llama_2.py +0 -0
  187. /xinference/model/llm/{pytorch → transformers}/omnilmm.py +0 -0
  188. /xinference/model/llm/{pytorch → transformers}/qwen_vl.py +0 -0
  189. /xinference/model/llm/{pytorch → transformers}/tensorizer_utils.py +0 -0
  190. /xinference/web/ui/build/static/js/{main.17ca0398.js.LICENSE.txt → main.661c7b0a.js.LICENSE.txt} +0 -0
  191. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/LICENSE +0 -0
  192. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/WHEEL +0 -0
  193. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/entry_points.txt +0 -0
  194. {xinference-0.14.1.post1.dist-info → xinference-0.14.3.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import ExitToAppIcon from'@mui/icons-material/ExitToApp';import{Box,Stack,Typography}from'@mui/material';import Button from'@mui/material/Button';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{isValidBearerToken}from'./utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Title=function Title(_ref){var title=_ref.title;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],removeCookie=_useCookies2[2];var navigate=useNavigate();var handleLogout=function handleLogout(){removeCookie('token',{path:'/'});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,C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EV,CAAC,CAED,cAAe,CAAAf,KAAK","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
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'./styles/modelCardStyle.css';import{ChatOutlined,Close,Delete,EditNote,EditNoteOutlined,ExpandLess,ExpandMore,Grade,HelpCenterOutlined,RocketLaunchOutlined,StarBorder,UndoOutlined}from'@mui/icons-material';import{Alert,Backdrop,Box,Button,Chip,CircularProgress,Collapse,Drawer,FormControl,Grid,IconButton,InputLabel,ListItemButton,ListItemText,MenuItem,Paper,Select,Snackbar,Stack,Table,TableBody,TableCell,TableContainer,TableHead,TablePagination,TableRow,TextField,Tooltip}from'@mui/material';import{styled}from'@mui/material/styles';import React,{useContext,useEffect,useRef,useState}from'react';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import CopyComponent from'../../components/copyComponent/copyComponent';import DeleteDialog from'../../components/deleteDialog';import fetchWrapper from'../../components/fetchWrapper';import TitleTypography from'../../components/titleTypography';import AddPair from'./components/addPair';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 llmAllDataKey=['model_uid','model_name','model_type','model_engine','model_format','model_size_in_billions','quantization','n_gpu','n_gpu_layers','replica','request_limits','worker_ip','gpu_idx','download_hub','model_path','peft_model_config'];var csghubArr=['qwen2-instruct'];var ModelCard=function ModelCard(_ref){var _JSON$parse,_JSON$parse2;var url=_ref.url,modelData=_ref.modelData,gpuAvailable=_ref.gpuAvailable,modelType=_ref.modelType,_ref$is_custom=_ref.is_custom,is_custom=_ref$is_custom===void 0?false:_ref$is_custom,onHandleCompleteDelete=_ref.onHandleCompleteDelete,onHandlecustomDelete=_ref.onHandlecustomDelete,onGetCollectionArr=_ref.onGetCollectionArr;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),hover=_useState2[0],setHover=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),selected=_useState4[0],setSelected=_useState4[1];var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),requestLimitsAlert=_useState6[0],setRequestLimitsAlert=_useState6[1];var _useState7=useState(false),_useState8=_slicedToArray(_useState7,2),GPUIdxAlert=_useState8[0],setGPUIdxAlert=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isOther=_useState10[0],setIsOther=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isPeftModelConfig=_useState12[0],setIsPeftModelConfig=_useState12[1];var _useState13=useState(false),_useState14=_slicedToArray(_useState13,2),openSnackbar=_useState14[0],setOpenSnackbar=_useState14[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var navigate=useNavigate();// Model parameter selections\nvar _useState15=useState(''),_useState16=_slicedToArray(_useState15,2),modelUID=_useState16[0],setModelUID=_useState16[1];var _useState17=useState(''),_useState18=_slicedToArray(_useState17,2),modelEngine=_useState18[0],setModelEngine=_useState18[1];var _useState19=useState(''),_useState20=_slicedToArray(_useState19,2),modelFormat=_useState20[0],setModelFormat=_useState20[1];var _useState21=useState(''),_useState22=_slicedToArray(_useState21,2),modelSize=_useState22[0],setModelSize=_useState22[1];var _useState23=useState(''),_useState24=_slicedToArray(_useState23,2),quantization=_useState24[0],setQuantization=_useState24[1];var _useState25=useState('auto'),_useState26=_slicedToArray(_useState25,2),nGPU=_useState26[0],setNGPU=_useState26[1];var _useState27=useState(gpuAvailable===0?'CPU':'GPU'),_useState28=_slicedToArray(_useState27,2),nGpu=_useState28[0],setNGpu=_useState28[1];var _useState29=useState(-1),_useState30=_slicedToArray(_useState29,2),nGPULayers=_useState30[0],setNGPULayers=_useState30[1];var _useState31=useState(1),_useState32=_slicedToArray(_useState31,2),replica=_useState32[0],setReplica=_useState32[1];var _useState33=useState(''),_useState34=_slicedToArray(_useState33,2),requestLimits=_useState34[0],setRequestLimits=_useState34[1];var _useState35=useState(''),_useState36=_slicedToArray(_useState35,2),workerIp=_useState36[0],setWorkerIp=_useState36[1];var _useState37=useState(''),_useState38=_slicedToArray(_useState37,2),GPUIdx=_useState38[0],setGPUIdx=_useState38[1];var _useState39=useState(''),_useState40=_slicedToArray(_useState39,2),downloadHub=_useState40[0],setDownloadHub=_useState40[1];var _useState41=useState(''),_useState42=_slicedToArray(_useState41,2),modelPath=_useState42[0],setModelPath=_useState42[1];var _useState43=useState({}),_useState44=_slicedToArray(_useState43,2),enginesObj=_useState44[0],setEnginesObj=_useState44[1];var _useState45=useState([]),_useState46=_slicedToArray(_useState45,2),engineOptions=_useState46[0],setEngineOptions=_useState46[1];var _useState47=useState([]),_useState48=_slicedToArray(_useState47,2),formatOptions=_useState48[0],setFormatOptions=_useState48[1];var _useState49=useState([]),_useState50=_slicedToArray(_useState49,2),sizeOptions=_useState50[0],setSizeOptions=_useState50[1];var _useState51=useState([]),_useState52=_slicedToArray(_useState51,2),quantizationOptions=_useState52[0],setQuantizationOptions=_useState52[1];var _useState53=useState(false),_useState54=_slicedToArray(_useState53,2),customDeleted=_useState54[0],setCustomDeleted=_useState54[1];var _useState55=useState([]),_useState56=_slicedToArray(_useState55,2),customParametersArr=_useState56[0],setCustomParametersArr=_useState56[1];var _useState57=useState([]),_useState58=_slicedToArray(_useState57,2),loraListArr=_useState58[0],setLoraListArr=_useState58[1];var _useState59=useState([]),_useState60=_slicedToArray(_useState59,2),imageLoraLoadKwargsArr=_useState60[0],setImageLoraLoadKwargsArr=_useState60[1];var _useState61=useState([]),_useState62=_slicedToArray(_useState61,2),imageLoraFuseKwargsArr=_useState62[0],setImageLoraFuseKwargsArr=_useState62[1];var _useState63=useState(false),_useState64=_slicedToArray(_useState63,2),isOpenCachedList=_useState64[0],setIsOpenCachedList=_useState64[1];var _useState65=useState(false),_useState66=_slicedToArray(_useState65,2),isDeleteCached=_useState66[0],setIsDeleteCached=_useState66[1];var _useState67=useState([]),_useState68=_slicedToArray(_useState67,2),cachedListArr=_useState68[0],setCachedListArr=_useState68[1];var _useState69=useState(''),_useState70=_slicedToArray(_useState69,2),cachedModelVersion=_useState70[0],setCachedModelVersion=_useState70[1];var _useState71=useState(''),_useState72=_slicedToArray(_useState71,2),cachedRealPath=_useState72[0],setCachedRealPath=_useState72[1];var _useState73=useState(0),_useState74=_slicedToArray(_useState73,2),page=_useState74[0],setPage=_useState74[1];var _useState75=useState(false),_useState76=_slicedToArray(_useState75,2),isDeleteCustomModel=_useState76[0],setIsDeleteCustomModel=_useState76[1];var _useState77=useState(false),_useState78=_slicedToArray(_useState77,2),isJsonShow=_useState78[0],setIsJsonShow=_useState78[1];var _useState79=useState(false),_useState80=_slicedToArray(_useState79,2),isHistory=_useState80[0],setIsHistory=_useState80[1];var _useState81=useState([]),_useState82=_slicedToArray(_useState81,2),customArr=_useState82[0],setCustomArr=_useState82[1];var _useState83=useState([]),_useState84=_slicedToArray(_useState83,2),loraArr=_useState84[0],setLoraArr=_useState84[1];var _useState85=useState([]),_useState86=_slicedToArray(_useState85,2),imageLoraLoadArr=_useState86[0],setImageLoraLoadArr=_useState86[1];var _useState87=useState([]),_useState88=_slicedToArray(_useState87,2),imageLoraFuseArr=_useState88[0],setImageLoraFuseArr=_useState88[1];var _useState89=useState(0),_useState90=_slicedToArray(_useState89,2),customParametersArrLength=_useState90[0],setCustomParametersArrLength=_useState90[1];var parentRef=useRef(null);var range=function range(start,end){return new Array(end-start+1).fill(undefined).map(function(_,i){return i+start;});};var isCached=function isCached(spec){if(Array.isArray(spec.cache_status)){return spec.cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}};// model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\nvar convertModelSize=function convertModelSize(size){return size.toString().includes('_')?size:parseInt(size,10);};useEffect(function(){var keyArr=[];for(var key in enginesObj){keyArr.push(key);}if(keyArr.length){handleLlmHistory();}},[enginesObj]);useEffect(function(){if(modelEngine){var format=_toConsumableArray(new Set(enginesObj[modelEngine].map(function(item){return item.model_format;})));setFormatOptions(format);if(!isHistory||!format.includes(modelFormat)){setModelFormat('');}if(format.length===1){setModelFormat(format[0]);}}},[modelEngine]);useEffect(function(){if(modelEngine&&modelFormat){var sizes=_toConsumableArray(new Set(enginesObj[modelEngine].filter(function(item){return item.model_format===modelFormat;}).map(function(item){return item.model_size_in_billions;})));setSizeOptions(sizes);if(!isHistory||sizeOptions.length&&JSON.stringify(sizes)!==JSON.stringify(sizeOptions)){setModelSize('');}if(sizes.length===1){setModelSize(sizes[0]);}}},[modelEngine,modelFormat]);useEffect(function(){if(modelEngine&&modelFormat&&modelSize){var quants=_toConsumableArray(new Set(enginesObj[modelEngine].filter(function(item){return item.model_format===modelFormat&&item.model_size_in_billions===convertModelSize(modelSize);}).flatMap(function(item){return item.quantizations;})));setQuantizationOptions(quants);if(!isHistory||!quants.includes(quantization)){setQuantization('');}if(quants.length===1){setQuantization(quants[0]);}}},[modelEngine,modelFormat,modelSize]);useEffect(function(){setCustomParametersArrLength(customParametersArr.length);if(parentRef.current&&customParametersArr.length>customParametersArrLength){parentRef.current.scrollTo({top:parentRef.current.scrollHeight,behavior:'smooth'});}},[customParametersArr]);var getNGPURange=function getNGPURange(){if(gpuAvailable===0){// remain 'auto' for distributed situation\nreturn['auto','CPU'];}return['auto','CPU'].concat(range(1,gpuAvailable));};var getNewNGPURange=function getNewNGPURange(){if(gpuAvailable===0){return['CPU'];}else{return['GPU','CPU'];}};var getModelEngine=function getModelEngine(model_name){fetchWrapper.get(\"/v1/engines/\".concat(model_name)).then(function(data){setEnginesObj(data);setEngineOptions(Object.keys(data));setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403){setErrorMsg(error.message);}setIsCallingApi(false);});};var launchModel=function launchModel(){var _String,_String2;if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);var modelDataWithID_LLM={// If user does not fill model_uid, pass null (None) to server and server generates it.\nmodel_uid:(modelUID===null||modelUID===void 0?void 0:modelUID.trim())===''?null:modelUID===null||modelUID===void 0?void 0:modelUID.trim(),model_name:modelData.model_name,model_type:modelType,model_engine:modelEngine,model_format:modelFormat,model_size_in_billions:convertModelSize(modelSize),quantization:quantization,n_gpu:parseInt(nGPU,10)===0||nGPU==='CPU'?null:nGPU==='auto'?'auto':parseInt(nGPU,10),replica:replica,request_limits:((_String=String(requestLimits))===null||_String===void 0?void 0:_String.trim())===''?null:Number((_String2=String(requestLimits))===null||_String2===void 0?void 0:_String2.trim()),worker_ip:(workerIp===null||workerIp===void 0?void 0:workerIp.trim())===''?null:workerIp===null||workerIp===void 0?void 0:workerIp.trim(),gpu_idx:(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim())===''?null:handleGPUIdx(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim()),download_hub:downloadHub===''?null:downloadHub,model_path:(modelPath===null||modelPath===void 0?void 0:modelPath.trim())===''?null:modelPath===null||modelPath===void 0?void 0:modelPath.trim()};var modelDataWithID_other={model_uid:(modelUID===null||modelUID===void 0?void 0:modelUID.trim())===''?null:modelUID===null||modelUID===void 0?void 0:modelUID.trim(),model_name:modelData.model_name,model_type:modelType,replica:replica,n_gpu:nGpu==='GPU'?'auto':null,worker_ip:(workerIp===null||workerIp===void 0?void 0:workerIp.trim())===''?null:workerIp.trim(),gpu_idx:(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim())===''?null:handleGPUIdx(GPUIdx===null||GPUIdx===void 0?void 0:GPUIdx.trim()),download_hub:downloadHub===''?null:downloadHub,model_path:(modelPath===null||modelPath===void 0?void 0:modelPath.trim())===''?null:modelPath===null||modelPath===void 0?void 0:modelPath.trim()};if(nGPULayers>=0){modelDataWithID_LLM.n_gpu_layers=nGPULayers;}if(loraListArr.length||imageLoraLoadKwargsArr.length||imageLoraFuseKwargsArr.length){var peft_model_config={};if(imageLoraLoadKwargsArr.length){var image_lora_load_kwargs={};imageLoraLoadKwargsArr.forEach(function(item){image_lora_load_kwargs[item.key]=handleValueType(item.value);});peft_model_config['image_lora_load_kwargs']=image_lora_load_kwargs;}if(imageLoraFuseKwargsArr.length){var image_lora_fuse_kwargs={};imageLoraFuseKwargsArr.forEach(function(item){image_lora_fuse_kwargs[item.key]=handleValueType(item.value);});peft_model_config['image_lora_fuse_kwargs']=image_lora_fuse_kwargs;}if(loraListArr.length){var lora_list=loraListArr;lora_list.map(function(item){delete item.id;});peft_model_config['lora_list']=lora_list;}modelDataWithID_LLM['peft_model_config']=peft_model_config;}if(customParametersArr.length){customParametersArr.forEach(function(item){modelDataWithID_LLM[item.key]=handleValueType(item.value);});}var modelDataWithID=modelType==='LLM'?modelDataWithID_LLM:modelDataWithID_other;// First fetcher request to initiate the model\nfetchWrapper.post('/v1/models',modelDataWithID).then(function(){navigate(\"/running_models/\".concat(modelType));sessionStorage.setItem('runningModelType',\"/running_models/\".concat(modelType));var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];if(!historyArr.some(function(item){return deepEqual(item,modelDataWithID);})){historyArr=historyArr.filter(function(item){return item.model_name!==modelDataWithID.model_name;});historyArr.push(modelDataWithID);}localStorage.setItem('historyArr',JSON.stringify(historyArr));setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403){setErrorMsg(error.message);}setIsCallingApi(false);});};var handleGPUIdx=function handleGPUIdx(data){var arr=[];data.split(',').forEach(function(item){arr.push(Number(item));});return arr;};var handeCustomDelete=function handeCustomDelete(e){e.stopPropagation();var subType=sessionStorage.getItem('subType').split('/');if(subType){subType[3];fetchWrapper.delete(\"/v1/model_registrations/\".concat(subType[3]==='llm'?'LLM':subType[3],\"/\").concat(modelData.model_name)).then(function(){setCustomDeleted(true);onHandlecustomDelete(modelData.model_name);setIsDeleteCustomModel(false);}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});}};var judgeArr=function judgeArr(arr,keysArr){if(arr.length&&arr[arr.length-1][keysArr[0]]!==''&&arr[arr.length-1][keysArr[1]]!==''){return true;}else if(arr.length===0){return true;}else{return false;}};var handleValueType=function handleValueType(str){str=String(str);if(str.toLowerCase()==='none'){return null;}else if(str.toLowerCase()==='true'){return true;}else if(str.toLowerCase()==='false'){return false;}else if(Number(str)||str!==''&&Number(str)===0){return Number(str);}else{return str;}};var StyledTableRow=styled(TableRow)(function(_ref2){var theme=_ref2.theme;return{'&:nth-of-type(odd)':{backgroundColor:theme.palette.action.hover}};});var emptyRows=page>=0?Math.max(0,(1+page)*5-cachedListArr.length):0;var handleChangePage=function handleChangePage(_,newPage){setPage(newPage);};var handleOpenCachedList=function handleOpenCachedList(){setIsOpenCachedList(true);getCachedList();document.body.style.overflow='hidden';};var handleCloseCachedList=function handleCloseCachedList(){document.body.style.overflow='auto';setHover(false);setIsOpenCachedList(false);if(cachedListArr.length===0){onHandleCompleteDelete(modelData.model_name);}};var getCachedList=function getCachedList(){fetchWrapper.get(\"/v1/cache/models?model_name=\".concat(modelData.model_name)).then(function(data){return setCachedListArr(data.list);}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});};var handleOpenDeleteCachedDialog=function handleOpenDeleteCachedDialog(real_path,model_version){setCachedRealPath(real_path);setCachedModelVersion(model_version);setIsDeleteCached(true);};var handleDeleteCached=function handleDeleteCached(){fetchWrapper.delete(\"/v1/cache/models?model_version=\".concat(cachedModelVersion)).then(function(){var cachedArr=cachedListArr.filter(function(item){return item.real_path!==cachedRealPath;});setCachedListArr(cachedArr);setIsDeleteCached(false);if(cachedArr.length){if((page+1)*5>=cachedListArr.length&&cachedArr.length%5===0){setPage(cachedArr.length/5-1);}}}).catch(function(error){console.error(error);if(error.response.status!==403){setErrorMsg(error.message);}});};var handleJsonDataPresentation=function handleJsonDataPresentation(){var arr=sessionStorage.getItem('subType').split('/');sessionStorage.setItem('registerModelType',\"/register_model/\".concat(arr[arr.length-1]));sessionStorage.setItem('customJsonData',JSON.stringify(modelData));navigate(\"/register_model/\".concat(arr[arr.length-1],\"/\").concat(modelData.model_name));};var handleGetHistory=function handleGetHistory(){var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];return historyArr.filter(function(item){return item.model_name===modelData.model_name;});};var handleLlmHistory=function handleLlmHistory(){var arr=handleGetHistory();if(arr.length){var _peft_model_config$lo;var _arr$=arr[0],model_engine=_arr$.model_engine,model_format=_arr$.model_format,model_size_in_billions=_arr$.model_size_in_billions,_quantization=_arr$.quantization,n_gpu=_arr$.n_gpu,n_gpu_layers=_arr$.n_gpu_layers,_replica=_arr$.replica,model_uid=_arr$.model_uid,request_limits=_arr$.request_limits,worker_ip=_arr$.worker_ip,gpu_idx=_arr$.gpu_idx,download_hub=_arr$.download_hub,model_path=_arr$.model_path,peft_model_config=_arr$.peft_model_config;if(!engineOptions.includes(model_engine)){setModelEngine('');}else{setModelEngine(model_engine||'');}setModelFormat(model_format||'');setModelSize(String(model_size_in_billions)||'');setQuantization(_quantization||'');setNGPU(n_gpu||'auto');if(n_gpu_layers>=0){setNGPULayers(n_gpu_layers);}else{setNGPULayers(-1);}setReplica(_replica||1);setModelUID(model_uid||'');setRequestLimits(request_limits||'');setWorkerIp(worker_ip||'');setGPUIdx((gpu_idx===null||gpu_idx===void 0?void 0:gpu_idx.join(','))||'');setDownloadHub(download_hub||'');setModelPath(model_path||'');var loraData=[];peft_model_config===null||peft_model_config===void 0?void 0:(_peft_model_config$lo=peft_model_config.lora_list)===null||_peft_model_config$lo===void 0?void 0:_peft_model_config$lo.forEach(function(item){loraData.push({lora_name:item.lora_name,local_path:item.local_path});});setLoraArr(loraData);var ImageLoraLoadData=[];for(var key in peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_load_kwargs){ImageLoraLoadData.push({key:key,value:peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_load_kwargs[key]});}setImageLoraLoadArr(ImageLoraLoadData);var ImageLoraFuseData=[];for(var _key in peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_fuse_kwargs){ImageLoraFuseData.push({key:_key,value:peft_model_config===null||peft_model_config===void 0?void 0:peft_model_config.image_lora_fuse_kwargs[_key]});}setImageLoraFuseArr(ImageLoraFuseData);var customData=[];for(var _key2 in arr[0]){!llmAllDataKey.includes(_key2)&&customData.push({key:_key2,value:arr[0][_key2]});}setCustomArr(customData);if(model_uid||request_limits||worker_ip||gpu_idx!==null&&gpu_idx!==void 0&&gpu_idx.join(',')||download_hub||model_path)setIsOther(true);if(loraData.length||ImageLoraLoadData.length||ImageLoraFuseData.length){setIsOther(true);setIsPeftModelConfig(true);}}};var handleOtherHistory=function handleOtherHistory(){var arr=handleGetHistory();if(arr.length){setModelUID(arr[0].model_uid||'');setReplica(arr[0].replica||1);setNGpu(arr[0].n_gpu==='auto'?'GPU':'CPU');setGPUIdx(arr[0].gpu_idx||'');setWorkerIp(arr[0].worker_ip||'');setDownloadHub(arr[0].download_hub);setModelPath(arr[0].model_path||'');}};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;};var handleCollection=function handleCollection(bool){setHover(false);var collectionArr=JSON.parse(localStorage.getItem('collectionArr'))||[];if(bool){collectionArr.push(modelData.model_name);}else{collectionArr=collectionArr.filter(function(item){return item!==modelData.model_name;});}localStorage.setItem('collectionArr',JSON.stringify(collectionArr));onGetCollectionArr(collectionArr);};var handleDeleteChip=function handleDeleteChip(){var arr=JSON.parse(localStorage.getItem('historyArr'));var newArr=arr.filter(function(item){return item.model_name!==modelData.model_name;});localStorage.setItem('historyArr',JSON.stringify(newArr));setIsHistory(false);if(modelType==='LLM'){setModelEngine('');setModelFormat('');setModelSize('');setQuantization('');setNGPU('auto');setReplica(1);setModelUID('');setRequestLimits('');setWorkerIp('');setGPUIdx('');setDownloadHub('');setModelPath('');setLoraArr([]);setImageLoraLoadArr([]);setImageLoraFuseArr([]);setCustomArr([]);setIsOther(false);setIsPeftModelConfig(false);}else{setModelUID('');setReplica(1);setNGpu(gpuAvailable===0?'CPU':'GPU');setGPUIdx('');setWorkerIp('');setDownloadHub('');setModelPath('');}};// Set two different states based on mouse hover\nreturn/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Paper,{id:modelData.model_name,className:\"container\",onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);},onClick:function onClick(){if(!selected&&!customDeleted){var arr=handleGetHistory();if(arr.length)setIsHistory(true);setSelected(true);if(modelType==='LLM'){getModelEngine(modelData.model_name);}else{handleOtherHistory();}}},elevation:hover?24:4,children:modelType==='LLM'?/*#__PURE__*/_jsxs(Box,{className:\"descriptionCard\",children:[is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconButtonBox\",children:[/*#__PURE__*/_jsx(Tooltip,{title:'Edit',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"show\",onClick:function onClick(e){e.stopPropagation();setIsJsonShow(true);},children:/*#__PURE__*/_jsx(EditNote,{})})}),/*#__PURE__*/_jsx(Tooltip,{title:'delete',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(e){e.stopPropagation();setIsDeleteCustomModel(true);},children:/*#__PURE__*/_jsx(Delete,{})})})]})]}),!is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(\"div\",{className:\"iconButtonBox\",children:(_JSON$parse=JSON.parse(localStorage.getItem('collectionArr')))!==null&&_JSON$parse!==void 0&&_JSON$parse.includes(modelData.model_name)?/*#__PURE__*/_jsx(Tooltip,{title:'Unfavorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"collection\",onClick:function onClick(e){e.stopPropagation();handleCollection(false);},children:/*#__PURE__*/_jsx(Grade,{style:{color:'rgb(255, 206, 0)'}})})}):/*#__PURE__*/_jsx(Tooltip,{title:'Favorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"cancellation-of-collections\",onClick:function onClick(e){e.stopPropagation();handleCollection(true);},children:/*#__PURE__*/_jsx(StarBorder,{})})})})]}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[modelData.model_lang&&function(){return modelData.model_lang.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"},v);});}(),function(){if(modelData.model_specs&&modelData.model_specs.some(function(spec){return isCached(spec);})){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\",deleteIcon:/*#__PURE__*/_jsx(EditNote,{}),onDelete:handleOpenCachedList});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{className:\"p\",title:modelData.model_description,children:modelData.model_description}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconRow\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsxs(\"span\",{className:\"boldIconText\",children:[Math.floor(modelData.context_length/1000),\"K\"]}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"context length\"})]}),function(){if(modelData.model_ability&&modelData.model_ability.includes('chat')){return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(ChatOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"chat model\"})]});}else if(modelData.model_ability&&modelData.model_ability.includes('generate')){return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(EditNoteOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"generate model\"})]});}else{return/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(HelpCenterOutlined,{className:\"muiIcon\"}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"other model\"})]});}}()]})]}):/*#__PURE__*/_jsxs(Box,{className:\"descriptionCard\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"titleContainer\",children:[is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconButtonBox\",children:[/*#__PURE__*/_jsx(Tooltip,{title:'Edit',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"show\",onClick:function onClick(e){e.stopPropagation();setIsJsonShow(true);},children:/*#__PURE__*/_jsx(EditNote,{})})}),/*#__PURE__*/_jsx(Tooltip,{title:'delete',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:function onClick(e){e.stopPropagation();setIsDeleteCustomModel(true);},disabled:customDeleted,children:/*#__PURE__*/_jsx(Delete,{})})})]})]}),!is_custom&&/*#__PURE__*/_jsxs(\"div\",{className:\"cardTitle\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),/*#__PURE__*/_jsx(\"div\",{className:\"iconButtonBox\",children:(_JSON$parse2=JSON.parse(localStorage.getItem('collectionArr')))!==null&&_JSON$parse2!==void 0&&_JSON$parse2.includes(modelData.model_name)?/*#__PURE__*/_jsx(Tooltip,{title:'Unfavorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"collection\",onClick:function onClick(e){e.stopPropagation();handleCollection(false);},children:/*#__PURE__*/_jsx(Grade,{style:{color:'rgb(255, 206, 0)'}})})}):/*#__PURE__*/_jsx(Tooltip,{title:'Favorite',placement:\"top\",children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"cancellation-of-collections\",onClick:function onClick(e){e.stopPropagation();handleCollection(true);},children:/*#__PURE__*/_jsx(StarBorder,{})})})})]}),/*#__PURE__*/_jsxs(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[function(){if(modelData.language){return modelData.language.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"});});}else if(modelData.model_family){return/*#__PURE__*/_jsx(Chip,{label:modelData.model_family,variant:\"outlined\",size:\"small\"});}}(),function(){if(modelData.cache_status){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\",deleteIcon:/*#__PURE__*/_jsx(EditNote,{}),onDelete:handleOpenCachedList});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),modelData.model_description&&/*#__PURE__*/_jsx(\"p\",{className:\"p\",title:modelData.model_description,children:modelData.model_description})]}),modelData.dimensions&&/*#__PURE__*/_jsxs(\"div\",{className:\"iconRow\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"boldIconText\",children:modelData.dimensions}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"dimensions\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"iconItem\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"boldIconText\",children:modelData.max_tokens}),/*#__PURE__*/_jsx(\"small\",{className:\"smallText\",children:\"max tokens\"})]})]}),!selected&&hover&&/*#__PURE__*/_jsx(\"p\",{className:\"instructionText\",children:\"Click with mouse to launch the model\"})]})}),/*#__PURE__*/_jsx(DeleteDialog,{text:'Are you sure to delete this custom model? This behavior is irreversible.',isDelete:isDeleteCustomModel,onHandleIsDelete:function onHandleIsDelete(){return setIsDeleteCustomModel(false);},onHandleDelete:handeCustomDelete}),/*#__PURE__*/_jsx(Drawer,{open:selected,onClose:function onClose(){setSelected(false);setHover(false);},anchor:'right',children:/*#__PURE__*/_jsxs(\"div\",{className:\"drawerCard\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),isHistory&&/*#__PURE__*/_jsx(Chip,{label:\"Last Config\",variant:\"outlined\",size:\"small\",color:\"primary\",onDelete:handleDeleteChip})]}),modelType==='LLM'?/*#__PURE__*/_jsx(Box,{ref:parentRef,className:\"formContainer\",display:\"flex\",flexDirection:\"column\",width:\"100%\",mx:\"auto\",children:/*#__PURE__*/_jsxs(Grid,{rowSpacing:0,columnSpacing:1,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelEngine-label\",children:\"Model Engine\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelEngine-label\",value:modelEngine,onChange:function onChange(e){return setModelEngine(e.target.value);},label:\"Model Engine\",children:engineOptions.map(function(engine){var subArr=[];enginesObj[engine].forEach(function(item){subArr.push(item.model_format);});var arr=_toConsumableArray(new Set(subArr));var specs=modelData.model_specs.filter(function(spec){return arr.includes(spec.model_format);});var cached=specs.some(function(spec){return isCached(spec);});var displayedEngine=cached?engine+' (cached)':engine;return/*#__PURE__*/_jsx(MenuItem,{value:engine,children:displayedEngine},engine);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelEngine,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelFormat-label\",children:\"Model Format\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelFormat-label\",value:modelFormat,onChange:function onChange(e){return setModelFormat(e.target.value);},label:\"Model Format\",children:formatOptions.map(function(format){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===format;});var cached=specs.some(function(spec){return isCached(spec);});var displayedFormat=cached?format+' (cached)':format;return/*#__PURE__*/_jsx(MenuItem,{value:format,children:displayedFormat},format);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelSize-label\",children:\"Model Size\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelSize-label\",value:modelSize,onChange:function onChange(e){return setModelSize(e.target.value);},label:\"Model Size\",children:sizeOptions.map(function(size){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===size;});var cached=specs.some(function(spec){return isCached(spec);});var displayedSize=cached?size+' (cached)':size;return/*#__PURE__*/_jsx(MenuItem,{value:size,children:displayedSize},size);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"Quantization\"}),/*#__PURE__*/_jsx(Select,{labelId:\"quantization-label\",value:quantization,onChange:function onChange(e){return setQuantization(e.target.value);},label:\"Quantization\",children:quantizationOptions.map(function(quant){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===convertModelSize(modelSize);});var spec=specs.find(function(s){return s.quantizations.includes(quant);});var cached=Array.isArray(spec===null||spec===void 0?void 0:spec.cache_status)?spec===null||spec===void 0?void 0:spec.cache_status[spec===null||spec===void 0?void 0:spec.quantizations.indexOf(quant)]:spec===null||spec===void 0?void 0:spec.cache_status;var displayedQuant=cached?quant+' (cached)':quant;return/*#__PURE__*/_jsx(MenuItem,{value:quant,children:displayedQuant},quant);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:modelFormat!=='ggufv2'&&modelFormat!=='ggmlv3'?/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize||!quantization,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"N-GPU\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGPU,onChange:function onChange(e){return setNGPU(e.target.value);},label:\"N-GPU\",children:getNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}):/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",label:\"N GPU Layers\",InputProps:{inputProps:{min:-1}},value:nGPULayers,onChange:function onChange(e){return setNGPULayers(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{disabled:!modelFormat||!modelSize||!quantization,type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}})})}),/*#__PURE__*/_jsx(ListItemButton,{onClick:function onClick(){return setIsOther(!isOther);},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Optional Configurations\",style:{marginRight:10}}),isOther?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]})}),/*#__PURE__*/_jsxs(Collapse,{in:isOther,timeout:\"auto\",unmountOnExit:true,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:requestLimits,label:\"(Optional) Request Limits, the number of request limits for this model\\uFF0Cdefault is None\",onChange:function onChange(e){setRequestLimitsAlert(false);setRequestLimits(e.target.value);if(e.target.value!==''&&(!Number(e.target.value)||Number(e.target.value)<1||parseInt(e.target.value)!==parseFloat(e.target.value))){setRequestLimitsAlert(true);}}}),requestLimitsAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter an integer greater than 0\"})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"(Optional) GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"(Optional) Download_hub\"}),/*#__PURE__*/_jsx(Select,{labelId:\"download_hub-label\",value:downloadHub,onChange:function onChange(e){e.target.value==='none'?setDownloadHub(''):setDownloadHub(e.target.value);},label:\"(Optional) Download_hub\",children:(csghubArr.includes(modelData.model_name)?['none','huggingface','modelscope','csghub']:['none','huggingface','modelscope']).map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:item},item);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelPath,label:\"(Optional) Model Path, For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.\",onChange:function onChange(e){return setModelPath(e.target.value);}})})}),/*#__PURE__*/_jsx(ListItemButton,{onClick:function onClick(){return setIsPeftModelConfig(!isPeftModelConfig);},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center'},children:[/*#__PURE__*/_jsx(ListItemText,{primary:\"Lora Config\",style:{marginRight:10}}),isPeftModelConfig?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]})}),/*#__PURE__*/_jsxs(Collapse,{in:isPeftModelConfig,timeout:\"auto\",unmountOnExit:true,style:{marginLeft:'30px'},children:[/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Model Config',key:'lora_name',value:'local_path'},onGetArr:function onGetArr(arr){setLoraListArr(arr);},onJudgeArr:judgeArr,pairData:loraArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Load Kwargs for Image Model',key:'key',value:'value'},onGetArr:function onGetArr(arr){setImageLoraLoadKwargsArr(arr);},onJudgeArr:judgeArr,pairData:imageLoraLoadArr}),/*#__PURE__*/_jsx(AddPair,{customData:{title:'Lora Fuse Kwargs for Image Model',key:'key',value:'value'},onGetArr:function onGetArr(arr){setImageLoraFuseKwargsArr(arr);},onJudgeArr:judgeArr,pairData:imageLoraFuseArr})]})]}),/*#__PURE__*/_jsx(AddPair,{customData:{title:\"Additional parameters passed to the inference engine\".concat(modelEngine?': '+modelEngine:''),key:'key',value:'value'},onGetArr:function onGetArr(arr){setCustomParametersArr(arr);},onJudgeArr:judgeArr,pairData:customArr})]})}):/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}}),/*#__PURE__*/_jsx(TextField,{style:{marginTop:'25px'},type:\"number\",InputProps:{inputProps:{min:1}},label:\"Replica\",value:replica,onChange:function onChange(e){return setReplica(parseInt(e.target.value,10));}}),/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"Device\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGpu,onChange:function onChange(e){return setNGpu(e.target.value);},label:\"N-GPU\",children:getNewNGPURange().map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]}),nGpu==='GPU'&&/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(TextField,{value:GPUIdx,label:\"GPU Idx, Specify the GPU index where the model is located\",onChange:function onChange(e){setGPUIdxAlert(false);setGPUIdx(e.target.value);var regular=/^\\d+(?:,\\d+)*$/;if(e.target.value!==''&&!regular.test(e.target.value)){setGPUIdxAlert(true);}}}),GPUIdxAlert&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter numeric data separated by commas, for example: 0,1,2\"})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:workerIp,label:\"Worker Ip, specify the worker ip where the model is located in a distributed scenario\",onChange:function onChange(e){return setWorkerIp(e.target.value);}})}),/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"(Optional) Download_hub\"}),/*#__PURE__*/_jsx(Select,{labelId:\"download_hub-label\",value:downloadHub,onChange:function onChange(e){e.target.value==='none'?setDownloadHub(''):setDownloadHub(e.target.value);},label:\"(Optional) Download_hub\",children:['none','huggingface','modelscope'].map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:item},item);})})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelPath,label:\"(Optional) Model Path, For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.\",onChange:function onChange(e){return setModelPath(e.target.value);}})})]}),/*#__PURE__*/_jsxs(Box,{className:\"buttonsContainer\",children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch\",className:\"buttonContainer\",onClick:function onClick(){return launchModel(url,modelData);},disabled:modelType==='LLM'&&(isCallingApi||isUpdatingModel||!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))||!judgeArr(customParametersArr,['key','value'])||!judgeArr(loraListArr,['lora_name','local_path'])||!judgeArr(imageLoraLoadKwargsArr,['key','value'])||!judgeArr(imageLoraFuseKwargsArr,['key','value'])||requestLimitsAlert||GPUIdxAlert)||(modelType==='embedding'||modelType==='rerank')&&GPUIdxAlert,children:function(){if(isCallingApi||isUpdatingModel){return/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",style:{backgroundColor:'#f2f2f2'},children:/*#__PURE__*/_jsx(CircularProgress,{size:\"20px\",sx:{color:'#000000'}})});}else if(!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))){return/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",style:{backgroundColor:'#f2f2f2'},children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{size:\"20px\"})});}else{return/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{color:\"#000000\",size:\"20px\"})});}}()}),/*#__PURE__*/_jsx(\"button\",{title:\"Go Back\",className:\"buttonContainer\",onClick:function onClick(){setSelected(false);setHover(false);},children:/*#__PURE__*/_jsx(Box,{className:\"buttonItem\",children:/*#__PURE__*/_jsx(UndoOutlined,{color:\"#000000\",size:\"20px\"})})})]})]})}),/*#__PURE__*/_jsx(Backdrop,{sx:{color:'#fff',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},open:isJsonShow,children:/*#__PURE__*/_jsxs(\"div\",{className:\"jsonDialog\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"jsonDialog-title\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"title-name\",children:modelData.model_name}),/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy Json',text:JSON.stringify(modelData,null,4)})]}),/*#__PURE__*/_jsx(\"div\",{className:\"main-box\",children:/*#__PURE__*/_jsx(\"textarea\",{readOnly:true,className:\"textarea-box\",value:JSON.stringify(modelData,null,4)})}),/*#__PURE__*/_jsxs(\"div\",{className:\"but-box\",children:[/*#__PURE__*/_jsx(Button,{onClick:function onClick(){setIsJsonShow(false);},style:{marginRight:30},children:\"Cancel\"}),/*#__PURE__*/_jsx(Button,{onClick:handleJsonDataPresentation,children:\"Edit\"})]})]})}),/*#__PURE__*/_jsx(Snackbar,{anchorOrigin:{vertical:'top',horizontal:'center'},open:openSnackbar,onClose:function onClose(){return setOpenSnackbar(false);},message:\"Please fill in the complete parameters before adding!\"},'top'+'center'),/*#__PURE__*/_jsx(Backdrop,{sx:{color:'#fff',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},open:isOpenCachedList,children:/*#__PURE__*/_jsxs(\"div\",{className:\"dialogBox\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"dialogTitle\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"dialogTitle-model_name\",children:modelData.model_name}),/*#__PURE__*/_jsx(Close,{style:{cursor:'pointer'},onClick:handleCloseCachedList})]}),/*#__PURE__*/_jsx(TableContainer,{component:Paper,children:/*#__PURE__*/_jsxs(Table,{sx:{minWidth:500},style:{height:'500px',width:'100%'},stickyHeader:true,\"aria-label\":\"simple pagination table\",children:[/*#__PURE__*/_jsx(TableHead,{children:/*#__PURE__*/_jsxs(TableRow,{children:[modelType==='LLM'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"model_format\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"model_size_in_billions\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"quantizations\"})]}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:192},children:\"real_path\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:46}}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:192},children:\"path\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{width:46}}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",style:{whiteSpace:'nowrap',minWidth:116},children:\"IP Address\"}),/*#__PURE__*/_jsx(TableCell,{align:\"left\",children:\"operation\"})]})}),/*#__PURE__*/_jsxs(TableBody,{style:{position:'relative'},children:[cachedListArr.slice(page*5,page*5+5).map(function(row){return/*#__PURE__*/_jsxs(StyledTableRow,{style:{maxHeight:90},children:[modelType==='LLM'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TableCell,{component:\"th\",scope:\"row\",children:row.model_format===null?'—':row.model_format}),/*#__PURE__*/_jsx(TableCell,{children:row.model_size_in_billions===null?'—':row.model_size_in_billions}),/*#__PURE__*/_jsx(TableCell,{children:row.quantization===null?'—':row.quantization})]}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(Tooltip,{title:row.real_path,children:/*#__PURE__*/_jsx(\"div\",{className:modelType==='LLM'?'pathBox':'pathBox pathBox2',children:row.real_path})})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy real_path',text:row.real_path})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(Tooltip,{title:row.path,children:/*#__PURE__*/_jsx(\"div\",{className:modelType==='LLM'?'pathBox':'pathBox pathBox2',children:row.path})})}),/*#__PURE__*/_jsx(TableCell,{children:/*#__PURE__*/_jsx(CopyComponent,{tip:'Copy path',text:row.path})}),/*#__PURE__*/_jsx(TableCell,{children:row.actor_ip_address}),/*#__PURE__*/_jsx(TableCell,{align:modelType==='LLM'?'center':'left',children:/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",size:\"large\",onClick:function onClick(){return handleOpenDeleteCachedDialog(row.real_path,row.model_version);},children:/*#__PURE__*/_jsx(Delete,{})})})]},row.model_name);}),emptyRows>0&&/*#__PURE__*/_jsx(TableRow,{style:{height:89.4*emptyRows},children:/*#__PURE__*/_jsx(TableCell,{})}),cachedListArr.length===0&&/*#__PURE__*/_jsx(\"div\",{className:\"empty\",children:\"No cache for now !\"})]})]})}),/*#__PURE__*/_jsx(TablePagination,{style:{float:'right'},rowsPerPageOptions:[5],count:cachedListArr.length,rowsPerPage:5,page:page,onPageChange:handleChangePage})]})}),/*#__PURE__*/_jsx(DeleteDialog,{text:'Confirm deletion of cache files? This action is irreversible.',isDelete:isDeleteCached,onHandleIsDelete:function onHandleIsDelete(){return setIsDeleteCached(false);},onHandleDelete:handleDeleteCached})]});};export default ModelCard;","map":{"version":3,"names":["ChatOutlined","Close","Delete","EditNote","EditNoteOutlined","ExpandLess","ExpandMore","Grade","HelpCenterOutlined","RocketLaunchOutlined","StarBorder","UndoOutlined","Alert","Backdrop","Box","Button","Chip","CircularProgress","Collapse","Drawer","FormControl","Grid","IconButton","InputLabel","ListItemButton","ListItemText","MenuItem","Paper","Select","Snackbar","Stack","Table","TableBody","TableCell","TableContainer","TableHead","TablePagination","TableRow","TextField","Tooltip","styled","React","useContext","useEffect","useRef","useState","useNavigate","ApiContext","CopyComponent","DeleteDialog","fetchWrapper","TitleTypography","AddPair","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","llmAllDataKey","csghubArr","ModelCard","_ref","_JSON$parse","_JSON$parse2","url","modelData","gpuAvailable","modelType","_ref$is_custom","is_custom","onHandleCompleteDelete","onHandlecustomDelete","onGetCollectionArr","_useState","_useState2","_slicedToArray","hover","setHover","_useState3","_useState4","selected","setSelected","_useState5","_useState6","requestLimitsAlert","setRequestLimitsAlert","_useState7","_useState8","GPUIdxAlert","setGPUIdxAlert","_useState9","_useState10","isOther","setIsOther","_useState11","_useState12","isPeftModelConfig","setIsPeftModelConfig","_useState13","_useState14","openSnackbar","setOpenSnackbar","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","navigate","_useState15","_useState16","modelUID","setModelUID","_useState17","_useState18","modelEngine","setModelEngine","_useState19","_useState20","modelFormat","setModelFormat","_useState21","_useState22","modelSize","setModelSize","_useState23","_useState24","quantization","setQuantization","_useState25","_useState26","nGPU","setNGPU","_useState27","_useState28","nGpu","setNGpu","_useState29","_useState30","nGPULayers","setNGPULayers","_useState31","_useState32","replica","setReplica","_useState33","_useState34","requestLimits","setRequestLimits","_useState35","_useState36","workerIp","setWorkerIp","_useState37","_useState38","GPUIdx","setGPUIdx","_useState39","_useState40","downloadHub","setDownloadHub","_useState41","_useState42","modelPath","setModelPath","_useState43","_useState44","enginesObj","setEnginesObj","_useState45","_useState46","engineOptions","setEngineOptions","_useState47","_useState48","formatOptions","setFormatOptions","_useState49","_useState50","sizeOptions","setSizeOptions","_useState51","_useState52","quantizationOptions","setQuantizationOptions","_useState53","_useState54","customDeleted","setCustomDeleted","_useState55","_useState56","customParametersArr","setCustomParametersArr","_useState57","_useState58","loraListArr","setLoraListArr","_useState59","_useState60","imageLoraLoadKwargsArr","setImageLoraLoadKwargsArr","_useState61","_useState62","imageLoraFuseKwargsArr","setImageLoraFuseKwargsArr","_useState63","_useState64","isOpenCachedList","setIsOpenCachedList","_useState65","_useState66","isDeleteCached","setIsDeleteCached","_useState67","_useState68","cachedListArr","setCachedListArr","_useState69","_useState70","cachedModelVersion","setCachedModelVersion","_useState71","_useState72","cachedRealPath","setCachedRealPath","_useState73","_useState74","page","setPage","_useState75","_useState76","isDeleteCustomModel","setIsDeleteCustomModel","_useState77","_useState78","isJsonShow","setIsJsonShow","_useState79","_useState80","isHistory","setIsHistory","_useState81","_useState82","customArr","setCustomArr","_useState83","_useState84","loraArr","setLoraArr","_useState85","_useState86","imageLoraLoadArr","setImageLoraLoadArr","_useState87","_useState88","imageLoraFuseArr","setImageLoraFuseArr","_useState89","_useState90","customParametersArrLength","setCustomParametersArrLength","parentRef","range","start","end","Array","fill","undefined","map","_","i","isCached","spec","isArray","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","keyArr","key","push","length","handleLlmHistory","format","_toConsumableArray","Set","item","model_format","sizes","filter","model_size_in_billions","JSON","stringify","quants","flatMap","quantizations","current","scrollTo","top","scrollHeight","behavior","getNGPURange","concat","getNewNGPURange","getModelEngine","model_name","get","then","data","Object","keys","catch","error","console","response","status","message","launchModel","_String","_String2","modelDataWithID_LLM","model_uid","trim","model_type","model_engine","n_gpu","request_limits","String","Number","worker_ip","gpu_idx","handleGPUIdx","download_hub","model_path","modelDataWithID_other","n_gpu_layers","peft_model_config","image_lora_load_kwargs","forEach","handleValueType","value","image_lora_fuse_kwargs","lora_list","id","modelDataWithID","post","sessionStorage","setItem","historyArr","parse","localStorage","getItem","deepEqual","arr","split","handeCustomDelete","e","stopPropagation","subType","delete","judgeArr","keysArr","str","toLowerCase","StyledTableRow","_ref2","theme","backgroundColor","palette","action","emptyRows","Math","max","handleChangePage","newPage","handleOpenCachedList","getCachedList","document","body","style","overflow","handleCloseCachedList","list","handleOpenDeleteCachedDialog","real_path","model_version","handleDeleteCached","cachedArr","handleJsonDataPresentation","handleGetHistory","_peft_model_config$lo","_arr$","join","loraData","lora_name","local_path","ImageLoraLoadData","ImageLoraFuseData","customData","handleOtherHistory","obj1","obj2","keysA","keysB","_i","_keysA","handleCollection","bool","collectionArr","handleDeleteChip","newArr","children","className","onMouseEnter","onMouseLeave","onClick","elevation","title","placement","color","spacing","direction","useFlexGap","flexWrap","sx","marginLeft","model_lang","v","label","variant","model_specs","deleteIcon","onDelete","model_description","floor","context_length","model_ability","disabled","language","model_family","dimensions","max_tokens","text","isDelete","onHandleIsDelete","onHandleDelete","open","onClose","anchor","display","alignItems","ref","flexDirection","width","mx","rowSpacing","columnSpacing","xs","margin","fullWidth","labelId","onChange","target","engine","subArr","specs","cached","displayedEngine","displayedFormat","displayedSize","quant","find","s","indexOf","displayedQuant","type","InputProps","inputProps","min","primary","marginRight","in","timeout","unmountOnExit","parseFloat","severity","regular","test","onGetArr","onJudgeArr","pairData","marginTop","is_builtin","zIndex","drawer","tip","readOnly","anchorOrigin","vertical","horizontal","cursor","component","minWidth","height","stickyHeader","align","whiteSpace","position","slice","row","maxHeight","scope","path","actor_ip_address","float","rowsPerPageOptions","count","rowsPerPage","onPageChange"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/modelCard.js"],"sourcesContent":["import './styles/modelCardStyle.css'\n\nimport {\n ChatOutlined,\n Close,\n Delete,\n EditNote,\n EditNoteOutlined,\n ExpandLess,\n ExpandMore,\n Grade,\n HelpCenterOutlined,\n RocketLaunchOutlined,\n StarBorder,\n UndoOutlined,\n} from '@mui/icons-material'\nimport {\n Alert,\n Backdrop,\n Box,\n Button,\n Chip,\n CircularProgress,\n Collapse,\n Drawer,\n FormControl,\n Grid,\n IconButton,\n InputLabel,\n ListItemButton,\n ListItemText,\n MenuItem,\n Paper,\n Select,\n Snackbar,\n Stack,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TablePagination,\n TableRow,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport { styled } from '@mui/material/styles'\nimport React, { useContext, useEffect, useRef, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport CopyComponent from '../../components/copyComponent/copyComponent'\nimport DeleteDialog from '../../components/deleteDialog'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport TitleTypography from '../../components/titleTypography'\nimport AddPair from './components/addPair'\n\nconst llmAllDataKey = [\n 'model_uid',\n 'model_name',\n 'model_type',\n 'model_engine',\n 'model_format',\n 'model_size_in_billions',\n 'quantization',\n 'n_gpu',\n 'n_gpu_layers',\n 'replica',\n 'request_limits',\n 'worker_ip',\n 'gpu_idx',\n 'download_hub',\n 'model_path',\n 'peft_model_config',\n]\n\nconst csghubArr = ['qwen2-instruct']\n\nconst ModelCard = ({\n url,\n modelData,\n gpuAvailable,\n modelType,\n is_custom = false,\n onHandleCompleteDelete,\n onHandlecustomDelete,\n onGetCollectionArr,\n}) => {\n const [hover, setHover] = useState(false)\n const [selected, setSelected] = useState(false)\n const [requestLimitsAlert, setRequestLimitsAlert] = useState(false)\n const [GPUIdxAlert, setGPUIdxAlert] = useState(false)\n const [isOther, setIsOther] = useState(false)\n const [isPeftModelConfig, setIsPeftModelConfig] = useState(false)\n const [openSnackbar, setOpenSnackbar] = useState(false)\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const navigate = useNavigate()\n\n // Model parameter selections\n const [modelUID, setModelUID] = useState('')\n const [modelEngine, setModelEngine] = useState('')\n const [modelFormat, setModelFormat] = useState('')\n const [modelSize, setModelSize] = useState('')\n const [quantization, setQuantization] = useState('')\n const [nGPU, setNGPU] = useState('auto')\n const [nGpu, setNGpu] = useState(gpuAvailable === 0 ? 'CPU' : 'GPU')\n const [nGPULayers, setNGPULayers] = useState(-1)\n const [replica, setReplica] = useState(1)\n const [requestLimits, setRequestLimits] = useState('')\n const [workerIp, setWorkerIp] = useState('')\n const [GPUIdx, setGPUIdx] = useState('')\n const [downloadHub, setDownloadHub] = useState('')\n const [modelPath, setModelPath] = useState('')\n\n const [enginesObj, setEnginesObj] = useState({})\n const [engineOptions, setEngineOptions] = useState([])\n const [formatOptions, setFormatOptions] = useState([])\n const [sizeOptions, setSizeOptions] = useState([])\n const [quantizationOptions, setQuantizationOptions] = useState([])\n const [customDeleted, setCustomDeleted] = useState(false)\n const [customParametersArr, setCustomParametersArr] = useState([])\n const [loraListArr, setLoraListArr] = useState([])\n const [imageLoraLoadKwargsArr, setImageLoraLoadKwargsArr] = useState([])\n const [imageLoraFuseKwargsArr, setImageLoraFuseKwargsArr] = useState([])\n const [isOpenCachedList, setIsOpenCachedList] = useState(false)\n const [isDeleteCached, setIsDeleteCached] = useState(false)\n const [cachedListArr, setCachedListArr] = useState([])\n const [cachedModelVersion, setCachedModelVersion] = useState('')\n const [cachedRealPath, setCachedRealPath] = useState('')\n const [page, setPage] = useState(0)\n const [isDeleteCustomModel, setIsDeleteCustomModel] = useState(false)\n const [isJsonShow, setIsJsonShow] = useState(false)\n const [isHistory, setIsHistory] = useState(false)\n const [customArr, setCustomArr] = useState([])\n const [loraArr, setLoraArr] = useState([])\n const [imageLoraLoadArr, setImageLoraLoadArr] = useState([])\n const [imageLoraFuseArr, setImageLoraFuseArr] = useState([])\n const [customParametersArrLength, setCustomParametersArrLength] = useState(0)\n\n const parentRef = useRef(null)\n\n const range = (start, end) => {\n return new Array(end - start + 1).fill(undefined).map((_, i) => i + start)\n }\n\n const isCached = (spec) => {\n if (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 // model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\n const convertModelSize = (size) => {\n return size.toString().includes('_') ? size : parseInt(size, 10)\n }\n\n useEffect(() => {\n let keyArr = []\n for (let key in enginesObj) {\n keyArr.push(key)\n }\n if (keyArr.length) {\n handleLlmHistory()\n }\n }, [enginesObj])\n\n useEffect(() => {\n if (modelEngine) {\n const format = [\n ...new Set(enginesObj[modelEngine].map((item) => item.model_format)),\n ]\n setFormatOptions(format)\n if (!isHistory || !format.includes(modelFormat)) {\n setModelFormat('')\n }\n if (format.length === 1) {\n setModelFormat(format[0])\n }\n }\n }, [modelEngine])\n\n useEffect(() => {\n if (modelEngine && modelFormat) {\n const sizes = [\n ...new Set(\n enginesObj[modelEngine]\n .filter((item) => item.model_format === modelFormat)\n .map((item) => item.model_size_in_billions)\n ),\n ]\n setSizeOptions(sizes)\n if (\n !isHistory ||\n (sizeOptions.length &&\n JSON.stringify(sizes) !== JSON.stringify(sizeOptions))\n ) {\n setModelSize('')\n }\n if (sizes.length === 1) {\n setModelSize(sizes[0])\n }\n }\n }, [modelEngine, modelFormat])\n\n useEffect(() => {\n if (modelEngine && modelFormat && modelSize) {\n const quants = [\n ...new Set(\n enginesObj[modelEngine]\n .filter(\n (item) =>\n item.model_format === modelFormat &&\n item.model_size_in_billions === convertModelSize(modelSize)\n )\n .flatMap((item) => item.quantizations)\n ),\n ]\n setQuantizationOptions(quants)\n if (!isHistory || !quants.includes(quantization)) {\n setQuantization('')\n }\n if (quants.length === 1) {\n setQuantization(quants[0])\n }\n }\n }, [modelEngine, modelFormat, modelSize])\n\n useEffect(() => {\n setCustomParametersArrLength(customParametersArr.length)\n if (\n parentRef.current &&\n customParametersArr.length > customParametersArrLength\n ) {\n parentRef.current.scrollTo({\n top: parentRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n }, [customParametersArr])\n\n const getNGPURange = () => {\n if (gpuAvailable === 0) {\n // remain 'auto' for distributed situation\n return ['auto', 'CPU']\n }\n return ['auto', 'CPU'].concat(range(1, gpuAvailable))\n }\n\n const getNewNGPURange = () => {\n if (gpuAvailable === 0) {\n return ['CPU']\n } else {\n return ['GPU', 'CPU']\n }\n }\n\n const getModelEngine = (model_name) => {\n fetchWrapper\n .get(`/v1/engines/${model_name}`)\n .then((data) => {\n setEnginesObj(data)\n setEngineOptions(Object.keys(data))\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n setIsCallingApi(false)\n })\n }\n\n const launchModel = () => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n\n const modelDataWithID_LLM = {\n // If user does not fill model_uid, pass null (None) to server and server generates it.\n model_uid: modelUID?.trim() === '' ? null : modelUID?.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n model_engine: modelEngine,\n model_format: modelFormat,\n model_size_in_billions: convertModelSize(modelSize),\n quantization: quantization,\n n_gpu:\n parseInt(nGPU, 10) === 0 || nGPU === 'CPU'\n ? null\n : nGPU === 'auto'\n ? 'auto'\n : parseInt(nGPU, 10),\n replica: replica,\n request_limits:\n String(requestLimits)?.trim() === ''\n ? null\n : Number(String(requestLimits)?.trim()),\n worker_ip: workerIp?.trim() === '' ? null : workerIp?.trim(),\n gpu_idx: GPUIdx?.trim() === '' ? null : handleGPUIdx(GPUIdx?.trim()),\n download_hub: downloadHub === '' ? null : downloadHub,\n model_path: modelPath?.trim() === '' ? null : modelPath?.trim(),\n }\n\n let modelDataWithID_other = {\n model_uid: modelUID?.trim() === '' ? null : modelUID?.trim(),\n model_name: modelData.model_name,\n model_type: modelType,\n replica: replica,\n n_gpu: nGpu === 'GPU' ? 'auto' : null,\n worker_ip: workerIp?.trim() === '' ? null : workerIp.trim(),\n gpu_idx: GPUIdx?.trim() === '' ? null : handleGPUIdx(GPUIdx?.trim()),\n download_hub: downloadHub === '' ? null : downloadHub,\n model_path: modelPath?.trim() === '' ? null : modelPath?.trim(),\n }\n\n if (nGPULayers >= 0) {\n modelDataWithID_LLM.n_gpu_layers = nGPULayers\n }\n\n if (\n loraListArr.length ||\n imageLoraLoadKwargsArr.length ||\n imageLoraFuseKwargsArr.length\n ) {\n const peft_model_config = {}\n if (imageLoraLoadKwargsArr.length) {\n const image_lora_load_kwargs = {}\n imageLoraLoadKwargsArr.forEach((item) => {\n image_lora_load_kwargs[item.key] = handleValueType(item.value)\n })\n peft_model_config['image_lora_load_kwargs'] = image_lora_load_kwargs\n }\n if (imageLoraFuseKwargsArr.length) {\n const image_lora_fuse_kwargs = {}\n imageLoraFuseKwargsArr.forEach((item) => {\n image_lora_fuse_kwargs[item.key] = handleValueType(item.value)\n })\n peft_model_config['image_lora_fuse_kwargs'] = image_lora_fuse_kwargs\n }\n if (loraListArr.length) {\n const lora_list = loraListArr\n lora_list.map((item) => {\n delete item.id\n })\n peft_model_config['lora_list'] = lora_list\n }\n modelDataWithID_LLM['peft_model_config'] = peft_model_config\n }\n\n if (customParametersArr.length) {\n customParametersArr.forEach((item) => {\n modelDataWithID_LLM[item.key] = handleValueType(item.value)\n })\n }\n\n const modelDataWithID =\n modelType === 'LLM' ? modelDataWithID_LLM : modelDataWithID_other\n\n // First fetcher request to initiate the model\n fetchWrapper\n .post('/v1/models', modelDataWithID)\n .then(() => {\n navigate(`/running_models/${modelType}`)\n sessionStorage.setItem(\n 'runningModelType',\n `/running_models/${modelType}`\n )\n let historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n if (!historyArr.some((item) => deepEqual(item, modelDataWithID))) {\n historyArr = historyArr.filter(\n (item) => item.model_name !== modelDataWithID.model_name\n )\n historyArr.push(modelDataWithID)\n }\n localStorage.setItem('historyArr', JSON.stringify(historyArr))\n\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n setIsCallingApi(false)\n })\n }\n\n const handleGPUIdx = (data) => {\n const arr = []\n data.split(',').forEach((item) => {\n arr.push(Number(item))\n })\n return arr\n }\n\n const handeCustomDelete = (e) => {\n e.stopPropagation()\n const subType = sessionStorage.getItem('subType').split('/')\n if (subType) {\n subType[3]\n fetchWrapper\n .delete(\n `/v1/model_registrations/${\n subType[3] === 'llm' ? 'LLM' : subType[3]\n }/${modelData.model_name}`\n )\n .then(() => {\n setCustomDeleted(true)\n onHandlecustomDelete(modelData.model_name)\n setIsDeleteCustomModel(false)\n })\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n }\n\n const judgeArr = (arr, keysArr) => {\n if (\n arr.length &&\n arr[arr.length - 1][keysArr[0]] !== '' &&\n arr[arr.length - 1][keysArr[1]] !== ''\n ) {\n return true\n } else if (arr.length === 0) {\n return true\n } else {\n return false\n }\n }\n\n const handleValueType = (str) => {\n str = String(str)\n if (str.toLowerCase() === 'none') {\n return null\n } else if (str.toLowerCase() === 'true') {\n return true\n } else if (str.toLowerCase() === 'false') {\n return false\n } else if (Number(str) || (str !== '' && Number(str) === 0)) {\n return Number(str)\n } else {\n return str\n }\n }\n\n const StyledTableRow = styled(TableRow)(({ theme }) => ({\n '&:nth-of-type(odd)': {\n backgroundColor: theme.palette.action.hover,\n },\n }))\n\n const emptyRows =\n page >= 0 ? Math.max(0, (1 + page) * 5 - cachedListArr.length) : 0\n\n const handleChangePage = (_, newPage) => {\n setPage(newPage)\n }\n\n const handleOpenCachedList = () => {\n setIsOpenCachedList(true)\n getCachedList()\n document.body.style.overflow = 'hidden'\n }\n\n const handleCloseCachedList = () => {\n document.body.style.overflow = 'auto'\n setHover(false)\n setIsOpenCachedList(false)\n if (cachedListArr.length === 0) {\n onHandleCompleteDelete(modelData.model_name)\n }\n }\n\n const getCachedList = () => {\n fetchWrapper\n .get(`/v1/cache/models?model_name=${modelData.model_name}`)\n .then((data) => setCachedListArr(data.list))\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const handleOpenDeleteCachedDialog = (real_path, model_version) => {\n setCachedRealPath(real_path)\n setCachedModelVersion(model_version)\n setIsDeleteCached(true)\n }\n\n const handleDeleteCached = () => {\n fetchWrapper\n .delete(`/v1/cache/models?model_version=${cachedModelVersion}`)\n .then(() => {\n const cachedArr = cachedListArr.filter(\n (item) => item.real_path !== cachedRealPath\n )\n setCachedListArr(cachedArr)\n setIsDeleteCached(false)\n if (cachedArr.length) {\n if (\n (page + 1) * 5 >= cachedListArr.length &&\n cachedArr.length % 5 === 0\n ) {\n setPage(cachedArr.length / 5 - 1)\n }\n }\n })\n .catch((error) => {\n console.error(error)\n if (error.response.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n }\n\n const handleJsonDataPresentation = () => {\n const arr = sessionStorage.getItem('subType').split('/')\n sessionStorage.setItem(\n 'registerModelType',\n `/register_model/${arr[arr.length - 1]}`\n )\n sessionStorage.setItem('customJsonData', JSON.stringify(modelData))\n navigate(`/register_model/${arr[arr.length - 1]}/${modelData.model_name}`)\n }\n\n const handleGetHistory = () => {\n const historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n return historyArr.filter((item) => item.model_name === modelData.model_name)\n }\n\n const handleLlmHistory = () => {\n const arr = handleGetHistory()\n if (arr.length) {\n const {\n model_engine,\n model_format,\n model_size_in_billions,\n quantization,\n n_gpu,\n n_gpu_layers,\n replica,\n model_uid,\n request_limits,\n worker_ip,\n gpu_idx,\n download_hub,\n model_path,\n peft_model_config,\n } = arr[0]\n\n if (!engineOptions.includes(model_engine)) {\n setModelEngine('')\n } else {\n setModelEngine(model_engine || '')\n }\n setModelFormat(model_format || '')\n setModelSize(String(model_size_in_billions) || '')\n setQuantization(quantization || '')\n setNGPU(n_gpu || 'auto')\n if (n_gpu_layers >= 0) {\n setNGPULayers(n_gpu_layers)\n } else {\n setNGPULayers(-1)\n }\n setReplica(replica || 1)\n setModelUID(model_uid || '')\n setRequestLimits(request_limits || '')\n setWorkerIp(worker_ip || '')\n setGPUIdx(gpu_idx?.join(',') || '')\n setDownloadHub(download_hub || '')\n setModelPath(model_path || '')\n\n let loraData = []\n peft_model_config?.lora_list?.forEach((item) => {\n loraData.push({\n lora_name: item.lora_name,\n local_path: item.local_path,\n })\n })\n setLoraArr(loraData)\n\n let ImageLoraLoadData = []\n for (let key in peft_model_config?.image_lora_load_kwargs) {\n ImageLoraLoadData.push({\n key: key,\n value: peft_model_config?.image_lora_load_kwargs[key],\n })\n }\n setImageLoraLoadArr(ImageLoraLoadData)\n\n let ImageLoraFuseData = []\n for (let key in peft_model_config?.image_lora_fuse_kwargs) {\n ImageLoraFuseData.push({\n key: key,\n value: peft_model_config?.image_lora_fuse_kwargs[key],\n })\n }\n setImageLoraFuseArr(ImageLoraFuseData)\n\n let customData = []\n for (let key in arr[0]) {\n !llmAllDataKey.includes(key) &&\n customData.push({ key: key, value: arr[0][key] })\n }\n setCustomArr(customData)\n\n if (\n model_uid ||\n request_limits ||\n worker_ip ||\n gpu_idx?.join(',') ||\n download_hub ||\n model_path\n )\n setIsOther(true)\n\n if (\n loraData.length ||\n ImageLoraLoadData.length ||\n ImageLoraFuseData.length\n ) {\n setIsOther(true)\n setIsPeftModelConfig(true)\n }\n }\n }\n\n const handleOtherHistory = () => {\n const arr = handleGetHistory()\n if (arr.length) {\n setModelUID(arr[0].model_uid || '')\n setReplica(arr[0].replica || 1)\n setNGpu(arr[0].n_gpu === 'auto' ? 'GPU' : 'CPU')\n setGPUIdx(arr[0].gpu_idx || '')\n setWorkerIp(arr[0].worker_ip || '')\n setDownloadHub(arr[0].download_hub)\n setModelPath(arr[0].model_path || '')\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 const handleCollection = (bool) => {\n setHover(false)\n\n let collectionArr = JSON.parse(localStorage.getItem('collectionArr')) || []\n if (bool) {\n collectionArr.push(modelData.model_name)\n } else {\n collectionArr = collectionArr.filter(\n (item) => item !== modelData.model_name\n )\n }\n localStorage.setItem('collectionArr', JSON.stringify(collectionArr))\n\n onGetCollectionArr(collectionArr)\n }\n\n const handleDeleteChip = () => {\n const arr = JSON.parse(localStorage.getItem('historyArr'))\n const newArr = arr.filter(\n (item) => item.model_name !== modelData.model_name\n )\n localStorage.setItem('historyArr', JSON.stringify(newArr))\n setIsHistory(false)\n if (modelType === 'LLM') {\n setModelEngine('')\n setModelFormat('')\n setModelSize('')\n setQuantization('')\n setNGPU('auto')\n setReplica(1)\n setModelUID('')\n setRequestLimits('')\n setWorkerIp('')\n setGPUIdx('')\n setDownloadHub('')\n setModelPath('')\n setLoraArr([])\n setImageLoraLoadArr([])\n setImageLoraFuseArr([])\n setCustomArr([])\n setIsOther(false)\n setIsPeftModelConfig(false)\n } else {\n setModelUID('')\n setReplica(1)\n setNGpu(gpuAvailable === 0 ? 'CPU' : 'GPU')\n setGPUIdx('')\n setWorkerIp('')\n setDownloadHub('')\n setModelPath('')\n }\n }\n\n // Set two different states based on mouse hover\n return (\n <>\n <Paper\n id={modelData.model_name}\n className=\"container\"\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n onClick={() => {\n if (!selected && !customDeleted) {\n const arr = handleGetHistory()\n if (arr.length) setIsHistory(true)\n setSelected(true)\n if (modelType === 'LLM') {\n getModelEngine(modelData.model_name)\n } else {\n handleOtherHistory()\n }\n }\n }}\n elevation={hover ? 24 : 4}\n >\n {modelType === 'LLM' ? (\n <Box className=\"descriptionCard\">\n {is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n <Tooltip title={'Edit'} placement=\"top\">\n <IconButton\n aria-label=\"show\"\n onClick={(e) => {\n e.stopPropagation()\n setIsJsonShow(true)\n }}\n >\n <EditNote />\n </IconButton>\n </Tooltip>\n <Tooltip title={'delete'} placement=\"top\">\n <IconButton\n aria-label=\"delete\"\n onClick={(e) => {\n e.stopPropagation()\n setIsDeleteCustomModel(true)\n }}\n >\n <Delete />\n </IconButton>\n </Tooltip>\n </div>\n </div>\n )}\n {!is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n {JSON.parse(localStorage.getItem('collectionArr'))?.includes(\n modelData.model_name\n ) ? (\n <Tooltip title={'Unfavorite'} placement=\"top\">\n <IconButton\n aria-label=\"collection\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(false)\n }}\n >\n <Grade style={{ color: 'rgb(255, 206, 0)' }} />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip title={'Favorite'} placement=\"top\">\n <IconButton\n aria-label=\"cancellation-of-collections\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(true)\n }}\n >\n <StarBorder />\n </IconButton>\n </Tooltip>\n )}\n </div>\n </div>\n )}\n\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {modelData.model_lang &&\n (() => {\n return modelData.model_lang.map((v) => {\n return (\n <Chip key={v} label={v} variant=\"outlined\" size=\"small\" />\n )\n })\n })()}\n {(() => {\n if (\n modelData.model_specs &&\n modelData.model_specs.some((spec) => isCached(spec))\n ) {\n return (\n <Chip\n label=\"Cached\"\n variant=\"outlined\"\n size=\"small\"\n deleteIcon={<EditNote />}\n onDelete={handleOpenCachedList}\n />\n )\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p className=\"p\" title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n\n <div className=\"iconRow\">\n <div className=\"iconItem\">\n <span className=\"boldIconText\">\n {Math.floor(modelData.context_length / 1000)}K\n </span>\n <small className=\"smallText\">context length</small>\n </div>\n {(() => {\n if (\n modelData.model_ability &&\n modelData.model_ability.includes('chat')\n ) {\n return (\n <div className=\"iconItem\">\n <ChatOutlined className=\"muiIcon\" />\n <small className=\"smallText\">chat model</small>\n </div>\n )\n } else if (\n modelData.model_ability &&\n modelData.model_ability.includes('generate')\n ) {\n return (\n <div className=\"iconItem\">\n <EditNoteOutlined className=\"muiIcon\" />\n <small className=\"smallText\">generate model</small>\n </div>\n )\n } else {\n return (\n <div className=\"iconItem\">\n <HelpCenterOutlined className=\"muiIcon\" />\n <small className=\"smallText\">other model</small>\n </div>\n )\n }\n })()}\n </div>\n </Box>\n ) : (\n <Box className=\"descriptionCard\">\n <div className=\"titleContainer\">\n {is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n <Tooltip title={'Edit'} placement=\"top\">\n <IconButton\n aria-label=\"show\"\n onClick={(e) => {\n e.stopPropagation()\n setIsJsonShow(true)\n }}\n >\n <EditNote />\n </IconButton>\n </Tooltip>\n <Tooltip title={'delete'} placement=\"top\">\n <IconButton\n aria-label=\"delete\"\n onClick={(e) => {\n e.stopPropagation()\n setIsDeleteCustomModel(true)\n }}\n disabled={customDeleted}\n >\n <Delete />\n </IconButton>\n </Tooltip>\n </div>\n </div>\n )}\n {!is_custom && (\n <div className=\"cardTitle\">\n <TitleTypography value={modelData.model_name} />\n <div className=\"iconButtonBox\">\n {JSON.parse(\n localStorage.getItem('collectionArr')\n )?.includes(modelData.model_name) ? (\n <Tooltip title={'Unfavorite'} placement=\"top\">\n <IconButton\n aria-label=\"collection\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(false)\n }}\n >\n <Grade style={{ color: 'rgb(255, 206, 0)' }} />\n </IconButton>\n </Tooltip>\n ) : (\n <Tooltip title={'Favorite'} placement=\"top\">\n <IconButton\n aria-label=\"cancellation-of-collections\"\n onClick={(e) => {\n e.stopPropagation()\n handleCollection(true)\n }}\n >\n <StarBorder />\n </IconButton>\n </Tooltip>\n )}\n </div>\n </div>\n )}\n\n <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {(() => {\n if (modelData.language) {\n return modelData.language.map((v) => {\n return <Chip label={v} variant=\"outlined\" size=\"small\" />\n })\n } else if (modelData.model_family) {\n return (\n <Chip\n label={modelData.model_family}\n variant=\"outlined\"\n size=\"small\"\n />\n )\n }\n })()}\n {(() => {\n if (modelData.cache_status) {\n return (\n <Chip\n label=\"Cached\"\n variant=\"outlined\"\n size=\"small\"\n deleteIcon={<EditNote />}\n onDelete={handleOpenCachedList}\n />\n )\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n )\n }\n })()}\n </Stack>\n {modelData.model_description && (\n <p className=\"p\" title={modelData.model_description}>\n {modelData.model_description}\n </p>\n )}\n </div>\n {modelData.dimensions && (\n <div className=\"iconRow\">\n <div className=\"iconItem\">\n <span className=\"boldIconText\">{modelData.dimensions}</span>\n <small className=\"smallText\">dimensions</small>\n </div>\n <div className=\"iconItem\">\n <span className=\"boldIconText\">{modelData.max_tokens}</span>\n <small className=\"smallText\">max tokens</small>\n </div>\n </div>\n )}\n {!selected && hover && (\n <p className=\"instructionText\">\n Click with mouse to launch the model\n </p>\n )}\n </Box>\n )}\n </Paper>\n\n <DeleteDialog\n text={\n 'Are you sure to delete this custom model? This behavior is irreversible.'\n }\n isDelete={isDeleteCustomModel}\n onHandleIsDelete={() => setIsDeleteCustomModel(false)}\n onHandleDelete={handeCustomDelete}\n />\n <Drawer\n open={selected}\n onClose={() => {\n setSelected(false)\n setHover(false)\n }}\n anchor={'right'}\n >\n <div className=\"drawerCard\">\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <TitleTypography value={modelData.model_name} />\n {isHistory && (\n <Chip\n label=\"Last Config\"\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n onDelete={handleDeleteChip}\n />\n )}\n </div>\n\n {modelType === 'LLM' ? (\n <Box\n ref={parentRef}\n className=\"formContainer\"\n display=\"flex\"\n flexDirection=\"column\"\n width=\"100%\"\n mx=\"auto\"\n >\n <Grid rowSpacing={0} columnSpacing={1}>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"modelEngine-label\">Model Engine</InputLabel>\n <Select\n labelId=\"modelEngine-label\"\n value={modelEngine}\n onChange={(e) => setModelEngine(e.target.value)}\n label=\"Model Engine\"\n >\n {engineOptions.map((engine) => {\n const subArr = []\n enginesObj[engine].forEach((item) => {\n subArr.push(item.model_format)\n })\n const arr = [...new Set(subArr)]\n const specs = modelData.model_specs.filter((spec) =>\n arr.includes(spec.model_format)\n )\n\n const cached = specs.some((spec) => isCached(spec))\n\n const displayedEngine = cached\n ? engine + ' (cached)'\n : engine\n\n return (\n <MenuItem key={engine} value={engine}>\n {displayedEngine}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelEngine}\n >\n <InputLabel id=\"modelFormat-label\">Model Format</InputLabel>\n <Select\n labelId=\"modelFormat-label\"\n value={modelFormat}\n onChange={(e) => setModelFormat(e.target.value)}\n label=\"Model Format\"\n >\n {formatOptions.map((format) => {\n const specs = modelData.model_specs.filter(\n (spec) => spec.model_format === format\n )\n\n const cached = specs.some((spec) => isCached(spec))\n\n const displayedFormat = cached\n ? format + ' (cached)'\n : format\n\n return (\n <MenuItem key={format} value={format}>\n {displayedFormat}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat}\n >\n <InputLabel id=\"modelSize-label\">Model Size</InputLabel>\n <Select\n labelId=\"modelSize-label\"\n value={modelSize}\n onChange={(e) => setModelSize(e.target.value)}\n label=\"Model Size\"\n >\n {sizeOptions.map((size) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) => spec.model_size_in_billions === size\n )\n const cached = specs.some((spec) => isCached(spec))\n\n const displayedSize = cached ? size + ' (cached)' : size\n\n return (\n <MenuItem key={size} value={size}>\n {displayedSize}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize}\n >\n <InputLabel id=\"quantization-label\">\n Quantization\n </InputLabel>\n <Select\n labelId=\"quantization-label\"\n value={quantization}\n onChange={(e) => setQuantization(e.target.value)}\n label=\"Quantization\"\n >\n {quantizationOptions.map((quant) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) =>\n spec.model_size_in_billions ===\n convertModelSize(modelSize)\n )\n\n const spec = specs.find((s) => {\n return s.quantizations.includes(quant)\n })\n const cached = Array.isArray(spec?.cache_status)\n ? spec?.cache_status[\n spec?.quantizations.indexOf(quant)\n ]\n : spec?.cache_status\n\n const displayedQuant = cached\n ? quant + ' (cached)'\n : quant\n\n return (\n <MenuItem key={quant} value={quant}>\n {displayedQuant}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n {modelFormat !== 'ggufv2' && modelFormat !== 'ggmlv3' ? (\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize || !quantization}\n >\n <InputLabel id=\"n-gpu-label\">N-GPU</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGPU}\n onChange={(e) => setNGPU(e.target.value)}\n label=\"N-GPU\"\n >\n {getNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n label=\"N GPU Layers\"\n InputProps={{\n inputProps: {\n min: -1,\n },\n }}\n value={nGPULayers}\n onChange={(e) =>\n setNGPULayers(parseInt(e.target.value, 10))\n }\n />\n </FormControl>\n )}\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n disabled={!modelFormat || !modelSize || !quantization}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n </FormControl>\n </Grid>\n <ListItemButton onClick={() => setIsOther(!isOther)}>\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <ListItemText\n primary=\"Optional Configurations\"\n style={{ marginRight: 10 }}\n />\n {isOther ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse in={isOther} timeout=\"auto\" unmountOnExit>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={requestLimits}\n label=\"(Optional) Request Limits, the number of request limits for this model,default is None\"\n onChange={(e) => {\n setRequestLimitsAlert(false)\n setRequestLimits(e.target.value)\n if (\n e.target.value !== '' &&\n (!Number(e.target.value) ||\n Number(e.target.value) < 1 ||\n parseInt(e.target.value) !==\n parseFloat(e.target.value))\n ) {\n setRequestLimitsAlert(true)\n }\n }}\n />\n {requestLimitsAlert && (\n <Alert severity=\"error\">\n Please enter an integer greater than 0\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"(Optional) Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"(Optional) GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"quantization-label\">\n (Optional) Download_hub\n </InputLabel>\n <Select\n labelId=\"download_hub-label\"\n value={downloadHub}\n onChange={(e) => {\n e.target.value === 'none'\n ? setDownloadHub('')\n : setDownloadHub(e.target.value)\n }}\n label=\"(Optional) Download_hub\"\n >\n {(csghubArr.includes(modelData.model_name)\n ? ['none', 'huggingface', 'modelscope', 'csghub']\n : ['none', 'huggingface', 'modelscope']\n ).map((item) => {\n return (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelPath}\n label=\"(Optional) Model Path, For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.\"\n onChange={(e) => setModelPath(e.target.value)}\n />\n </FormControl>\n </Grid>\n <ListItemButton\n onClick={() => setIsPeftModelConfig(!isPeftModelConfig)}\n >\n <div style={{ display: 'flex', alignItems: 'center' }}>\n <ListItemText\n primary=\"Lora Config\"\n style={{ marginRight: 10 }}\n />\n {isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse\n in={isPeftModelConfig}\n timeout=\"auto\"\n unmountOnExit\n style={{ marginLeft: '30px' }}\n >\n <AddPair\n customData={{\n title: 'Lora Model Config',\n key: 'lora_name',\n value: 'local_path',\n }}\n onGetArr={(arr) => {\n setLoraListArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={loraArr}\n />\n <AddPair\n customData={{\n title: 'Lora Load Kwargs for Image Model',\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setImageLoraLoadKwargsArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={imageLoraLoadArr}\n />\n <AddPair\n customData={{\n title: 'Lora Fuse Kwargs for Image Model',\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setImageLoraFuseKwargsArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={imageLoraFuseArr}\n />\n </Collapse>\n </Collapse>\n <AddPair\n customData={{\n title: `Additional parameters passed to the inference engine${\n modelEngine ? ': ' + modelEngine : ''\n }`,\n key: 'key',\n value: 'value',\n }}\n onGetArr={(arr) => {\n setCustomParametersArr(arr)\n }}\n onJudgeArr={judgeArr}\n pairData={customArr}\n />\n </Grid>\n </Box>\n ) : (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n <TextField\n style={{ marginTop: '25px' }}\n type=\"number\"\n InputProps={{\n inputProps: {\n min: 1,\n },\n }}\n label=\"Replica\"\n value={replica}\n onChange={(e) => setReplica(parseInt(e.target.value, 10))}\n />\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"n-gpu-label\">Device</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGpu}\n onChange={(e) => setNGpu(e.target.value)}\n label=\"N-GPU\"\n >\n {getNewNGPURange().map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n {nGpu === 'GPU' && (\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n value={GPUIdx}\n label=\"GPU Idx, Specify the GPU index where the model is located\"\n onChange={(e) => {\n setGPUIdxAlert(false)\n setGPUIdx(e.target.value)\n const regular = /^\\d+(?:,\\d+)*$/\n if (\n e.target.value !== '' &&\n !regular.test(e.target.value)\n ) {\n setGPUIdxAlert(true)\n }\n }}\n />\n {GPUIdxAlert && (\n <Alert severity=\"error\">\n Please enter numeric data separated by commas, for\n example: 0,1,2\n </Alert>\n )}\n </FormControl>\n )}\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={workerIp}\n label=\"Worker Ip, specify the worker ip where the model is located in a distributed scenario\"\n onChange={(e) => setWorkerIp(e.target.value)}\n />\n </FormControl>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"quantization-label\">\n (Optional) Download_hub\n </InputLabel>\n <Select\n labelId=\"download_hub-label\"\n value={downloadHub}\n onChange={(e) => {\n e.target.value === 'none'\n ? setDownloadHub('')\n : setDownloadHub(e.target.value)\n }}\n label=\"(Optional) Download_hub\"\n >\n {['none', 'huggingface', 'modelscope'].map((item) => {\n return (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelPath}\n label=\"(Optional) Model Path, For PyTorch, provide the model directory. For GGML/GGUF, provide the model file path.\"\n onChange={(e) => setModelPath(e.target.value)}\n />\n </FormControl>\n </FormControl>\n )}\n <Box className=\"buttonsContainer\">\n <button\n title=\"Launch\"\n className=\"buttonContainer\"\n onClick={() => launchModel(url, modelData)}\n disabled={\n (modelType === 'LLM' &&\n (isCallingApi ||\n isUpdatingModel ||\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n ) ||\n !judgeArr(customParametersArr, ['key', 'value']) ||\n !judgeArr(loraListArr, ['lora_name', 'local_path']) ||\n !judgeArr(imageLoraLoadKwargsArr, ['key', 'value']) ||\n !judgeArr(imageLoraFuseKwargsArr, ['key', 'value']) ||\n requestLimitsAlert ||\n GPUIdxAlert)) ||\n ((modelType === 'embedding' || modelType === 'rerank') &&\n GPUIdxAlert)\n }\n >\n {(() => {\n if (isCallingApi || isUpdatingModel) {\n return (\n <Box\n className=\"buttonItem\"\n style={{\n backgroundColor: '#f2f2f2',\n }}\n >\n <CircularProgress\n size=\"20px\"\n sx={{\n color: '#000000',\n }}\n />\n </Box>\n )\n } else if (\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n )\n ) {\n return (\n <Box\n className=\"buttonItem\"\n style={{\n backgroundColor: '#f2f2f2',\n }}\n >\n <RocketLaunchOutlined size=\"20px\" />\n </Box>\n )\n } else {\n return (\n <Box className=\"buttonItem\">\n <RocketLaunchOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n )\n }\n })()}\n </button>\n <button\n title=\"Go Back\"\n className=\"buttonContainer\"\n onClick={() => {\n setSelected(false)\n setHover(false)\n }}\n >\n <Box className=\"buttonItem\">\n <UndoOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n </button>\n </Box>\n </div>\n </Drawer>\n <Backdrop\n sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}\n open={isJsonShow}\n >\n <div className=\"jsonDialog\">\n <div className=\"jsonDialog-title\">\n <div className=\"title-name\">{modelData.model_name}</div>\n <CopyComponent\n tip={'Copy Json'}\n text={JSON.stringify(modelData, null, 4)}\n />\n </div>\n <div className=\"main-box\">\n <textarea\n readOnly\n className=\"textarea-box\"\n value={JSON.stringify(modelData, null, 4)}\n />\n </div>\n <div className=\"but-box\">\n <Button\n onClick={() => {\n setIsJsonShow(false)\n }}\n style={{ marginRight: 30 }}\n >\n Cancel\n </Button>\n <Button onClick={handleJsonDataPresentation}>Edit</Button>\n </div>\n </div>\n </Backdrop>\n <Snackbar\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n open={openSnackbar}\n onClose={() => setOpenSnackbar(false)}\n message=\"Please fill in the complete parameters before adding!\"\n key={'top' + 'center'}\n />\n\n <Backdrop\n sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}\n open={isOpenCachedList}\n >\n <div className=\"dialogBox\">\n <div className=\"dialogTitle\">\n <div className=\"dialogTitle-model_name\">{modelData.model_name}</div>\n <Close\n style={{ cursor: 'pointer' }}\n onClick={handleCloseCachedList}\n />\n </div>\n <TableContainer component={Paper}>\n <Table\n sx={{ minWidth: 500 }}\n style={{ height: '500px', width: '100%' }}\n stickyHeader\n aria-label=\"simple pagination table\"\n >\n <TableHead>\n <TableRow>\n {modelType === 'LLM' && (\n <>\n <TableCell align=\"left\">model_format</TableCell>\n <TableCell align=\"left\">model_size_in_billions</TableCell>\n <TableCell align=\"left\">quantizations</TableCell>\n </>\n )}\n <TableCell align=\"left\" style={{ width: 192 }}>\n real_path\n </TableCell>\n <TableCell align=\"left\" style={{ width: 46 }}></TableCell>\n <TableCell align=\"left\" style={{ width: 192 }}>\n path\n </TableCell>\n <TableCell align=\"left\" style={{ width: 46 }}></TableCell>\n <TableCell\n align=\"left\"\n style={{ whiteSpace: 'nowrap', minWidth: 116 }}\n >\n IP Address\n </TableCell>\n <TableCell align=\"left\">operation</TableCell>\n </TableRow>\n </TableHead>\n <TableBody style={{ position: 'relative' }}>\n {cachedListArr.slice(page * 5, page * 5 + 5).map((row) => (\n <StyledTableRow\n style={{ maxHeight: 90 }}\n key={row.model_name}\n >\n {modelType === 'LLM' && (\n <>\n <TableCell component=\"th\" scope=\"row\">\n {row.model_format === null ? '—' : row.model_format}\n </TableCell>\n <TableCell>\n {row.model_size_in_billions === null\n ? '—'\n : row.model_size_in_billions}\n </TableCell>\n <TableCell>\n {row.quantization === null ? '—' : row.quantization}\n </TableCell>\n </>\n )}\n <TableCell>\n <Tooltip title={row.real_path}>\n <div\n className={\n modelType === 'LLM' ? 'pathBox' : 'pathBox pathBox2'\n }\n >\n {row.real_path}\n </div>\n </Tooltip>\n </TableCell>\n <TableCell>\n <CopyComponent\n tip={'Copy real_path'}\n text={row.real_path}\n />\n </TableCell>\n <TableCell>\n <Tooltip title={row.path}>\n <div\n className={\n modelType === 'LLM' ? 'pathBox' : 'pathBox pathBox2'\n }\n >\n {row.path}\n </div>\n </Tooltip>\n </TableCell>\n <TableCell>\n <CopyComponent tip={'Copy path'} text={row.path} />\n </TableCell>\n <TableCell>{row.actor_ip_address}</TableCell>\n <TableCell align={modelType === 'LLM' ? 'center' : 'left'}>\n <IconButton\n aria-label=\"delete\"\n size=\"large\"\n onClick={() =>\n handleOpenDeleteCachedDialog(\n row.real_path,\n row.model_version\n )\n }\n >\n <Delete />\n </IconButton>\n </TableCell>\n </StyledTableRow>\n ))}\n {emptyRows > 0 && (\n <TableRow style={{ height: 89.4 * emptyRows }}>\n <TableCell />\n </TableRow>\n )}\n {cachedListArr.length === 0 && (\n <div className=\"empty\">No cache for now !</div>\n )}\n </TableBody>\n </Table>\n </TableContainer>\n <TablePagination\n style={{ float: 'right' }}\n rowsPerPageOptions={[5]}\n count={cachedListArr.length}\n rowsPerPage={5}\n page={page}\n onPageChange={handleChangePage}\n />\n </div>\n </Backdrop>\n <DeleteDialog\n text={'Confirm deletion of cache files? This action is irreversible.'}\n isDelete={isDeleteCached}\n onHandleIsDelete={() => setIsDeleteCached(false)}\n onHandleDelete={handleDeleteCached}\n />\n </>\n )\n}\n\nexport default ModelCard\n"],"mappings":"kSAAA,MAAO,6BAA6B,CAEpC,OACEA,YAAY,CACZC,KAAK,CACLC,MAAM,CACNC,QAAQ,CACRC,gBAAgB,CAChBC,UAAU,CACVC,UAAU,CACVC,KAAK,CACLC,kBAAkB,CAClBC,oBAAoB,CACpBC,UAAU,CACVC,YAAY,KACP,qBAAqB,CAC5B,OACEC,KAAK,CACLC,QAAQ,CACRC,GAAG,CACHC,MAAM,CACNC,IAAI,CACJC,gBAAgB,CAChBC,QAAQ,CACRC,MAAM,CACNC,WAAW,CACXC,IAAI,CACJC,UAAU,CACVC,UAAU,CACVC,cAAc,CACdC,YAAY,CACZC,QAAQ,CACRC,KAAK,CACLC,MAAM,CACNC,QAAQ,CACRC,KAAK,CACLC,KAAK,CACLC,SAAS,CACTC,SAAS,CACTC,cAAc,CACdC,SAAS,CACTC,eAAe,CACfC,QAAQ,CACRC,SAAS,CACTC,OAAO,KACF,eAAe,CACtB,OAASC,MAAM,KAAQ,sBAAsB,CAC7C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CACtE,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,aAAa,KAAM,8CAA8C,CACxE,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,eAAe,KAAM,kCAAkC,CAC9D,MAAO,CAAAC,OAAO,KAAM,sBAAsB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,gCAAAC,QAAA,IAAAC,SAAA,yBAE1C,GAAM,CAAAC,aAAa,CAAG,CACpB,WAAW,CACX,YAAY,CACZ,YAAY,CACZ,c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AK,CAAE,CAAEuI,KAAK,CAAE,OAAQ,CAAE,CAC1BC,kBAAkB,CAAE,CAAC,CAAC,CAAE,CACxBC,KAAK,CAAEjT,aAAa,CAACsE,MAAO,CAC5B4O,WAAW,CAAE,CAAE,CACftS,IAAI,CAAEA,IAAK,CACXuS,YAAY,CAAEjJ,gBAAiB,CAChC,CAAC,EACC,CAAC,CACE,CAAC,cACXrU,IAAA,CAACL,YAAY,EACX+Y,IAAI,CAAE,+DAAgE,CACtEC,QAAQ,CAAE5O,cAAe,CACzB6O,gBAAgB,CAAE,SAAAA,iBAAA,QAAM,CAAA5O,iBAAiB,CAAC,KAAK,CAAC,EAAC,CACjD6O,cAAc,CAAE3D,kBAAmB,CACpC,CAAC,EACF,CAAC,CAEP,CAAC,CAED,cAAe,CAAA3U,SAAS","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import{Cookies}from'react-cookie';var cookies=new Cookies();var updateOptions=function updateOptions(url,options){var update=_objectSpread({},options);if(cookies.get('token')!=='no_auth'){update.headers=_objectSpread(_objectSpread({},update.headers),{},{Authorization:'Bearer '+sessionStorage.getItem('token')});}return update;};export default function fetcher(url,options){return fetch(url,updateOptions(url,options)).then(function(res){// For the situation that server has already been restarted, the current token may become invalid,\n// which leads to UI hangs.\nif(res.status==401&&localStorage.getItem('authStatus')!=='401'){localStorage.setItem('authStatus','401');window.dispatchEvent(new Event('auth-status'));}else if(res.status==403&&localStorage.getItem('authStatus')!=='403'){localStorage.setItem('authStatus','403');window.dispatchEvent(new Event('auth-status'));}else{return res;}});}","map":{"version":3,"names":["Cookies","cookies","updateOptions","url","options","update","_objectSpread","get","headers","Authorization","sessionStorage","getItem","fetcher","fetch","then","res","status","localStorage","setItem","window","dispatchEvent","Event"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/fetcher.js"],"sourcesContent":["import { Cookies } from 'react-cookie'\n\nconst cookies = new Cookies()\n\nconst updateOptions = (url, options) => {\n const update = { ...options }\n if (cookies.get('token') !== 'no_auth') {\n update.headers = {\n ...update.headers,\n Authorization: 'Bearer ' + sessionStorage.getItem('token'),\n }\n }\n return update\n}\n\nexport default function fetcher(url, options) {\n return fetch(url, updateOptions(url, options)).then((res) => {\n // For the situation that server has already been restarted, the current token may become invalid,\n // which leads to UI hangs.\n if (res.status == 401 && localStorage.getItem('authStatus') !== '401') {\n localStorage.setItem('authStatus', '401')\n window.dispatchEvent(new Event('auth-status'))\n } else if (\n res.status == 403 &&\n localStorage.getItem('authStatus') !== '403'\n ) {\n localStorage.setItem('authStatus', '403')\n window.dispatchEvent(new Event('auth-status'))\n } else {\n return res\n }\n })\n}\n"],"mappings":"4IAAA,OAASA,OAAO,KAAQ,cAAc,CAEtC,GAAM,CAAAC,OAAO,CAAG,GAAI,CAAAD,OAAO,CAAC,CAAC,CAE7B,GAAM,CAAAE,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAIC,GAAG,CAAEC,OAAO,CAAK,CACtC,GAAM,CAAAC,MAAM,CAAAC,aAAA,IAAQF,OAAO,CAAE,CAC7B,GAAIH,OAAO,CAACM,GAAG,CAAC,OAAO,CAAC,GAAK,SAAS,CAAE,CACtCF,MAAM,CAACG,OAAO,CAAAF,aAAA,CAAAA,aAAA,IACTD,MAAM,CAACG,OAAO,MACjBC,aAAa,CAAE,SAAS,CAAGC,cAAc,CAACC,OAAO,CAAC,OAAO,CAAC,EAC3D,CACH,CACA,MAAO,CAAAN,MAAM,CACf,CAAC,CAED,cAAe,SAAS,CAAAO,OAAOA,CAACT,GAAG,CAAEC,OAAO,CAAE,CAC5C,MAAO,CAAAS,KAAK,CAACV,GAAG,CAAED,aAAa,CAACC,GAAG,CAAEC,OAAO,CAAC,CAAC,CAACU,IAAI,CAAC,SAACC,GAAG,CAAK,CAC3D;AACA;AACA,GAAIA,GAAG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